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

Improved Xiaomi/Aqara water sensor detection. #2064

Merged
merged 1 commit into from Jan 14, 2018
Merged

Improved Xiaomi/Aqara water sensor detection. #2064

merged 1 commit into from Jan 14, 2018

Conversation

slydiman
Copy link
Contributor

No description provided.

@dannybloe dannybloe merged commit 992c531 into domoticz:development Jan 14, 2018
@remb0
Copy link

remb0 commented Jan 14, 2018

great work!!

@22nra
Copy link

22nra commented Feb 1, 2018

Thanks for the work on this but I have a small query.
I got one of these sensors a few week ago and discovered that when immersed in water they only send one reading when the state changes. The same happens when the sensor was dryed. A flood sensor is very useful but I would have expected the sensor to transmit regular readings especially when wet. Maybe my sensor has old firmware, has anyone else seen this or got a solution?

@slydiman
Copy link
Contributor Author

slydiman commented Feb 1, 2018

I have 3 water sensors and a lot of another Xiaomi devices (~30 total).
It is the expected behavior.
It looks like Xiaomi Gateway can request the state of all sensors.
Domoticz restarting causes reinitialization of Xiaomi Gateway and the system receives the current states.
Probably it is possible to implement an internal timer and regenerate the sensor report if it is in alarm state.
Note the minimal motion sensor period is 2 minutes. Xiaomi Gatawey generates 5 minutes and more reports itself. I woluld like 30 sec at least as Broadlink.
Which kind of the solution do you mean? A user scripts or Domoticz code changes?
I don't like the code of XiaomiGateway.cpp
It contains too much hard coded logics.
A lot of useful data is just lost. It is hard to add support for new devices.
The code is not flexible. It will just stop working if something will be changed in the firmware.
I don't see the battery level from the classic Xiaomi wireless button.
The classic Xiaomi temp/humidity sensor reports 3 devices - temp, humidity and temp + humidity.
The temp device reports always 100% level, 2 other report a reliable value.
The Aqara temp/humidity/pressure sensor resports 4 devices - temp, humidity, temp + humidity and pressure.
The temp device again reports always 100%, 3 other never report the battery level.
The battery level of light switch is always 110% :)

@22nra
Copy link

22nra commented Feb 1, 2018

Thanks for getting back to me so quickly and confirming this expected behavior. Have used these sensors for some time and noticed that they can sometimes (rarely) miss the odd reading. Sending one value when the state changes will extend battery life but makes this flood sensor a little risky. Great pity that we dont get a dry update every hour and if flood condition is triggered the update frequency is higher.
Have not tried Domoticz yet but from what you say it looks unreliable using these sensors :(

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

Successfully merging this pull request may close these issues.

None yet

4 participants