Koenkk / zigbee2mqtt

Zigbee 🐝 to MQTT bridge 🌉, get rid of your proprietary Zigbee bridges 🔨
https://www.zigbee2mqtt.io
GNU General Public License v3.0
11.97k stars 1.67k forks source link

Aqara Pet Feeder sometimes loses its schedule when Z2M is restarted #21643

Open rccoleman opened 7 months ago

rccoleman commented 7 months ago

What happened?

I have 3 separate daily feeding times configured in the Aqara Pet Feeder (ZNCWWSQ01LM) through Z2M, and it seems like it sometimes loses its local schedule when I restart Z2M. This was also reported here: https://community.home-assistant.io/t/aqara-pet-feeder-in-z2mqtt-wrong-schedule-after-reboot/689354

As I wrote there, sometimes the schedule disappears in the Z2M UI, and then the schedule reappears if I switch between tabs and reload the page. I suspect that there may be a race condition that causes the initial configuration that Z2M performs at startup to sometimes send an empty schedule even when Z2M does appear to have the proper schedule based on the UI.

It's now in a state where I can't get it to feed automatically based on a schedule that I set regardless of whether I change or add a time and hit apply or force a reconfiguration. It just seems completely unreliable.

I can reliably trigger a feeding from the exposed "Feed" entity in HA, so I've now created an automation to ensure that meals are dispensed, but I can run any experiments that might help.

What did you expect to happen?

I expect the device to feed based on the schedule that I set in Z2M.

How to reproduce it (minimal and precise)

It's hard to say exactly what causes it, but it definitely seems related to restarting Z2M.

Zigbee2MQTT version

1.36.0-dev commit: 38ed953

Adapter firmware version

20221226

Adapter

Tubeszb USB ZStack adapter

Setup

Container installation

Debug log

log.txt

Klikini commented 7 months ago

This also happens to me, but I’m using a ConBee II.

rccoleman commented 7 months ago

I wonder if it's related to https://github.com/nurikk/zigbee2mqtt-frontend/issues/1939, which calls out a mismatch between the frontend and backend. I found that while trying to debug this issue and I noticed that I couldn't find the manuSpecificLumi cluster in the Dev Console for the Pet Feeder, but it was clearly listed in the cluster info tab.

j0n17 commented 4 months ago

Having maybe related issues of timeouts when trying to configure the schedule or toggle the LED state. (I'm using a Sonoff ZBDongle-E Dongle Plus)

dannytranlx commented 4 months ago

FWIW I have the same clock offset issue using the native Aqara G3 camera hub and the feeder. It often happens when I turn on and off the camera on a schedule. But if I leave it on, I had better experience. This could be hardware-related!