homebridge-shelly icon indicating copy to clipboard operation
homebridge-shelly copied to clipboard

Lock Type for Shelly1

Open nitaybz opened this issue 4 years ago • 7 comments

First of all thank you for the plugin 🙏 I know it takes a lot of efforts.

Please create a "lock" type for the shelly1 as i'm using it for intercom gate opener. I would really appreciate it :)

nitaybz avatar Jul 06 '20 19:07 nitaybz

I too would like this

jsiegenthaler avatar Jul 16 '20 19:07 jsiegenthaler

I just installed my Shelly1 to activate my front door lock. Can you please add a Lock type?

jsiegenthaler avatar Jul 17 '20 17:07 jsiegenthaler

How are you using the Shelly 1 to control your lock? Is the lock connected to the switch input or otherwise on the Shelly 1 so that you can tell if the lock is actually secured or not?

alexryd avatar Aug 19 '20 16:08 alexryd

Hi. I live in an apartment, with an intercom that has a "DOOR" push-button. When the DOOR button is pressed , the building front door is unlocked (electric door lock which makes a loud buzzing noise). The door stays unlocked for the duration the button is pressed.

The Shelly1 relay connects across the DOOR switch on the intercom. I set the Shelly1 to automatically turn off after 8 seconds, this is configured inside the Shelly1 using the Shelly web GUI.

I issue a "Hey Siri Unlock the Front Door" command, and Siri sets the LockMechanism accessory to Unlock. An small automation connects the LockMechanism to the Shelly1 switch (named "Door Opener", and turns on the Switch (thus closing the relay, and activating the door lock to allow the door to be opened). After the predefined 8 seconds auto-off, the Shelly1 turns off, and the "Door Opener" Switch goes off in Homekit. A second small automation is then triggered and changes the LockMechanism to Locked to show that the door as locked. (whether it actually physically is locked or not cannot be determined).

Thus I only have two states: State 1: Door Locked (Shelly1 relay off) State 2: Door Unlocked (Shelly1 relay on) There's no transition status, no jammed status, no verification that the door is actually open, opening, closed, closing, locked or unlocked. But that's all I need. If I wanted actual door status, I'd need to connect a Homekit door sensor, or power the Shelly1 from 12V and use a magnet & reed switch on the Shelly1 SW input.

If you added a type = LockMechanism, supporting Locked (relay off, the default unpowered state) and Unlocked (relay on, powered) states, then I wouldn't need the automation, thus making Homekit faster and more reliable.

You could also add an inverted=true to invert the logic to make it flexible for other situations where the Relay On means locked instead of unlocked.

And, if you wanted, you could add a second contact sensor on the same LockMechanism device based on the SW input. I wouldn't use it myself, but other people might.

Happy to beta test for you ;)

jsiegenthaler avatar Aug 19 '20 16:08 jsiegenthaler

For me the only request is that it looks like a "lock" not a "switch" in the UI. Also, I think it being a lock will allow me to ask Siri to "Open the gate" not "Turn on the gate" which is what's required, despite it making no sense.

fsargent avatar Jan 01 '21 21:01 fsargent

sorry please ignore privous post, wrong git my bad.

andyblac avatar Jan 01 '21 22:01 andyblac

please make it happen 🙏

nitaybz avatar Jun 13 '22 22:06 nitaybz