As far as I remember, if you have a trigger at 0 and when you restart the server you have 0 there, then the command will be skipped. You need to do 1 in the channel, and then 0, that is, changes must occur. This is done in order not to send commands when restarting the server.
Hi,
Add a new channel of the calculated type that shows the device status.
Use the formula for the new channel: Stat(101) > 0 ? 1 : 0 where 101 is the source channel number.