Closed Typ1er closed 3 years ago
First of all, you need to disable “ allow message pass through” in bridge. Second I am calling our locksmith @crxporter
It seems like your lock is like "buzzing in" type lock, is this correct?
The HomeKit Node with the LockMechanism, passes the input from the LockTargetState directly to the output
Shaquu answered this part.
When switching on via Nodered, the HomeKit Node is always "door open" I was it after a Deploy or Restart of the system
We should be able to get things working. Can you share the flow you have already? Or at least examples of the payloads which your lock hardware is sending and expecting?
More info: The lock service will send payloads like:
{"LockTargetState":0}
And it will need to receive payloads from your device like:
{"LockTargetState":0, "LockCurrentState":0}
Current state can be: 0: Unlocked 1: Locked 2: Jammed 3: Unknown
Target state can be: 0: Unlocked 1: Locked
If you have a mismatch between "Current" and "Target" then Home app will show "Unlocking" or "Locking" ... some examples:
Current 0, Target 1 -> home app shows "locking" Current 1, Target 0 -> home app shows "unlocking" Current 0, Target 0 -> home app shows "unlocked"
Ok, enough with the background about how homekit works. On to your question about startup.
You will probably assume the lock is "locked" at startup. Simply have a message from inject node about 5 seconds after startup. Use a message like {"LockTargetState":1, "LockCurrentState":1}
When you trigger an "unlock" event from home app, you will see this message come "out" of the homekit node: {"LockTargetState":0}
... at this point you will want to trigger the 3-seconds unlock time and send a message like {"LockTargetState":0, "LockCurrentState":0}
Once the 3 seconds have passed, the lock will be in "locked" state again so just send {"LockTargetState":1, "LockCurrentState":1}
into the homekit node.
I hope that makes sense. @Shaquu how do I edit the new wiki? Give me a crash-course and we'll want to get this added as an example, since nothing is written there for locks yet.
Thank you both.
It long at the setting of the pass through.
I know the 4 states from Target and CurrentState. I use only two, open and close (true/false)
As a beginner you don't have the examples to understand it.
Input Node and Output Node are from ioBroker, this switch a relay on a ESP8266 (Tasmota)
@Typ1er is there any more help required?
I'm the cleanup bot guy doing my rounds. Closing for now. Please re-open if you need more help.
I have a problem with the LockMechanism,
I have a lock that I turn on for 3 seconds every time I turn it on. After that it goes off automatically.
In my case the input and output node is the same. The HomeKit Node with the LockMechanism, passes the input from the LockTargetState directly to the output. How can I prevent this? The HomeKit Node delivers exactly the same payload for switching.
A second question about the LockMechanism.
When switching on via Nodered, the HomeKit Node is always "door open" I was it after a Deploy or Restart of the system like to immediately deactivate h aben, otherwise there is always a push message, lock was closed.