Page 1 of 1

Xiaomi BLE temperature & humidity sensor

Posted: Saturday 27 January 2018 18:09
by freibeuter
Hi guys!

Just started using Domoticz and trying to make my home a bit smarter 8-)
That´s why a bought a couple of Xiaomi´s new cheap temperature and humidity sensors that transfer data via BLE (see http://cleargrass.com/). As a newbie it took me about half a day setting up a python script reading temperature, humidity and battery values from sensor and pass it to Domoticz via JSON URL (if someone else needs it, how can I make it public?). So far so good. I set up a dummy hardware in Domoticz and added my sensors as devices of type "Temp + Humidity". In the devices view I can see data is populated correctly, diagramms are showing history - great!
However when I switch to the temperature section in domoticz, I only see the sensors, but no data directly on those widgets (see attached image).
Am I doing something wrong?
Also I marked them as favorites as you can see when looking at the stars but I can´t see them in the dashboard overview :?:

Thanks for helping!!
BR,
Alex

Re: Xiaomi BLE temperature & humidity sensor

Posted: Sunday 28 January 2018 11:20
by freibeuter
Decided to publish code on GitHub: https://github.com/fr31b3u73r/miThermoHygro
Feel free to test and give me feedback!

Update: Issue is fixed in newest version of script (missed stripping out non Ascii value from received package) - thanks to @PaulFen for pointing it out here: viewtopic.php?f=56&t=20925

Re: Xiaomi BLE temperature & humidity sensor

Posted: Wednesday 07 February 2018 16:54
by Slokoavac
Cool man! Tnx for script! I am still waiting for it's price to come down and buy one or 2 of em. Still more affordable to use Xiaomi zigbee thermo/hydro meters (8-9$ each) and easier to use with zigbee GW (tho which is 26$) straight to domoticz oob. But that BLE one looks cool too :)

can you pair it with mi home app and BLE on Raspi at same time? Does it allows multiple pairings?


cheers!

Re: Xiaomi BLE temperature & humidity sensor

Posted: Sunday 11 March 2018 12:06
by Chakkie
freibeuter wrote:
Sunday 28 January 2018 11:20
Decided to publish code on GitHub: https://github.com/fr31b3u73r/miThermoHygro
Feel free to test and give me feedback!

Update: Issue is fixed in newest version of script (missed stripping out non Ascii value from received package) - thanks to @PaulFen for pointing it out here: viewtopic.php?f=56&t=20925
Hi freibeuter

Your script works perfectly but unfortunately I am only able to get the data from the device when the device is in paring mode. So basically I need to press and hold the paring button at the back of the device everytime otherwise I won't get the data readout. Do you know what's the issue here.

My raspberry Pi is still on Wheezy and may be that's the problem

thanks