homebridge-cmdswitch2
homebridge-cmdswitch2 copied to clipboard
Switch automatic turn off ?
Hello, Is it possible that the switch automatically switches off after switching it on?
If so which parameter in the config is meant for it?
The problem is related to the "state_cmd" property, in 1.0 version it was optional and the plugin retained automatically the state remembering last action.
Hello,
So ? Do you know how to automatically switch to off with the state_cmd property ?
Many thanks.
I'm a real newbe in JS coding... It's sad no one can give a solution for automatic command off. That plugin seems to work perfectly and i'll use it if i can do a push button style with it.
This feature is not available at the moment, this thread was related to a bug that has been fixed.
I thought Apple implemented a new type of switch - the stateless switch to solve this problem. I am not deeply into it but it sounded to me, as if one just has to change the type of switch defined everything else was solved...
Try this:
"state_cmd" : "sh /home/pi/Desktop/alwaysoff.sh",
"polling": true,
"interval": 1
Create a alwaysoff.sh file on the Desktop and write in it:
exit 1
Then you can press the Button, after that, it turns off automaticle
Also looking for a auto off after a given time period. @theend92 this might work, but it would turn it right away. Would it be possible to configure to turn of after 5sec or 5 minutes etc?
@Kepete Yes, its possible. Can you show me your "on-cmd"? I will help you.