Skip to content

How do I add the Xiaomi Leak Sensor? #828

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

Closed
SebSemmi opened this issue Oct 4, 2018 · 28 comments
Closed

How do I add the Xiaomi Leak Sensor? #828

SebSemmi opened this issue Oct 4, 2018 · 28 comments
Labels

Comments

@SebSemmi
Copy link

SebSemmi commented Oct 4, 2018

I can't add this sensor in the Phoscon App.

@manup
Copy link
Member

manup commented Oct 4, 2018

The leak sensor is currently only visible in the REST-API.
It can be added by using Phoscon App > Menu > Settings > Sensors > Add Sensor > Other

@SebSemmi
Copy link
Author

SebSemmi commented Oct 4, 2018

Is there a reliable to pair the sensor? I couldn’t find one

@manup
Copy link
Member

manup commented Oct 4, 2018

For most Xiaomi sensors, while sensor search is running, you need to press a button until a LED flashes.
Also please make sure to use the latest version of deCONZ.

@Alexxander0
Copy link

Alexxander0 commented Oct 11, 2018

Did you made any progress? I have the same problem, cant pair my new ones and other ppl have the same problem #822 (comment)

@SebSemmi
Copy link
Author

Nope, can't get it to pair. I tried everything I could find

@ebaauw
Copy link
Collaborator

ebaauw commented Oct 11, 2018

Note that you need to squeeze the sensor quite hard for pressing the reset "button". It took me some time to figure that out. Even then, Xiaomi devices are notoriously difficult to pair.

