pponce / homebridge-script2

Execute custom scripts via HomeKit apps
89 stars 18 forks source link

Click on HomeKit Accessories doesn't run the scripts #7

Closed mjalafoo closed 6 years ago

mjalafoo commented 6 years ago

Followed the guide exactly (example 1)

It is worth noting that when I run the scripts using the BASH command (for example ON script) and it creates the "script.flag" the HomeKit accessory holds the ON STATE, and when I run the Off script using the BASH command and it deletes the "script.flag" the HomeKit Accessory changes to OFF state.

I am running Rasbian Jessie, below are the versions of the stack:

Please let me know if I am doing anything wrong.

pponce commented 6 years ago

Try making your script files executable so one does not need to execute with bash command. chmod +x on.sh chmod +x off.sh chmod +x state.sh

mjalafoo commented 6 years ago

It worked. Thanks a lot. I had to do the following: sudo chmod 777 on.sh sudo chmod 777 off.sh sudo chmod 777 state.sh sudo chmod 777 on.py sudo chmod 777 off.py modified my config.json to have the full path for the files (/home/pi/on.sh) instead of (~/on.sh)

pponce commented 6 years ago

glad it worked! i added a note to make sure executable in the instructions. Might also add to make sure it's accessible by homebridge user.