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

Not responding but it's working like it should #26

Open Diederik98 opened 7 years ago

Diederik98 commented 7 years ago

Hi,

Thanks for your great plugin! However I'm having an error but I don't know what I'm doing wrong. In the Home application I get 'Not responding' But everything works, the exclamation mark disappears after I reloaded the application.

Here's my config.json: { "platform": "cmdSwitch2", "name": "CMD Switch", "switches": [{ "name" : "Praktijk 1", "on_cmd": "sudo bash /path/to/command_on.sh", "off_cmd": "sudo bash /path/to/command_off.sh", "state_cmd": "sudo bash /var/homebridge/command_state.sh", "polling": true, "interval": 1, "timeout": 1000, "model": "VM160", "serial": "DDC001" } The only error I found when I'm running journalctl -f is: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/bash /path/to/command_state.sh

Do you know what's wrong? My scripts: command_on.sh: #!/bin/bash gpio -g mode 27 out gpio -g write 27 1 sleep 0.2 gpio -g write 27 0 exit 1 command_off is the same as command_on. Command_state: gpio -g mode 18 in (gpio -g read 18) | grep 1

Here's also a screenshot of the app: img_7035 img_7036

Thanks for your help!!

luisiam commented 6 years ago

That line you showed is not an error. Is there any line showing weird stuff? May be try to make the timeout longer?