Try the following:

  1. Power down all your ZigBee routers (lights), and bring the sensor within range of the RaspBee/ConBee (to force a direct connection to the sensor instead of over the mesh network);
  2. Search for new devices from the Phoscon app. Make sure to allow for enough time (10 min);
  3. Squeeze the sensor for 10 seconds, until the light starts to blink - this should reset the sensor;
  4. Wait for the sensor to stop blinking and appear in the deCONZ GUI (check the Node List panel for a new record - sometimes the node is hard to find because it's overlapping with an existing node);
  5. Start briefly squeezing the sensor every 2 seconds or so (to keep it awake) - this should populate the clusters if not already present;
  6. Open the Cluster Info panel and select the sensor's Basic cluster. Read the attributes, while continuing to squeeze the sensor every two seconds or so;
  7. When the attributes are read (notably the Model Id), the REST resource is created.

@Webserve
Copy link

I have the same problem. @ebaauw your solution didn't work. Other sensors from aqara are working fine.

@ebaauw
Copy link
Collaborator

ebaauw commented Oct 14, 2018

No node in the GUI? Did you check the sensor’s battery? How many end devices are already connected to the RaspBee/ConBee? What version of deCONZ and what firmware are you using?

@Webserve
Copy link

i'm not using the GUI. Only PWA.

A few months back i paired this sensor. Last week i deleted it by accident but now i cannot pair it anymore.

Battery is OK just to be sure i places a new battery.
I got 20 other aqara / ikea sensors just working fine.

Raspbee
Version 2.05.40 / 8-10-2018
Firmware 26240500

@SebSemmi
Copy link
Author

I have exactly the same setup.

@ebaauw
Copy link
Collaborator

ebaauw commented Oct 15, 2018

i'm not using the GUI. Only PWA.
your solution didn't work

You didn't try my solution.

@Uakkauakkafo
Copy link

I have the same problem, the sensor water leak appear in the deCONZ as node 0x6666, but I'm not able to see it in the GUI of PHOSCOM and also I'm not able to find it with Postman application.
With Postman, I see all the sensor as REST object (and I can use in Home Assistant), the sensor water leak not appear.
here the screenshot of the deCONZ node

image

@manup
Copy link
Member

manup commented Oct 22, 2018

This doesn't look right, 0x1135 is the manufacturer code of dresden elektronik.

Did you pair it via Phoscon App and the solution described by @ebaauw ?

@ebaauw
Copy link
Collaborator

ebaauw commented Oct 22, 2018

Sharp. Mine's got manufacturer code 0x1037 and different values for the sizes (see below). The screen shot above looks like a combination of the RaspBee and leak sensor values. Let's hope it's just the GUI that's confused.

screenshot 2018-10-22 at 22 42

@manup
Copy link
Member

manup commented Oct 22, 2018

I guess the wrong node descriptor is just a glitch in the deCONZ gui (I need to check how this could happen).

To refresh node descriptor or power descriptor manually — since deCONZ 2.05.42 the not so pretty buttons in the node config dropdown can be used to query the descriptors.

image

Note: it best works to press the button and then wake up the device within the next 7 seconds (afterwards most routers including RaspBee/ConBee will drop the message if the end device didn't poll).

@ebaauw
Copy link
Collaborator

ebaauw commented Oct 22, 2018

Cool, finally being able to read the power descriptor! And the GUI once again displays the battery symbol after doing so!

@manup
Copy link
Member

manup commented Oct 22, 2018

Yep but be aware it's often implemented poorly, I did some tests which I'll put in the Wiki soon. Ikea end-devices for example claim that they are mains powered :)

@ebaauw
Copy link
Collaborator

ebaauw commented Oct 22, 2018

Looks like the battery symbol always shows full capacity?

@manup
Copy link
Member

manup commented Oct 23, 2018

Could be, the Climax sensors for example always show 66%, I don't really trust the power descriptor as battery state indicator, it might work for some devices, but we need more data to verify.

I think the power configuration cluster and IAS Zone state are the most reliable sources for battery state.

@Uakkauakkafo
Copy link

So you mean that with the version 2.05.42 I should be able to view correctly the leak sensor?

@eryckm
Copy link

eryckm commented Oct 24, 2018

I don't know if anyone here got the same issues but my sensors sometimes detect a leak around the same time and they keep showing as "wet" until I pick them up, put them under water and then dry them up. It takes a couple of weeks for that to happen. I updated to the latest version of ConBee (both adapter and app) to see if that will stop happening.

@theGurk
Copy link

theGurk commented Oct 24, 2018

Note that you need to squeeze the sensor quite hard for pressing the reset "button". It took me some time to figure that out. Even then, Xiaomi devices are notoriously difficult to pair.

Try the following:

  1. Power down all your ZigBee routers (lights), and bring the sensor within range of the RaspBee/ConBee (to force a direct connection to the sensor instead of over the mesh network);
  2. Search for new devices from the Phoscon app. Make sure to allow for enough time (10 min);
  3. Squeeze the sensor for 10 seconds, until the light starts to blink - this should reset the sensor;
  4. Wait for the sensor to stop blinking and appear in the deCONZ GUI (check the Node List panel for a new record - sometimes the node is hard to find because it's overlapping with an existing node);
  5. Start briefly squeezing the sensor every 2 seconds or so (to keep it awake) - this should populate the clusters if not already present;
  6. Open the Cluster Info panel and select the sensor's Basic cluster. Read the attributes, while continuing to squeeze the sensor every two seconds or so;
  7. When the attributes are read (notably the Model Id), the REST resource is created.

Hi @ebaauw,
I am running hass.io (HassOS) on a rpi and have some difficulties to add the leak sensor.
I had to change rpi due to the earlier was malfunction. I have a ConBee connected to the rpi but have trouble to add the leaksensors now.

I have had all three added earlier but now I only get one to get connected. When I use Postman to check I can only find that one and not the other ones.

I am using the phoscon app and do not have the deCONZ GUI available. Since I have the uniqueId for the other two I tried to POST-request them using Postman but only get an error message:

[
{
"error": {
"address": "/sensors",
"description": "Not allowed to create sensor type",
"type": 501
}
}
]

My POST request looks like this:
{
"config": {
"battery": 100
"on": true
"reachable": true
"temperature": 2500
}
"manufacturername": "LUMI"
"modelid": "lumi.sensor_wleak.aq2"
"name": "leak2"
"swversion": "3000-0001"
"state": {
"lastupdated": "2018-10-23T20:51:51",
"lowbattery": false,
"tampered": false,
"water": false
},
"type": "ZHAWater"
"uniqueid": "00:15:8d:00:02:11:b2:a2-01-0500"
}

ConBee stick:
Version 2.05.42 / 21/10/2018
Firmware 26190500

(Edit: upgrade the stick to the above version but still not success)

Do you have any suggestions?

@rsokolowski
Copy link

I have the same problem - can't add Xiaomi Leak Sensor. I already have 2 of them paired while ago (3rd went crazy reporting false leaks).
I've tried suggestion from @ebaauw but it didn't work.
I'm adding from PWA:
Vendor dresden elektronik
Product ConBee
Version 2.05.42 / 21.10.2018
Firmware 261F0500

The only relevant message that shows up in deconz logs during pairing process is:
[3.1] get IAS Zone type for 0x00158d00023a6415

@Uakkauakkafo
Copy link

I tried your steps suggestion but i fail, i'm not able

@bloody2k
Copy link

I have the same problem - can't add Xiaomi Leak Sensor. I already have 2 of them paired while ago (3rd went crazy reporting false leaks).
I've tried suggestion from @ebaauw but it didn't work.
I'm adding from PWA:
Vendor dresden elektronik
Product ConBee
Version 2.05.42 / 21.10.2018
Firmware 261F0500

The only relevant message that shows up in deconz logs during pairing process is:
[3.1] get IAS Zone type for 0x00158d00023a6415

I'm have exact same problem trying to pair my water sensor

20:52:26:882 [3.1] get IAS Zone type for 0x00158d0002349a7c

@box99h
Copy link

box99h commented Nov 25, 2018

Having the same problem getting the sensors up and running.
What I have for now is, that I can see two of the leakage sensors in the GUI. Also some of the values are read in the basic cluster. Can someone help?

bildschirmfoto 2018-11-25 um 17 14 39

bildschirmfoto 2018-11-25 um 17 15 57

@ebaauw
Copy link
Collaborator

ebaauw commented Nov 25, 2018

@theGurk, you can only add CLIP sensors through the API. If the sensor was previously connected, you might be able to restore the resource by changing the deleted status in the database, if it’s still there. Be sure to shutdown deCONZ and make a backup.

@box99h if the sensors show in the GUI, you’re almost there. Just search for new devices in Phoscon, and re-read the Basic cluster from the GUI, while pressing/squeezing the sensor to wake it.

@bloody2k , @eryckm , if the sensor is giving false reports, best check the battery. These devices behave funny under low battery.

@ALL, it’s really tricky to get these paired, and without the deCONZ GUI you’re flying blind. The REST API will only create the resource, when:
a) the network is open (through the API, so search from Phoscon or add sensor from the old web app);
b) it receives a message from the sensor; and
c) it has the data needed to recognise the sensor: the Manufacturer ID from the Node info panel, the mac address prefix, and the Model Identifier from the Basic cluster.

If you see the IAS zone message, you know the sensor has joined the network, but not whether the data has been read. Without the GUI there’s no way to force reading the data, so your only hope is to reset the sensor and try again, hoping this time it remains awake and keeps polling its parent while the REST API tries to get the data.

@stale
Copy link

stale bot commented Mar 25, 2019

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 stale bot added the stale label Mar 25, 2019
@stale stale bot closed this as completed Apr 1, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests