dresden-elektronik / deconz-rest-plugin

deCONZ REST-API plugin to control ZigBee devices
BSD 3-Clause "New" or "Revised" License
1.89k stars 498 forks source link

Xiaomi Mijia (HonneyWell) gas detector #1182

Closed AdamWeglarz closed 4 years ago

AdamWeglarz commented 5 years ago

Hi,

I have also Xiaomi Mijia (HonneyWell) gas detector. It connects without any issue to Xiaomi Gateway so it work correctly. It does not connect at all to Deconz zigbee. It is not visible in Deconz graphical interface (In oposite to Xiaomi smoke sensor, which is visible in Deconz app). How I can help to diagnoze issue?

Adam

SwoopX commented 4 years ago

Yes, but if I understand this correctly, it should work for both, smoke and gas. I'm not in front of my desktop to double check, but at least both attributes are offered. Did sesnitivity succeed in reading? If yes, can you share the screenshot?

From what I've read, those devices are deep sleepers, waking up only every 30 secs. So you might try a bit for reading. The node should blink blue/green when ready...

alahdal commented 4 years ago

I tried to read from another sensor that is close to the RaspBee system (I thought maybe with better connection I may get different results), I got different error:

Screen Shot 2020-06-21 at 6 34 11 PM Screen Shot 2020-06-21 at 6 34 37 PM

Moreover, I tried reading other basic attributes all gives the same error (reading failed), maybe something wrong with my setup?

alahdal commented 4 years ago

Here is a log xiaomi_debug2.txt

alahdal commented 4 years ago

I restarted deCONZ with sudo, however, it showed all nodes without names and does not show all clusters. I will leave it for sometime and check again, I noticed the clusters are shown gradually.

Why I run as sudo? I noticed that I can read the cluster info when it is run as sudo.

If you think I am doing something wrong, please interrupt.

alahdal commented 4 years ago

I have stopped deCONZ and restarted without sudo, when I tried to read attribute in basic cluster info, it worked without problem. However, for the new two new attributes, I am still getting the error shared in the last screenshot either for read or write.

SwoopX commented 4 years ago

Hm, maybe the 2 attributes are not required to be manufacturer specific. The additions to general.xml were the following

<attribute-set id="0xf000" description="Xiaomi specific" mfcode="0x1037">
    <attribute id="0xfff0" name="Sensitivity" type="u32" access="r" required="o" mfcode="0x1037"></attribute>
    <attribute id="0xfff1" name="Selftest/Density" type="u32" access="rw" required="o" mfcode="0x1037"></attribute>
</attribute-set>

You could try removing this part for the data above mfcode="0x1037" (before copying the file over) to see if that changes anything.

Btw, if you pull my repo now, support for the gas sensor is included.

alahdal commented 4 years ago

@SwoopX after removing (mfcode="0x1037") from above data, I get "unsupported attribute" error.

Screen Shot 2020-06-22 at 9 04 24 AM

I believe the Gas Sensor is connected now, and I could read some of its attributes. However, the item does not appear in the REST API nor discovered by Phoscon.

Screen Shot 2020-06-22 at 9 26 20 AM
SwoopX commented 4 years ago

@alahdal Please leave the Sensitivityattribute for further tests. Have you tried to write any of the low/medium/high values yet to Selftest/density yet? If not, please do so (with and without the mfcode in general.xml). You can also test the selftest value if you're brave.

For the gas sensor to work, you need to compile my repo. Instructions are in the readme.

alahdal commented 4 years ago

@SwoopX when I remove the mfcode, both attributes are not supported, hence, I cannot read or write. With the mfcode, I get the error shared earlier here where I read/write.

DaveRuijter commented 4 years ago

Hi! I'm wondering about the status of this development 🤗. @SwoopX can you share what is going on? I can't wait to try this capability in Home Assistant (for the smoke detectors!). Thanks!

AdamWeglarz commented 4 years ago

Hi! I'm wondering about the status of this development . @SwoopX can you share what is going on? I can't wait to try this capability in Home Assistant (for the smoke detectors!). Thanks!

Smoke sensor is working with rest api even though it is not visible in phoscon

DaveRuijter commented 4 years ago

Yes, and I'm aware of that 👍 . But this extra development is about having a trigger for the alarm test functionality and support for more sensors (actually the related issue is about that, but they are a combined effort with the gas detector if I understand it correct).

Mimiix commented 4 years ago

@DaveRuijter Is this something you want in Phoscon?

SwoopX commented 4 years ago

@Mimiix Slow down ;)

It either doesn't work or hasn't been tested correctly. z2m has a 30 sec delay with that. Anyway, should be able to be easily tested as mentioned above.

alahdal commented 4 years ago

@SwoopX I made a clean install and I am going to try again :) and compile your repo

alahdal commented 4 years ago

For the gas sensor to work, you need to compile my repo. Instructions are in the readme.

I compiled your plugin and now the Gas Sensor appears in the Rest API, very cool.

Tell me what do you want next for both the Gas and the Smoke.

L3H0 commented 4 years ago

On the latest beta, sensor visible in VNC. In Home Assistant too. Adnotacja 2020-07-24 115211

alahdal commented 4 years ago

Yes with @SwoopX plugin, I have the gas sensor visible in OpenHAB and tested working fine.

SwoopX commented 4 years ago

Closing this one as support has been provided with version .79.

mwegener-com commented 4 years ago

Any news on support for this device?

SwoopX commented 4 years ago

What else would you expect?

leonardpitzu commented 3 years ago

a nice addition would be to add a toggle exposed also in HA in order to manually trigger the siren. currently in HA only a sensor is exposed

SAOPP commented 3 years ago

Guys, as far as I understand, you can already buy this device?

SAOPP commented 3 years ago

So guys, it's not possible to set sensitivity at this sensor via gui?

SAOPP commented 3 years ago

a nice addition would be to add a toggle exposed also in HA in order to manually trigger the siren. currently in HA only a sensor is exposed

Btw, I got gas sensor, tamper and temperature:

image

SAOPP commented 3 years ago

Really, it would not be bad to adjust the sensitivity through the HA. That would be great.