deconz-rest-plugin icon indicating copy to clipboard operation
deconz-rest-plugin copied to clipboard

Xiaomi Mijia (HonneyWell) smoke detector self test and sensitivity

Open alahdal opened this issue 5 years ago • 33 comments
trafficstars

Feature request type

As discussed here It would be awesome to have the following possibilities in the smoke detector via the rest API or any other way (I am not expert):

  • Test the smoke detector.
  • Trigger the siren. This is good, in case one of the detector is triggered I can send the trigger to others.
  • Change the sensitivity.

For information, I am connecting all smoke detector with OpenHAB.

Description

Considered alternatives

Additional context

alahdal avatar Jun 16 '20 08:06 alahdal

Thanks. I need the sensor connected to deconz. First of all, a screenshot from deconz GUI where the node clusters have been expanded would help.

Secondly, I require deconz' debug output to have a look at the "special" communication. For that, run deconz with --dbg-info=2 > xiaomi_debug to collect that info and save it in a file. Let it run for about a hour and then share it here, please.

It would also be a great help if would could compile the plugin yourself (if required at all) and exchange some files in your setup (nothing serious). By that, we can properly test it.

SwoopX avatar Jun 16 '20 08:06 SwoopX

@SwoopX Sorry, this is my first debug. What is the full command line to get the debug?

alahdal avatar Jun 16 '20 13:06 alahdal

@alahdal I hope you don't run HA

/usr/bin/deCONZ --dbg-info=2 > xiaomi_debug

SwoopX avatar Jun 16 '20 13:06 SwoopX

@SwoopX The log is being produced, I can read some familiar data

I cannot share the screenshot, because deCONZ GUI is not able to connect to RaspBee. I tried to fix the problem via sudo systemctl stop deconz udo systemctl disable deconz sudo systemctl start deconz-gui

still no luck.

I am not familiar with the third request (plugin)

alahdal avatar Jun 16 '20 15:06 alahdal

@SwoopX here is the log: https://justpaste.it/1qvhb

alahdal avatar Jun 16 '20 17:06 alahdal

I can provide screenshots, hope it helps (not all data seems to be provided by the sensor, e.g. it seems to be reporting to be mains powered though its battery powered): Screenshot 2020-06-16 at 21 29 10 Screenshot 2020-06-16 at 21 29 03 Screenshot 2020-06-16 at 21 28 57 Screenshot 2020-06-16 at 21 28 51 Screenshot 2020-06-16 at 21 28 44 Screenshot 2020-06-16 at 21 28 37 Screenshot 2020-06-16 at 21 28 28

peer69 avatar Jun 16 '20 19:06 peer69

Thanks guys. @peer69 your're the man. Now one more screenshot from the node with the clusters extended and all is well.

Checking the log now.

SwoopX avatar Jun 16 '20 19:06 SwoopX

@alahdal I'm afraid that data is completely useless. Deconz hasn't connected to your Conbee/Raspbee (as you already mentioned). What have you done there? :)

SwoopX avatar Jun 16 '20 20:06 SwoopX

Thanks guys. @peer69 your're the man. Now one more screenshot from the node with the clusters extended and all is well.

Checking the log now.

Screenshot 2020-06-16 at 22 11 52 Thats what you meant?

peer69 avatar Jun 16 '20 20:06 peer69

Indeed, thanks!

SwoopX avatar Jun 16 '20 20:06 SwoopX

@SwoopX I was not helpful :). I don't know what is exactly the problem, I have made a clean install of Raspberry and deCONZ, still I cannot run deCONZ from the start menu. After several trials, I found that I should stop the service then start deCONZ via command line only. Yet, I am not able to see the same details as provided by @peer69.

Sorry again.

alahdal avatar Jun 17 '20 17:06 alahdal

@alahdal it's ok, just wanted to mention that there was something wrong with your setup. Probably it tried to start a 2nd time. So first a sudo systemctl stop deconz-gui and then start it again as previously stated. I assume that already does the trick.

SwoopX avatar Jun 17 '20 17:06 SwoopX

@SwoopX I believe now every thing is working fine. At least I can see names, accurate last seen status , etc. Before was nothing. Thank you for your concern.

Screen Shot 2020-06-17 at 11 41 57 PM

alahdal avatar Jun 17 '20 20:06 alahdal

Let me know if you need assistance, like testing/debugging/etc. Any news already 😎? I have got a bunch of these smoke detectors and these extra features would absolutely be great.

DaveRuijter avatar Jun 21 '20 21:06 DaveRuijter

Let me know if you need assistance, like testing/debugging/etc. Any news already 😎? I have got a bunch of these smoke detectors and these extra features would absolutely be great.

You may join here

alahdal avatar Jun 21 '20 21:06 alahdal

Let's please keep the devices seperated.

@DaveRuijter You may read up from here https://github.com/dresden-elektronik/deconz-rest-plugin/issues/1182#issuecomment-647119622 as this also pertains the smoke sensors.

