Xiaomi Mijia bluetooth temperature & humidity sensor compatibility

I am of the same opinion as you cannot see any wireless connectivity

Hi, Home Assistant has already the sensor miflora based on the same protocol. It should be straightforward to look difference between https://github.com/pFenners/mijia-sensor-domoticz/blob/master/README.md and https://github.com/Tristan79/miflora and migrate it from Domoticz to Home Assistant…

Hi mig,

How I can run this code ?

hi,
check out my implementation https://github.com/dolezsa/Xiaomi_Hygrothermo
suggestions are welcome.

4 Likes

Hi, I also created my implementation, that looks similar to MiFlora one, with the same parameters. This sensor is going to be used a lot, so somebody should create a Python library like https://github.com/open-homeautomation/miflora and use it in both HomeAssistant and Domoticz…There we will create a “standard”…Maybe this “open-homeautomation” guy should host it…I will write to him…

1 Like

Hi flavio20002, is there any chance to share your implementation of MiFlora for the HygroThermo sensor? Can’t get it to work…

Sure! It’s working perfectly with 2 sensors and with Raspberry Pi 3. Look at some graphs on Grafana.

4 Likes

Hi there!

Anyone knows its possible to access data using a Bluetooth gateway (like the Xiaomi bed lamp) instead of connecting directly to the sensor through Bluetooth?

Cheers!

I am running on a QNAP Docker, what other alternatives are there to integrate this?

@dolezsa would it still need a gateway ?
I would really like to use a couple of these, but I understand it needs a bluetooth gateway of some sort.

I don’t feel like buy the xiaomi lamp, is there anything else that can do it, or do I not need it at all (the bluetooth gateway that is)

Thanks for the help !

Regards
S

hi @STVE, all you need is any bluetooth le capable device (in my case, bt usb dongle).

How did you get this nice graph?

I have just added the sensor to HA and it’s working fine. But it fills my log with:

Update of sensor.mitemp_bt_temperature is taking over 10 seconds

Is it possible to get raid of this error?

Same here… tons of errors about this…

I’ve also gotten the sensor to work with Hass.IO on a Pi3, but the log is filled with errors (mainly update of sensor took more than 10 seconds).
However, I’m unable to log the data in an automation. states.sensor.<sensor name>.state provides me with nothing (not None, but just a blank string I think).

Hi, currently it is not possibile. The sensor timeout can’t be set at configuration level, but will be in future

Hi! I’ts really easy, but you have to set up InfluxDb and Grafana Complete guide on setting up Grafana/InfluxDB with Home assistant using official Docker images

A plus with this approach is that you can remove your Home Assistant history (purge keep days on recorder component), and only get the last week for debugging purpose.

It works with my component. Did you use the official one?

1 Like

Yes, I’m using the official one, inserted code snippet at the end of this post.
I’m using a bit of a non-default (I guess) setup though. I have a VM (under Proxmox) and a Pi3, both running Hass.IO. Pi3 only runs Octoprint addon and Bluetooth, everything else (including automations) I’d like to run on the VM. MQTT Statestream and eventstream is used to send data from Pi3 to VM (tried both separatly, now they both run).
The data is stored in a Google Spreadsheet using IFTTT, so I guess that’s another point of failure, but that part works for my other temperature sensors (Xiaomi Aqara).
I’ll try to place the automation on the Pi3, and see if that’s where the issue is.

sensor:
- platform: mitemp_bt
    mac: !secret mi_temp_mac
    name: Hallway
    force_update: true
    median: 1
    monitored_conditions:
      - temperature
      - humidity
      - battery
2 Likes

I have three of this sensor connected to home assistant. Everything works fine except one thing. The range… If the sensor and raspberry is in the same room Everything works well but if I move the sensor in the other room, nothing doesn’t work. There is way to solve this problem? Maybe a BLE extender or I don’t know what?