Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Xiaomi MiJia Honeywell smoke detector Selftest works every 2nd attempt #2287

Closed
kovaga opened this issue Nov 7, 2019 · 1 comment
Closed

Comments

@kovaga
Copy link

kovaga commented Nov 7, 2019

Having followed the "Xiaomi MiJia Honeywell smoke detector as a alarm Sierene" #420
I have updated zigbee2mqtt to latest-dev and cloned the latest shepherd.

When I first time issue a command

*# -t zigbee2mqtt/sens_smoke1/set -m '{"selftest": ""}'

I get a short siren response from the smoke alarm.

When i issue the exact same command 2nd time, I get not siren and the following in appears in the log file

error 2019-11-07T12:28:18: Publish 'set' 'selftest' to 'sens_smoke1' failed: 'Error: Data request failed with error: 'MAC transaction expired' (240)'
info 2019-11-07T12:28:18: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"zigbee_publish_error","message":"Publish 'set' 'selftest' to 'sens_smoke1' failed: 'Error: Data request failed with error: 'MAC transaction expired' (240)'","meta":{"friendly_name":"sens_smoke1"}}'

Then 3rd time the command is send, the siren sounds, 4th time same erro message in the logs.
and it goes on in circle.

It seems that if I increase interval between sending selftest commands to 60+ sec the error does not appear.
btw, the same error appears when setting sensitivity.

Koenkk added a commit to Koenkk/zigbee-herdsman-converters that referenced this issue Nov 7, 2019
@Koenkk
Copy link
Owner

Koenkk commented Nov 7, 2019

Fixed in the latest dev branch.

Background information
When doing this via the Xiaomi app it shows a timer of 30 seconds. My guess is that the device only wakes up every 30 seconds in order to save battery. This means that after executing the command it will happen anytime between now and 30 seconds. The current zigbee2mqtt timeout is 10 seconds, meaning that sometimes this device will be awake, sometimes not. I've fixed this by using a timeout of 35 seconds just to be sure.

@Koenkk Koenkk closed this as completed Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants