cflurin / homebridge-mqtt

Homebridge-mqtt is a Plugin for Homebridge.
Apache License 2.0
229 stars 38 forks source link

How to correctly set "lockables" #5

Closed ArnieX closed 8 years ago

ArnieX commented 8 years ago

Hi, I have tried to set Security System, Lock Mechanism, Garage Door Opener, Blinds etc. and all these always stay in Arming..., Locking..., Opening... or so states and never finishes the job. How to correctly do the job and then tell Home.app (Homebridge) to finally set the status.

I'm using Node-RED so please possibly reply with solution for NR as it would be easiest way anyway. Thank you in advance for your time.

maragelis commented 8 years ago

If lock is using MQTT there should be a channel that gets the status of the lock. In node-red you would subscribe to that and send the lock characteristic to the Homebridge-mqtt to/set channel

ArnieX commented 8 years ago

@maragelis awesome, it works perfectly now. Thanks for guidance.

Just few notes for others. From other place than HomeKit (Home.app, Siri) you have to set TargetState first and then follow it with setting CurrentState to the same value as TargetState previously. When using Home.app or Siri or other HomeKit control it does set TargetState itself, so you have to set CurrentState to finish the job (Arming, Closing, Locking, etc.). As addition it also send notification to all home members about the state change, which is nice.

cflurin commented 8 years ago

Ditto for blinds, I generally set currentPosition and TargetPosition with the same value.

brannon-bowden commented 5 years ago

Thank you guys!!! I was struggling with this one!