question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Xiaomi/Honeywell smoke detector does not handle ALARM_2

See original GitHub issue

When testing my Xiaomi smoke detector I have discovered that ALARM_2 (zonestatus 2) is currently not handled by any of the IAS-related conververs. For the Xiaomi smoke detector the following code in fz.ias_smoke_alarm_1 is used:

const zoneStatus = msg.data.zonestatus;
return {
    smoke: (zoneStatus & 1) > 0,
    tamper: (zoneStatus & 1<<2) > 0,
    battery_low: (zoneStatus & 1<<3) > 0,
    supervision_reports: (zoneStatus & 1<<4) > 0,
    restore_reports: (zoneStatus & 1<<5) > 0,
    trouble: (zoneStatus & 1<<6) > 0,
    ac_status: (zoneStatus & 1<<7) > 0,
    test: (zoneStatus & 1<<8) > 0,
};

As you can see a zoneStatus of 1<<1 is not handled at all. The big question is how to handle this. DeCONZ for example triggers the alarm for both ALARM_1 and ALARM_2 and does not distinguish between the two (see https://github.com/dresden-elektronik/deconz-rest-plugin/blob/16bd742c6fd67154cc8110fee4d9515c75c0508e/ias_zone.cpp#L465). I think we could just copy that behavior. This would mean:

smoke: (zoneStatus & 1) > 0 || (zoneStatus & 1<<1) > 0,

@Koenkk Should we copy the deCONZ behavior or should we introduce an entirely new attribute for “ALARM_2”? I can send you a PR for the fz.ias_smoke_alarm_1 converter, as this is the one I can test. But basically all converters for IAS zones are affected by this and maybe you would like to fix them all at the same time.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
Koenkkcommented, Aug 12, 2021

@froogl test is fine.

1reaction
Koenkkcommented, Aug 10, 2021

Because not all properties are used for all devices, we only expose the one relevant for each device.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to Reset Mi / Mijia Honeywell Smart Smoke Detector
If you Mi / Mijia Honeywell Smrt Smoke Detector isn' t connecting to your hub, a simple reset might be all it needs....
Read more >
How to connect Xiaomi Honeywell smoke detector to ...
Start adding a Thing in your SmartThings hub app (the Classic one) and insert the battery. Within a few minutes the smoke detector...
Read more >
Mi/Honeywell Smoke Detector (review)
Once opened, the smoke alarm is the first thing you'll see. Underneath that is the provided CR123A battery, also known as a half-AA...
Read more >
A HomeKit Smoke Detector that Doesn't Break the Bank?
Mi Home – Honeywell Smart Smoke Detector ... As such, it may not be a certified smoke alarm for insurance purposes.
Read more >
Xiaomi Smoke Detector 2 Honeywell Sensor Fire Alarm ...
Please know: It is Bluetooth-compatibleversion , not Zigbee version , can't work with Zigbee , please know that!!!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found