WYZE LOCK - Zigbee - Home Assistant - HassIO - HassOS - ZHA integration - Working as expected - remove cloud control

odd… app actually has a little bit higher. but the one HA starts at 100 and works it’s way down over time

I guess I will see what happens as the battery level is drained over the next couple months.

Since I have the Door Open/Close and Lock lock/unlock status’ working and as @mzelmanovich mentioned the LED turns to Red when the battery is low I’ll leave this part of Home Assistant alone for a bit :smile:

Its been a month and no change. I guess I will wait and see!

Now if I didn’t have to copy the files over every time I upgraded. That would also be rad.

I’ve never installed any of them quirk stuff. Just set it up and ran with it

Hi all, I’ve been banging my head on this and can’t figure it out. Do I need to do something specific with clusters? It seems in the modified code the WyzeLock calls the WyzeCluster as an endpoint, and the WyzeCluster is where the “Interesting attributes” log call is made. No matter what I do, including forcing some _LOGGER entries, nothing is ever hit except the __init__ call.

To be specific, if I add this (see last line), nothing happens:

class WyzeCluster(CustomCluster, Basic):
    """Wyze manufacturer specific cluster implementation."""

    cluster_id = WYZE_CLUSTER_ID
    ep_attribute = "wyze_lock_cluster"
    attributes = {}   
    server_commands = {}
    client_commands = {}

    def handle_message(self, hdr, args):
        _LOGGER.warning("MINE: WyzeCluster handle_message")

Also, if I add some logger statements to the init functions for both DoorLockCluster and MotionCluster those messages do show up in the logs when I start the container.

I have also tried clearing the __pycache__ folder in the quirk, and it does rebuild on restart.

EDIT
I have confirmed that the handle_message routine seems to run on the hour as others have reported, but not on an actual event such as manually unlocking.

I have also confirmed that handle_message in /usr/local/lib/python3.8/site-packages/zigpy/zcl/__init__.py does appear to run when I lock/unlock from HA, but does not run for manual events or to show an open door.

Hi! Did you find anything new ?

I also try to find the “Interesting attributes” in the log files. But I can’t see anything.

For now, I can lock/unlock from HA. But if I lock/unlock manually, it doesn’t register in HA and I can’t see any log data to adjust my quirk’s “lock.py”.

For information I’m using Nortek’s USB dongle (husbzb), which HA detected flawlessly.

2 Likes

If anyone else is having an issue with this custom quirk not working anymore, try this small change.

class WyzeCluster(CustomCluster, Basic):
    """Wyze manufacturer specific cluster implementation."""

    cluster_id = WYZE_CLUSTER_ID
    ep_attribute = "wyze_lock_cluster"
    attributes = {}
    server_commands = {}
    client_commands = {}

    def handle_message(self, hdr, args, dst_addressing):
1 Like

Wanted to make clear what the fix by @the_upmachine is and why it works. Zigpy 0.32.0 added dst_addressing to the params for the handle_message method. Zigpy will fail calling this method because it will provide an extra param that what was defined. Adding dst_addressing to the method is all that is needed to fix this. No need to modify anything else within the class.

See https://github.com/zigpy/zigpy/releases/tag/0.32.0 for changelog where this was introduced.

Thanks @paisitw uddy on discord for helping me confirm!

I also can’t find it. I’ve enabled all the listed logging files and tried the method of viewing the logs in zha.

I see some sort of event when I do this but they do not look like the format you say. I do not even see those same numbers.

Hello
First of all try connect and calibrate the lock with original wyze wifi hub that comes with wyze lock

Oh man I can’t believe how many of you are trying to use my experiment :slight_smile: I’ll try to update that branch this weekend to get it functional again.

1 Like

Any luck with updating your branch?

I’m also unable to see the “Interesting attributes” line in the log files. Also using the husbzb-1 dongle. Thinking this dongle displays debug info differently then other zigbee dongles. Closest line I see is “2021-04-10 13:30:28 DEBUG (MainThread) [zigpy.zcl] [0xe87f:1:0xfc00] ZCL deserialize:…”

Edit: Forget what I sayed above I was able to get the logs to display the proper info. Could someone provide the code for the lovelace card they are using?

it has been rebased now

1 Like

Can you link it? I don’t see wyze in zha-device-handlers

Thanks for sharing. Have we confirmed battery info is only available via bluetooth? Nothing i use seems to show it correctly within HA

Still trying to figure out how to setup anything other then lock and unlock. I’m fairly new to this so having to learn as I go.

Sorry for dummy question, but what “rebased” means ?

I’m currently using it, kinda works, but have lots of issues with it too. :slight_smile: