homebridge-gpio-wpi2 icon indicating copy to clipboard operation
homebridge-gpio-wpi2 copied to clipboard

Multiple pins for single accessory

Open bmosley opened this issue 8 years ago • 3 comments

I want to control a fan that has 3 speed settings.

ie. Pin #1 = Off Pin #2 = low Pin #3 = Med Pin #4 = High

is there a way to create an accessory that can toggle multiple pins? using a fan accessory?

bmosley avatar Sep 04 '17 08:09 bmosley

It can't do exactly what you're asking for - although much of the code could be reused, it would add a lot of complexity to the logic - so a separate plugin is probably easier. (It would need configuration for pulsing buttons vs holding high, as well as state logic for only allowing one to be on at a time)

It also depends on how your fan switch works. If it's a wireless controller, then rcswitch based plugins might be an option. If your switch is an analog circuit varying the power supplied to the fan, then when PWM support is working in this module, that might be an option.

rsg98 avatar Sep 04 '17 13:09 rsg98

Thanks! I may have to fork this and rewrite some of it to fit my situation. My fan is a bit simple and I’ve just wired the controller button leads directly out. My setup currently “works” but I have 4 accessories listed for 1 fan. If one is toggled, it still leaves the others on etc. kind of ugly at the moment. I’ll look into some of the other options you mentioned too.

For rcswitch, is there currently a gpio plug-in similar to this specifically? Thanks!

bmosley avatar Sep 04 '17 16:09 bmosley

I've only played briefly with this, it's another thing on the TODO list!

https://www.npmjs.com/package/homebridge-rcswitch-gpiomem

rsg98 avatar Sep 04 '17 16:09 rsg98