pponce / homebridge-script2

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

pushbutton functionality #11

Closed kilbamoo closed 5 years ago

kilbamoo commented 6 years ago

Would be great if the switch could act as a pushbutton too. When it is activated, it turns itself off after a given time in seconds.

rijidpish commented 6 years ago

I've been trying to do this, i have a python script that creates a fileState file, fires a relay for 1 second, then deletes the fileState file but the state is not updated in the homekit app unless i reopen the app.

The best i can do at the moment is use the same script for both "on" and "off" in config.json.

max-christian commented 5 years ago

@rijidpish I think my pull request will sort that issue of the state not being updated for you: #15

rijidpish commented 5 years ago

Nice! I’ll have a ganders at it now

Yaweh commented 5 years ago

Should this be working now? I installed plugin today and the fileState does not seem to be updating Homekit.

max-christian commented 5 years ago

Yep, it should be working. Want to share your config.json?

Yaweh commented 5 years ago

your confident response fixed it! Also, raspberry reboot might of fixed it. thanks, works great.

max-christian commented 5 years ago

👍🏻👍🏻👍🏻 Happy New Year 🥳

ThomasBormans commented 5 years ago

@Yaweh Do you might sharing your config please? I'm running into the same problem 😅