SwoopX avatar Jun 21 '20 22:06 SwoopX

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Jul 13 '20 01:07 stale[bot]

I'm somehow dropped out of the thread... When setting sensitivity will be available in rest-api?

andriej avatar Jul 24 '20 15:07 andriej

@SwoopX, I've ordered a few of these, let me know if any more details are needed to make this fully featured in the rest-api.

sveip avatar Aug 02 '20 11:08 sveip

@SwoopX the current deconz version (2.05.88) does not support sensitivity or selftest features. the sensor i own (JTYJ-GD-01LM/BW) supports:

{ "config": { "battery": 100, "on": true, "pending": [], "reachable": true, "temperature": 2900 }, "ep": 1, "etag": "c94ec440826fcfecaa19376a71df9b33", "lastseen": "2020-11-18T16:17Z", "manufacturername": "LUMI", "modelid": "lumi.sensor_smoke", "name": "Smoke Sensor", "state": { "fire": false, "lastupdated": "2020-11-18T16:17:55.365", "lowbattery": false, "tampered": false }, "swversion": "20170314", "type": "ZHAFire", "uniqueid": "00:15:8d:00:04:1d:8f:5e-01-0500" }

leonardpitzu avatar Nov 18 '20 16:11 leonardpitzu

Repopening the issue since self test and sensitivity aren't working yet.

Currently I'm testing the device here, basic smoke detection works with same output as yours, also same swversion.

English manual: https://files.xiaomi-mi.com/files/MiJia_Honeywell/MiJia_Honeywell_Smoke_Detector_EN.pdf

In zigbee2mqtt there is code to trigger the self test: https://github.com/Koenkk/zigbee2mqtt/issues/420#issuecomment-496949545

Self test

Write attribute 0xfff1 uint32 --> value 50397184 with Lumi manufacturer code 0x115f.

I had to change a bit of code to let deCONZ pickup the proper attributes in the Cluster Info panel. After that I could send the special value to the device, and it started beeping. Seems to work.

The attribute is write only can't be read back.

image

However I'm not sure yet how to integrate that properly into the plugin and REST-API. Timing is crucial, the device is awake every 15 seconds, which could lead to packages being lost since these get thrown away by routers when they can't be delivered within 7 seconds. ... tricky.

Sensitivity

This seems to be attribute 0xfff0 with uint64 data type and also Lumi manufacturer code 0x115f. Note in general.xml we have uint32 as data type for this attribute?! But that is auto corrected by deCONZ on reading the attribute.

Reading it brings:

image

I have no clue yet which values are supported.

manup avatar Nov 22 '20 20:11 manup

Hey boss, this is what I had to work with (and also no device)

This should similarly apply to lumi.sensor_natgas as well.

grafik

SwoopX avatar Nov 22 '20 20:11 SwoopX

The sensitivity low, medium and high values in the snipped are interesting, seems that the 0xfff1 attribute is used for multiple purposes, like a command invocation.

I did some tests:

/// 0xfff1 values / commands
0x030100000   self test
0x040100000   low sensitivity
0x040200000   medium sensitivity
0x040300000   high sensitivity

// 0xfff0 values
0x0102000011010001   // initial value
0x0102000011010000   // after writing sensitivity low
0x0102000011010000   // after writing sensitivity medium
0x0102000011010000   // after writing sensitivity high

Seems currently we don't have a way to verify and read back the actual sensitivity, or perhaps it is reported in the Xiaomi hourly special attribute.

manup avatar Nov 22 '20 21:11 manup

Smoke density is part of the special report. Have forgotten to add it to the wiki, and now I cannot find it anymore...

Regardless, that's what I found on the reporting. Note that JTYJGD01LMBW seems to be the smoke detector, the other one the gas detector.

If 0x030100000 is self test on, how about 0x030000000 for self test off (in case that's even required/desired)?

grafik

SwoopX avatar Nov 22 '20 22:11 SwoopX

Timing is crucial, the device is awake every 15 seconds

Is it possible to re-transmit three times with 5 sec. interval?

tsat-psv avatar Nov 23 '20 07:11 tsat-psv

Happy Chrismas at all 🎄

How is the status of sensitivity and controlling the sirene?

nukleuz80 avatar Dec 25 '20 21:12 nukleuz80

Any news guys? Thanks

MacJawa avatar Jan 23 '21 10:01 MacJawa

i have 12 of these working right now and changing sensivity and trigger the sirene would be a great addition 💪

slcr avatar Feb 11 '21 13:02 slcr

Hi team, same story here, would be a really nice addition! Thanks

Jafalex avatar Jul 16 '21 02:07 Jafalex

Yes, this would be really great. I am planning on buying some of these. Are there any other smoke detectors with self-test / siren already working that you'd recommend instead?

Prior99 avatar Jul 27 '21 08:07 Prior99