question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make handle idling of "Lock Jammed" variable smarter

See original GitHub issue

I am trying to get my August Lock Pro (https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/devices/0x033f/asl-03.json) to properly report if the lock is jammed or not. When the lock jams I get this event:

{
    "type": "event",
    "event": {
        "source": "node",
        "event": "value updated",
        "nodeId": 8,
        "args": {
            "commandClassName": "Notification",
            "commandClass": 113,
            "endpoint": 0,
            "property": "Access Control",
            "propertyKey": "Lock state",
            "newValue": 11,
            "prevValue": 11,
            "propertyName": "Access Control",
            "propertyKeyName": "Lock state",
            "metadata": {
                "type": "number",
                "readable": true,
                "writeable": false,
                "min": 0,
                "max": 255,
                "label": "Lock state",
                "states": {
                    "0": "idle",
                    "11": "Lock jammed"
                },
                "ccSpecific": {
                    "notificationType": 6
                }
            },
            "value": 11,
            "ccVersion": 8
        }
    }
}

When I then un-jam the lock whether manually or automatically then I get:

{
    "type": "event",
    "event": {
        "source": "node",
        "event": "notification",
        "nodeId": 8,
        "notificationLabel": "Manual lock operation"
    }
}

or

{
    "type": "event",
    "event": {
        "source": "node",
        "event": "notification",
        "nodeId": 8,
        "notificationLabel": "RF lock operation"
    }
}

The problem is there is never another "event": "value updated", to clear the state of the lock jammed back to 0 / idle. What I can’t tell is if this is some particularity of the August lock that it doesnt send a new notification that the lock is unjammed, or if this has to do with how this library is differentiating between which events are value update events and which are asynchronous notifications

Digging around the code if found https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json#L386-L393 defining the lock jammed as a variable and then down in the events seciton https://github.com/zwave-js/node-zwave-js/blob/master/packages/config/config/notifications.json#L571-L576 there is a jumnp of 0x0A to 0xC skipping the 0x0B for lock jammed.

I am curious if/why not lock jammed isn’t listed in that events section and is instead listed in variables section? Should the 0x0b state be an event instead? Or is this something just weird with how August Lock is woring in which case need some specific override for the august device (if that is even possible in the config).

Before I did any PRs was hoping for some insight on what you all think the “correct” behavior here is for z-wave vs what I am seeing with my august lock.

The context for all of this is experimenting with this libraries alpha intigraiton with Home Assistant and trying to get locks to accruatly display locked/unlocked/jammed. Currently what happens is the lock jammed event value change event comes in and flips the created entity for the Lock State to on but then there is never an event to flip it back to off because that notification for value update only ever comes to say lock is jammed, any event that may indicate its no longer jammed comes in as a "event": "notification" rather then "event": "value updated", for the "propertyName": "Access Control",

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:66 (24 by maintainers)

github_iconTop GitHub Comments

6reactions
jfroycommented, Apr 21, 2022

I’m in the same situation with a Yale YRD256 lock. But that’s a V4 notification product/module, so if I understand this issue correctly, there’s no requirement for the lock to idle the state/variable.

It seems to me, taking a step back, that zwave-js should have infrastructure for product “quirks”, much like the Linux kernel. It’s fine to have a “we follow the spec to the T” approach, but the real world is messy and products have defects. I’m new to this project and HA in general, so I don’t know if this has been discussed before.

3reactions
AlCalzonecommented, Apr 26, 2022

This issue is still open, I’ll get to it at some point.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Clear Lock Jammed Status? - Home Assistant Community
i dont think its a smart idea to manually set the lock status…you know in case it actually jammed…probably best to send another...
Read more >
How to Fix Jammed and Stuck Locks
for a stuck button, try turning the handle while pushing and holding the lock button, and then jiggle the handle to see if...
Read more >
Steering Wheel Locked Up While Driving - Car From Japan
As we have noted, there are three common reasons as to why your steering wheel would lock up; you are using the wrong...
Read more >
Recovering a Misprogrammed SmartKey Cylinder - YouTube
Step-by-step instructions on how to recover a misprogrammed SmartKey lock. Misprogramming is when a SmartKey lock will not function with the ...
Read more >
Making a smarter door lock with the SimpleLink™ MSP432 ...
TI's SimpleLink™ MSP432™ microcontroller (MCU) can help maximize energy savings because it consumes just 660nA in idle mode. When an event ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found