Skip to content

Add support for Switch input_pin #11

Description

@brancooo1

First of all, thanks for your work on this library. I've searched the history for a solution to this problem, so I'm writing a new request.

There are cases where devices are switched on and off by pulse and on another pin you monitor the status of the device. This is also the case for standard installation pulse relays. A switch on the wall creates a pulse that changes the state of the pulse relay.

I think the solution would be an optional parameter inputPin, which if filled would serve as a mirroring for the switch state. Now obsolete homebridge-gpio-device library had a very similar approach, notice the configuration.

With debouncing it can work very nicely, for example with a configuration like this. What do you think about it, thanks for your opinion.

{
    "accessory": "Relay",
    "name": "Kitchen Light",
    "pin": 5,
    "invert": true,
    "intial_state": 0,
    "timeout_ms": 500,
    "input_pin": 6,
}

Screenshot 2022-08-28 at 10 04 26

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions