smartechru / homebridge-relays

This Homebridge plugin controls 4 relays through Apple Home App.
MIT License
16 stars 13 forks source link

Added default_state, duration, and invert options. #3

Closed revarbat closed 5 years ago

revarbat commented 5 years ago

This makes this plugin useful for the relays I need to control to turn my gas fireplace on and off. Adds three accessory options:

Option Use
default_state The state to set the device to when homebridge starts. false for OFF, true for ON.
duration_ms Turns accessory back off after this many milliseconds after it is turned on. Timer resets if state is set again. I use it to turn my fireplace off after an hour.
invert If true, output on pin will be LOW for ON, and HIGH for OFF.
revarbat commented 5 years ago

I think this will solve issues #1 and #2.

smartechru commented 5 years ago

Good work. I did this a year ago and never tried to maintain it. I've checked your logic and approved your merge request. Thank you.