arachnetech / homebridge-mqttthing

A plugin for Homebridge allowing the integration of many different accessory types using MQTT.
Apache License 2.0
462 stars 104 forks source link

Electromagnetic door lock using Tasmota flashed sonoff plug #561

Closed jat80 closed 1 year ago

jat80 commented 2 years ago

Hi there,

I'm just seeing if this is possible.

I currently have a electromagnetic door lock like this and I'm using a flashed sonoff plug with a 12v power supply on it to lock and unlock it (power on and off on the outlet accessory). It works great as I can configure the sonoff via Tasmota to automatically lock (power off) after 7 seconds.

My question is can I set this up as an actually lock or door accessory and if so which accessory would I use and how would I configure it using the sonoff plug?

Thanks for you time.

JT.

jat80 commented 2 years ago

Bump? Anyone?

jat80 commented 1 year ago

Managed to get this to work using the below config. Thanks to @NorthernMan54 for your help.

{ "accessory": "mqttthing", "type": "lockMechanism", "name": "test lock", "topics": { "setLockTargetState": "cmnd/sonoff1/power", "getLockTargetState": "stat/sonoff1/POWER", "getLockCurrentState": "stat/sonoff1/POWER" }, "lockValues": ["OFF", "ON", "Jammed", "Unknown"] }