Page 1 of 1

ESP32 with Tasmota Bluetooth vs Xiaomi BLE Sensors

Posted: Thursday 13 January 2022 8:02
by Janaboy
Dear All,

I hope this is the good topic.
I have an ESP32 with Tasmota installed and as i turned on the BLE, it is immediately showing my 2 Xiaomi BLE sensors data, however i don't know how can i add this information properly to Domoticz.
I can see that data is advertised as mqtt topic, but couldn't figure out after a couple of hours how to make this visible in Domoticz as sensor.

Code: Select all

MQT: tele/tasmota_05999C/SENSOR = {"Time":"2022-01-13T07:59:00","LYWSD028xxx":{"mac":"3f59c880xxxx","Temperature":24.2,"Humidity":42.0,"DewPoint":10.5,"Battery":35,"RSSI":-74},"LYWSD027xxxx":{"mac":"3f59c872xxxx","Temperature":24.4,"Humidity":44.0,"DewPoint":11.3,"Battery":27,"RSSI":-91}} (retained)
Anybody has any idea how this can be solved?

Thank you in advance
Janaboy

Re: ESP32 with Tasmota Bluetooth vs Xiaomi BLE Sensors

Posted: Monday 17 January 2022 14:27
by Janaboy
Maybe for later reference if others would like to solve it.

It is possible to solve it with Rules in Tasmota, example:

Code: Select all

Rule2
  ON LYWSD02720cef#temperature DO var1 %value% ENDON
  ON LYWSD02720cef#battery DO var2 %value% ENDON
  ON LYWSD02720cef#rssi DO var3 %value% ENDON
  ON LYWSD02720cef#humidity DO publish domoticz/in {"idx":1521,"dtype":"Temp + Humidity","nvalue":0,"svalue":"%var1%;%value%;1","RSSI":%var3%,"Battery":%var2%} ENDON
Mi32option6 has to be 0.

Re: ESP32 with Tasmota Bluetooth vs Xiaomi BLE Sensors

Posted: Sunday 26 February 2023 16:48
by Nautilus
Thanks a lot. I was able to add a couple atc1441 flashed Xiaomi BLE sensors with these rules to Domoticz. It says that ESP32 supports up to 9 connected BLE devices. If I interpret right, the ruleset used here takes over 50% of the space allocated to Rule and there are slots for three rules. So, with optimal use it would be possible to connect 5-6 sensors to Domoticz, is this correct assumption?

Re: ESP32 with Tasmota Bluetooth vs Xiaomi BLE Sensors

Posted: Tuesday 28 February 2023 22:34
by JeroenG
I'm using the script from https://github.com/erdose/xiaomi-mi-lywsd03mmc for about 1 year now without problems.

Just using a raspberry zero (or other) to read the data and send it directly to domoticz :D

Jeroen