Z-Wave-Me / home-automation

Z-Way Home Automation engine
182 stars 116 forks source link

Schlage Connect Door Lock - Manual operations do not update state in UI #433

Closed ToddGreenfield closed 5 years ago

ToddGreenfield commented 7 years ago

Hi, Problem device is Schlage Connect model BE469NX with FW Ver MAIN_7.1 - running Razberry z-way (ZW0500) with FW Ver 2.3.1 (UI 1.7.0/Expert 1.3.0), on an RPI3 running Jessie-lite.

Issue is manual and auto-relock operations do not seem to communicate status back to z-way-server. Log files shows reports received and does not show errors for these operations, they just dont send status updates so UI doesn't reflect state change.

z-way-server log attached. First operation is unlocking via z-way smarthome, then locking with z-way, then a manual unlock and finally manual (auto-relock).

Thank you. z-way-server.log.txt

silverhack77 commented 7 years ago

What happens if you lock the door lock in the UI, then wait 10 seconds and click the button to lock again? Does the icon/state then update? You could also try installing the Niffler app and configure it to monitor the lock for NIF and perform a follow-up query to check the lock state.

ToddGreenfield commented 7 years ago

Locking/unlocking the door in the UI (smarthome only - the lock doesn't show up in the expert UI due to some issue with that UI) works fine. If I click the lock or unlock icons the lock operates and the state is reflected correctly. It is the manual operation by hand (and subsequent auto-lock) of the lock which does not update state in the UI. I see the zwave "event" in the z-way-server.log (manual unlock pasted below), but am guessing the z-way-server is not listening? I also want to say this used to work in 2.2, but can't be 100% sure.

[2017-04-16 09:53:59.959] [D] [zway] RECEIVED: ( 01 08 00 04 00 3A 02 98 40 13 ) [2017-04-16 09:53:59.963] [D] [zway] SENT ACK [2017-04-16 09:53:59.963] [D] [zway] SETDATA devices.58.data.lastReceived = 0 (0x00000000) [2017-04-16 09:53:59.963] [I] [zway] Node 58:0 CC Security: sending Nonce Report [2017-04-16 09:53:59.964] [I] [zway] Adding job: Nonce Report [2017-04-16 09:53:59.964] [D] [zway] SENDING (cb 0x0e): ( 01 11 00 13 3A 0A 98 80 70 43 8F 9D 11 B9 B7 8E 05 0E 6E ) [2017-04-16 09:53:59.969] [D] [zway] RECEIVED ACK [2017-04-16 09:53:59.970] [D] [zway] RECEIVED: ( 01 04 01 13 01 E8 ) [2017-04-16 09:53:59.970] [D] [zway] SENT ACK [2017-04-16 09:53:59.970] [D] [zway] Delivered to Z-Wave stack [2017-04-16 09:53:59.990] [D] [zway] RECEIVED: ( 01 07 00 13 0E 00 00 02 E7 ) [2017-04-16 09:53:59.990] [D] [zway] SENT ACK [2017-04-16 09:53:59.990] [I] [zway] Job 0x13 (Nonce Report): Delivered [2017-04-16 09:53:59.990] [D] [zway] SendData Response with callback 0x0e received: received by recipient [2017-04-16 09:53:59.990] [D] [zway] SETDATA devices.58.data.lastSend = 5700511 (0x0056fb9f) [2017-04-16 09:53:59.990] [D] [zway] Job 0x13 (Nonce Report): success [2017-04-16 09:53:59.991] [I] [zway] Removing job: Nonce Report [2017-04-16 09:54:00.190] [D] [zway] RECEIVED: ( 01 23 00 04 00 3A 1D 98 81 9A 6A 6B 96 DF 49 CE 01 0B 3F FF 1E 0C 96 1F EE DE 03 70 35 E1 23 4F 3B D8 35 8D 42 ) [2017-04-16 09:54:00.190] [D] [zway] SENT ACK [2017-04-16 09:54:00.190] [D] [zway] SETDATA devices.58.data.lastReceived = 0 (0x00000000) [2017-04-16 09:54:00.190] [I] [zway] Node 58:0 CC Security: Received a secure message [2017-04-16 09:54:00.191] [D] [zway] SETDATA devices.58.instances.0.commandClasses.152.data.firstPart = ** [2017-04-16 09:54:00.191] [I] [zway] Node 58:0 CC Security: passing decrypted packet to application level: [ 71 05 16 01 00 ff 06 02 00 ] [2017-04-16 09:54:00.191] [D] [zway] SETDATA devices.58.instances.0.commandClasses.113.data.V1event.alarmType = 22 (0x00000016) [2017-04-16 09:54:00.191] [D] [zway] SETDATA devices.58.instances.0.commandClasses.113.data.V1event.level = 1 (0x00000001) [2017-04-16 09:54:00.191] [D] [zway] SETDATA devices.58.instances.0.commandClasses.113.data.V1event = Empty [2017-04-16 09:54:00.191] [D] [zway] SETDATA devices.58.instances.0.commandClasses.113.data.6.eventParameters = byte[0] [2017-04-16 09:54:00.192] [D] [zway] ( zero-length buffer ) [2017-04-16 09:54:00.192] [D] [zway] SETDATA devices.58.instances.0.commandClasses.113.data.6.event = 2 (0x00000002) [2017-04-16 09:54:00.194] [D] [zway] SETDATA devices.58.instances.0.commandClasses.113.data.6.eventString = "Manual Lock Open Operation" [2017-04-16 09:54:00.195] [D] [zway] SETDATA devices.58.instances.0.commandClasses.113.data.6.status = 255 (0x000000ff) [2017-04-16 09:54:00.195] [D] [zway] SETDATA devices.58.instances.0.commandClasses.113.data.6 = Empty [2017-04-16 09:54:20.217] [D] [zway] Job 0x13: deleted from queue

silverhack77 commented 7 years ago

Sounds like it's the opposite of the problem I was having. Your lock is reporting state changes correctly for z-wave operations, but manual operations are not updating in the z-way server. From your log output of the manual operation, it looks like the lock is sending out an alarm event only (command class 113). You could try using the Niffler app which should see this and then will request / Get() a status update from the lock.

PoltoS commented 7 years ago

You should try to add in ZWave/index.js in Alarm section a binding to type 6, event 2 and do DoorLock.Get() from that place.

It is quite hard to write this in blind. We can try it, but you will need to test it anyway on your side. We do not have such a lock to perform tests

ToddGreenfield commented 7 years ago

@PoltoS Just to make sure I am in the correct location, this would be /opt/z-way-server/automation/modules/ZWave/index.js. Correct? About what line# are you talking about? Looks like around 4400. If you can suggest specific code to add to what line(s), I would be grateful... thanks.

ToddGreenfield commented 7 years ago

@PoltoS would you suggest specific code to try? I am happy to test. Thank you

jadedeane commented 7 years ago

Reading the thread, and the suggestions to use Niffler. Niffler stopped working for me after upgrading from 2.2.5 to 2.3.0.

ToddGreenfield commented 7 years ago

I think I had a problem with niffler as well after that. I stopped using it and use the periodic switch poller in the homeautomation app section of Z-Way now and it works fine, but only for switches - not for locks though. I would be happy to try adding code but am not sure what/where to add it...