Russ, is there any other information that you need or anything else that I can do or provide to help determine what to do to get my commands.json commands into TRIGGER.cmd on my RasPi Zero W?
Posts made by draddog
-
RE: Contents of command.json getting lost
-
RE: Contents of command.json getting lost
Yes, I'm aware that I have two TRIGGERcmd accounts. While I was struggling to get TRIGGERcmd to work, before I requested your help, I created the second account to test if I might have screwed up setting it up. Obviously, this did not resolve the problem. Both accounts were set up for the same RasPi computer, "Gremlin", so only one was active at a time. Consequently, I do not believe that I am getting them confused. However, the contents of the commands.json file below that you requested has a trigger for "Reboot" which was not in the file I sent to you above. I did this to have a way to distinguish them.
Here are the results that you requested:
root@Gremlin:~# cat /root/.TRIGGERcmdData/commands.json
[
{"trigger":"Reboot","command":"shutdown -r","ground":"background","voice":"reboot","allowParams": "false"},
{"trigger":"apt update","command":"apt-get -y update","ground":"background","voice":"update","allowParams": "false"},
{"trigger":"Front Tablelamp",
"command":"/home/pi/scripts/hg.sh X10 L4",
"ground":"background",
"voice":"Front Tablelamp",
"allowParams":"false"},
{"trigger":"Carport Light",
"command":"/home/pi/scripts/hg.sh X10 L2",
"ground":"background",
"voice":"Carport Light",
"allowParams":"false"},
{"trigger":"Workshop Light",
"command":"/home/pi/scripts/hg.sh X10 L3",
"ground":"background",
"voice":"Workshop Light",
"allowParams":"false"}
]
root@Gremlin:~# -
RE: Contents of command.json getting lost
OK, I ran the 4 commands you requested and the results are as follows:
root@Gremlin:~# sudo su -
root@Gremlin:~# /usr/share/triggercmdagent/app/src/installdaemon.sh
Daemon install: true
Logging in with saved token.
Checking if the 6478e95100289c001b4fb9b9 computer exists.
This computer exists in your account.
● triggercmdagent.service - TRIGGERcmd Agent
Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled; vend>
Active: active (running) since Thu 2023-06-01 10:15:58 EDT; 11h ago
Main PID: 328 (node)
Tasks: 11 (limit: 414)
CPU: 37.168s
CGroup: /system.slice/triggercmdagent.service
└─328 node /usr/share/triggercmdagent/app/src/daemon.js --run /roo>Jun 01 10:16:48 Gremlin env[328]: Logging in with saved token to run background>
Jun 01 10:16:55 Gremlin env[328]: Write backup completed.
Jun 01 10:16:56 Gremlin env[328]: |> Now connected to https://www.triggerc>
Jun 01 10:16:56 Gremlin env[328]: ___/ For help, see: http://bit.ly/2q0QDpf
Jun 01 10:16:56 Gremlin env[328]: (using sails.io.js node SDK @v1.1.13)
Jun 01 10:16:56 Gremlin env[328]: Connected at: Thu Jun 01 2023 10:16:>
Jun 01 10:16:57 Gremlin env[328]: { message: 'Subscribed to 646fec86bda2b8001ac>
Jun 01 10:16:57 Gremlin env[328]: { message: 'Subscribed to 646fec86bda2b8001ac>
Jun 01 10:16:57 Gremlin env[328]: Initiated command adds
Jun 01 10:16:57 Gremlin env[328]: Initiated command removals
lines 1-19/19 (END)
^C
root@Gremlin:~# systemctl status triggercmdagent
● triggercmdagent.service - TRIGGERcmd Agent
Loaded: loaded (/etc/systemd/system/triggercmdagent.service; enabled; vend>
Active: active (running) since Thu 2023-06-01 10:15:58 EDT; 11h ago
Main PID: 328 (node)
Tasks: 11 (limit: 414)
CPU: 37.201s
CGroup: /system.slice/triggercmdagent.service
└─328 node /usr/share/triggercmdagent/app/src/daemon.js --run /roo>Jun 01 10:16:48 Gremlin env[328]: Logging in with saved token to run background>
Jun 01 10:16:55 Gremlin env[328]: Write backup completed.
Jun 01 10:16:56 Gremlin env[328]: |> Now connected to https://www.triggerc>
Jun 01 10:16:56 Gremlin env[328]: ___/ For help, see: http://bit.ly/2q0QDpf
Jun 01 10:16:56 Gremlin env[328]: (using sails.io.js node SDK @v1.1.13)
Jun 01 10:16:56 Gremlin env[328]: Connected at: Thu Jun 01 2023 10:16:>
Jun 01 10:16:57 Gremlin env[328]: { message: 'Subscribed to 646fec86bda2b8001ac>
Jun 01 10:16:57 Gremlin env[328]: { message: 'Subscribed to 646fec86bda2b8001ac>
Jun 01 10:16:57 Gremlin env[328]: Initiated command adds
Jun 01 10:16:57 Gremlin env[328]: Initiated command removals
lines 1-19/19 (END)
^C
root@Gremlin:~# cat /root/.TRIGGERcmdData/debug.log
cat: /root/.TRIGGERcmdData/debug.log: No such file or directory
root@Gremlin:~# triggercmdagent
Run installdaemon.sh to install the triggercmdagent daemon so it runs during boot
Daemon install: false
Logging in with saved token.
Checking if the 6478e95100289c001b4fb9b9 computer exists.
This computer exists in your account.
Tokenfile: /root/.TRIGGERcmdData/token.tkn
ComputerIDfile: /root/.TRIGGERcmdData/computerid.cfg
Logging in with saved token to run foreground tasks.
Write backup completed.|> Now connected to https://www.triggercmd.com.
___/ For help, see: http://bit.ly/2q0QDpf
(using sails.io.js node SDK @v1.1.13)
Connected at: Thu Jun 01 2023 22:13:35 GMT-0400 (Eastern Daylight Time)Initiated command removals
{ message: 'Subscribed to 6478e95100289c001b4fb9b9!' }
{ message: 'Subscribed to 6478e95100289c001b4fb9b9!' }
Initiated command adds
^C
root@Gremlin:~# -
RE: Contents of command.json getting lost
Actually, I did enter the commands you gave me several times, but the Gnome editor persisted to be the only trigger. I just tried it again, but the Gnome editor trigger did not go away. I deleted my RasPi computer from my Triggercmd account to try to rebuild anew. Now I have no triggers. I re-executed the command-set to re-load Triggercmd and I still have no triggers. The commands I re-executed are:
sudo su -
apt-get -y update
apt-get -y upgrade
apt -y install npm nodejs
wget https://agents.triggercmd.com/triggercmdagent_1.0.1_all.deb
dpkg -i triggercmdagent_1.0.1_all.deb
sudo su -
triggercmdagent
sudo su -
/usr/share/triggercmdagent/app/src/installdaemon.shAt least the pesky Gnome editor trigger is gone. I went to my Alexa app and deleted all Smart Home devices and tried to re-Discover devices. None were found. I suspect I am making some dumb mistake, but I cannot get it to work.
-
Contents of command.json getting lost
I am running HomeGenie on a Pi Zero W but cannot get it to work with Alexa through TriggerCMD. TriggerCMD shows the only trigger as being Gnome, yet my command.json file is as follows:
[
{"trigger":"apt update","command":"apt-get -y update","ground":"background","voice":"update"},
{"trigger":"Front Tablelamp",
"command":"/home/pi/scripts/hg.sh X10 L4",
"ground":"background",
"voice":"Front Tablelamp",
"allowParams":"false"},
{"trigger":"Carport Light",
"command":"/home/pi/scripts/hg.sh X10 L2",
"ground":"background",
"voice":"Carport Light",
"allowParams":"false"},
{"trigger":"Workshop Light",
"command":"/home/pi/scripts/hg.sh X10 L3",
"ground":"background",
"voice":"Workshop Light",
"allowParams":"false"}
]
Each of these commands turns on and off lights when entered from the command line. I thought TriggerCMD would find these in its search and overwrite the Gnome editor command. Can you tell me what I am doing wrong?