rsg98 / homebridge-gpio-wpi2

Homebridge Raspberry Pi GPIO Platform (API 2) Plugin - using WiringPi as a backend
48 stars 16 forks source link

button instead of switch #33

Open bmosley opened 7 years ago

bmosley commented 7 years ago

my controls are push button based. press once, light goes on, press again, light goes off. is there a way to change it to mirror that behavior for the HomeKit UI?

With Switches, if i set duration, it works correctly, but HomeKit shows the switch is OFF instead of it's actual ON state.

rsg98 commented 7 years ago

There isn’t a way at the moment - am planning on adding a stateful programmable Switch to the v2 that’s currently up in alpha...

That will allow you to use another GPIO line as a state sensing input, which I think will perform as you describe (with the bonus that the on/off shouldn’t get out of sync with reality, because of the feedback loop)

Not going to be able to work on this for a while, as I’m away, but the outline of support for this type of config is in the v2.0.0-alpha branch. On Thu, 21 Sep 2017 at 08:47, Bryan notifications@github.com wrote:

my controls are push button based. press once, light goes on, press again, light goes off. is there a way to change it to mirror that behavior for the HomeKit UI?

With Switches, if i set duration, it works correctly, but HomeKit shows the switch is OFF instead of it's actual ON state.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/rsg98/homebridge-gpio-wpi2/issues/33, or mute the thread https://github.com/notifications/unsubscribe-auth/ARe_tdhaF-VaQvL8M2jmzZVhmuYfdCtrks5skhSXgaJpZM4Pe7Yl .

kiondi commented 7 years ago

I have the same problem, we wait your new great job, ;)