Wyze Lock integration

I use ZHA, after you set up the lock through the wyze gateway and calibrate it, you just start the joining process via HA and then hold the button on the lock down for like 3 seconds until it starts blinking green I think.

The only thing that will work is lock/unlock at this point wyze hasn’t been forthcoming who’s what all the manufacturer specific clusters are sending so it will take some time before it is all decoded and usable. Not sure how night of a priority it is for the zha devs. (Or z2m or deconz).

The more people who ask wyze for info the better. So far they have said they have no interest in implementing third party support. Despite the request just for information about the messages sent.

And I’m guessing after it’s added to HA, the Wyze app will stop to work?

It will partly work, when in range of bluetooth…

Can you help me connect the wyze lock to HA trough the tradfri gateway?

I don’t have Tradfri gateway, I use the ZHA integration in HA so no need for other zigbee hubs. The Tradfri gateway controls what can and can’t work with it.

I get it, but i’m a HA newbie… would do you believe I can connect it trough the tradfri gateway?

Unfortunately I don’t know enough about the tradfri gateway to know if it would work or not. I kind of doubt it. The device is only working in sort of an alpha stage with HA and ZHA now. Wyze is not sharing details on how it communicates fully.

1 Like

Looks like there is cluser info in the complience docs here. Maybe this is helpful.
https://zigbeealliance.org/zigbee_products/wyze-lock/

there is a quirk in development that works, however you have to customize the quirk per installation as the locks send data specific to each lock. Until there is a calibration step native in HA, the quirk will need to manually edited before it will work.

2 Likes

How’s your experience of ZHA and wyze lock so far? I’m looking for smart locks that integrate with HA.

I honestly do not have it in use. I’ve tested the quirk that I linked above and it works but has to be manually updated. I run HA Supervised so I have to had that quirk back every update which I have not done. The lock does stay online in my zigbee mesh, and I can trigger a lock/unlock without the quirk and it works consistently, it just does not report the the states.

1 Like

Thanks for the response. How do I manually install/update those ZHA quirks? I’m running HA container, didn’t find the instruction from the github page.

you have to get a command line inside the docker container. With HA Supervised, I use portainer, and am able to use that to get a command line. I put the quirk files in a directory in my config directory, then copy them over to the quirks folder.

in the HA docker container they are here: /usr/local/lib/python3.7/site-packages/zhaquirks/

For this quirk you have to turn on debug logging and and watch the logs then edit the quirk to match the responses your lock gives. It is far from straight forward, it has been a while since I worked with the dev and he helped me get it working.

2 Likes

Does this work for your purposes yall? it’s functional for me!

1 Like

I believe I understand what needs to be done to modify the quirk to get it working properly. What i’m confused about is how do you obtain the data that’s needed? Could you please shed some light on this for me? I’m guessing you need to use a sniffer or a logger of some sort but i have no clue how that works.

It’s been a long time since I did this, but you’ll want to install the quirk as is, then turn on debug logging for zigpy.

Trigger all the different states (manual lock/unlock, app lock/unlock, open/closed)

Do them all a few time the lock will send some long codes for each which should be in the logs. I believe the quirk will spit out some useful logging to help guide you to the values needed. I’ll try and double check later tonight.

Thanks, this was helpful but I must still be doing something wrong. Do i need to use zigbee2mqtt or something? Currently using ZHA and my logs are not spitting out anything that resembles the data above.

this is all ZHA.

After you install the quirk and turn on zigpy debug logging, you should see a message like this for each action:

2020-09-30 20:49:01 INFO (MainThread) [zigpy.zcl] [0xd946:1:0xfc00] Interesting attributes - 52: 236, 41: 142, 56: 119, 57: 170

these are the values that will go into the quirk - for my lock they match the Manually locked action:

(edited to make sure screenshot had the line numbers)

there is a section of the readme for zha_device_handlers that describes how to install the quirk that is not in the official release:

So i installed the quirk a while back using Portainer but i’m not getting the same kind of output in my logs when i use the lock. Not sure where I went wrong, here is what i’m seeing in my logs:

2020-09-30 21:08:14 DEBUG (MainThread) [zigpy.zcl] [0xec7e:1:0x0101] ZCL request 0x000a: [[Attribute(attrid=0, value=<TypeValue type=enum8, value=enum8.undefined_0x02>)]]
2020-09-30 21:08:14 DEBUG (MainThread) [zigpy.zcl] [0xec7e:1:0x0101] Attribute report received: lock_state=2
2020-09-30 21:08:14 DEBUG (MainThread) [homeassistant.components.zha.core.channels.base] [0xEC7E:1:0x0101]: Attribute report 'Door Lock'[lock_state] = LockState.Unlocked
2020-09-30 21:08:14 DEBUG (MainThread) [homeassistant.core] Bus:Handling <Event state_changed[L]: entity_id=lock.yunding_ford_075bb4fe_door_lock, old_state=<state lock.yunding_ford_075bb4fe_door_lock=locked; friendly_name=Yunding Ford 075bb4fe door_lock @ 2020-09-30T21:03:52.114109-04:00>, new_state=<state lock.yunding_ford_075bb4fe_door_lock=unlocked; friendly_name=Yunding Ford 075bb4fe door_lock @ 2020-09-30T21:08:14.102747-04:00>>
2020-09-30 21:08:14 DEBUG (MainThread) [zigpy_cc.zigbee.application] request (0xEC7E, 260, 257, 1, 1, 124, b'\x18|\x0b\n\x00', False, False)
2020-09-30 21:08:14 DEBUG (MainThread) [zigpy_cc.api] --> SREQ AF dataRequest tsn: 124 {'dstaddr': 60542, 'destendpoint': 1, 'srcendpoint': 1, 'clusterid': 257, 'transid': 124, 'options': 0, 'radius': 30, 'len': 5, 'data': b'\x18|\x0b\n\x00'}
2020-09-30 21:08:14 DEBUG (MainThread) [zigpy_cc.uart] Send: b'\xfe\x0f$\x01~\xec\x01\x01\x01\x01|\x00\x1e\x05\x18|\x0b\n\x00\xba'