webdeck / homebridge-indigo

Homebridge Plugin for Indigo
Apache License 2.0
13 stars 6 forks source link

Push-button devices #18

Closed justin-vt closed 7 years ago

justin-vt commented 7 years ago

Is there any way to do a push-button device (i.e. a device that doesn't have a toggle state?) I'm wondering if there is a HomeKit device-type that might work for this that we could map using homebridge-indigo.

My use case is I want to trigger something in Indigo, but I want it to be stateless so I can trigger it from multiple devices without having to deal with an on/off state.

webdeck commented 7 years ago

Indigo action groups map to switches that automatically turn themselves back off, so they essentially act like push buttons. Is that what you're looking for?

justin-vt commented 7 years ago

Sorry for dropping this, I ran into another unrelated roadblock with my implementation.

I ended up using two different switches for this - let's call them the "on switch", and the "off switch". If I want to turn the switch on, I turn on the "on switch". If I want to turn the switch off, I turn on the "off switch". I use an action group to turn back off whichever switch has just been turned on, and an internal variable to store the "on/off" status.