luisiam / homebridge-cmdswitch2

CMD Plugin for HomeBridge (API 2.0): https://github.com/nfarina/homebridge
Apache License 2.0
176 stars 29 forks source link

on_cmd can't handle daemons #27

Open mrcsmxms opened 6 years ago

mrcsmxms commented 6 years ago

when i want to start a daemon (endless running script) the script itself starts but in HomeKit it keeps loading till it's failing. after a restart of HomeKit the correct state is displayed and turning off is also working. is there a way to solve that issue ?

my on_cmd script looks something like this : sudo bash /home/pi/script.sh &

the script looks like this

while true;do
(...)
sleep 1
done