dknowles2/ha-schlage

Only 1 of 2 Encode Plus locks showing "Changed By" attribute.

Closed this issue · 3 comments

So this is a strange one. In my house I have two identical Encode Plus locks. The integration shows both devices and lock/unlock works great for both.

I just recently noticed however that only the "Kitchen Lock" (which is the "first" lock in the slide list in the Schlage app if that matters) shows the "Changed By" attribute in logbook/device events, the second lock, "Front Door", does not appear to have the Changed By attribute (though changed by is visible in the Schlage app for that lock). Here is a screenshot example:

Kitchen Door Lock
Front Door Lock

Is there some configuration detail I missed with the front door lock that enables that attribute (I don't see any). As far as I can tell, every other aspect of the two locks (firmware, model number, etc) is identical.

Thanks for any insight!

Is there anything in the Home Assistant logs? (Settings > System > Logs)

If there's no changed by, then either there was some failure reading lock logs from Schlage or there wasn't a log entry related to lock state changing found in what we read.

I'm not seeing any related logs for the component, but maybe I have the logger set wrong. I'll poke around and see what I can find.

Update: I set logger: log: custom_component_schlage: debug in configuration.yaml, but I'm only seeing this every 15 seconds or so (and I went and locked and unlocked the lock several times):

2023-05-29 10:47:32.391 DEBUG (MainThread) [custom_components.schlage] Finished fetching schlage data in 0.945 seconds (success: True)
2023-05-29 10:47:48.455 DEBUG (MainThread) [custom_components.schlage] Finished fetching schlage data in 1.009 seconds (success: True)
2023-05-29 10:48:04.443 DEBUG (MainThread) [custom_components.schlage] Finished fetching schlage data in 0.996 seconds (success: True)

Update 2, extra weird edition: so maybe this is a logbook display issue. After rebooting I went and looked again at the logbook entries in the Device Info page, and every single entry has the same changed_by attribute, which seems to reflect the most recent changed by (ie, the all change to "mobile device - user", or "thumbturn"). Turns out this is also what Kitchen lock is doing and I didn't notice.

I'm going to setup an automation and test it that way.

Okay, final update. When using an automation, this appears to be working correctly, only the logbook in the device page is reporting history incorrectly. I don't know why the lock previously wasn't showing a changed_by attribute, but since rebooting HA, that is no longer repo-ing, so I'm going to close this.

The only remaining bummer (which is a Schlage problem, not an issue with this component), is that it does not appear to identify the user when unlocking with Apple Home Key, it only says "Apple home key".

Thank you again for the work on this component and the ongoing support. It is very useful to my Home Assistant experience!