Closed ghost closed 4 years ago
The scripts execute using the homebridge user. In my case i have a user named "homebridge" that runs my homebridge instance. So "~/" corresponds to the homebridge users home directory. Using the full path though avoids any issues.
make sense, but it’s strange because the other “fields” don’t have that problem (like on/off) only fileState needs full path. my user is Pi and I lunch homebridge with it.
Looks like the file-exists function has issues with the shortcut “~” for the users home folder. I updated the readme to call out we need the full path and can’t use the ~ shortcut.
Hi,
it seems doesn't work very well when you have config.json like this:
"fileState": "~/script.flag",
if you TURN ON the "accessory" and after you enter in Home app with another device the "button" will going to turn off immediately in both device but the script is still running.
no problem if you use full path:
"fileState": "/home/$USER/script.flag",