Hi!
I'm having an annoying issue. I made a system I call HomeCenter which lets me manage smart home / home automation stuff. One of the functions is tracking laundry cycles, so when I start a load I press a button and a DB record gets entered then all the HomeCenter clients poll it every few minutes and if the time logged + duration for the cycle selected has passed, it plays an alarm. It's very loud and obnoxious so I don't miss it, lol. I wanted to be able to tell it to shut up though without using one of the HomeCenter PCs or tablets, because this morning I laid back down to snooze a bit and the alarm went off. It was a drying load, so it didn't matter if I went and handled it immediately so I just wanted HC to shut the hell up so I could sleep but as I didn't have my phone I had to get up and go to the kitchen to close out the alarm.
So I decided I need to write a batch file that will delete the record from the DB via an Alexa voice command. So I fired up my TriggerCMD GUI editor and added a new record:
Trigger: laundrydone
Command: c:\misc\laundrydone.bat
Off command: N/A
Ground: foreground
Voice: laundrydone
Voice Reply: N/A
Allow Parameters: false
I then made the batch:
@echo off
sql homecenter "delete from activeitems where action = 8192" /u service.triggercmd.homecenter /p (pwd) /h lioth.mydomain.com /l laundryreset.log
I opened the HomeCenter page and clicked Laundry, Started Wash Cycle - Clothes. I then fired up SQLyog and checked:
SELECT * FROM activeitems;
ID: 09d10a5d-ddb9-4eae-9e3e-17f6e6416cad
action: 8192
dtstarted: 2025-08-10 10:37:29
flags: 0
startedby: fe5303f8-0716-42cb-ade3-0a6023be87d9
Cool. So I said Alexa, turn on laundrydone. She said OK. I do SELECT again, and I still see my row. So I open command and go to c:\misc and run laundryreset.bat. Do another SELECT and now there are no results. So the batch file works. Next I clicked start load again to obtain data then went to the TriggerCMD GUI editor, found laundrydone and clicked the play button. SELECT'd and I still have data. I do a very similar thing for my health tracking database. I can say "Alexa, turn on diet Pepsi" and it will use loghealth.bat to add that to my daily food log (I'm diabetic so I watch what I eat carefully). So I compared the two since TC has no issue with loghealth:
C:\Misc>cacls loghealth.bat
C:\Misc\loghealth.bat NT AUTHORITY\SYSTEM:(ID)F
BUILTIN\Administrators:(ID)F
BUILTIN\Users:(ID)R
MYDOMAIN\strahan:(ID)F
C:\Misc>cacls laundryreset.bat
C:\Misc\laundryreset.bat NT AUTHORITY\SYSTEM:(ID)F
BUILTIN\Administrators:(ID)F
BUILTIN\Users:(ID)R
MYDOMAIN\strahan:(ID)F
Well, that looks fine. So I tried modifying the batch file:
@echo off
echo WTF is wrong with you>log.txt
sql homecenter "delete from activeitems where action = 8192" /u service.triggercmd.homecenter /p (pwd) /h lioth.mydomain.com /l laundryreset.log
Hit the play button in TC GUI, log.txt never appeared. What should I check next?