Hi All,
I'm new to this forum!
I just want to share with you a useful script for Xiaomi Mi Temperature and Humidity Monitor 2 sensor!
https://github.com/erdose/xiaomi-mi-lywsd03mmc
It is my first Github repository, so let me know if you have any feedback!
Xiaomi Mi Temperature and Humidity Monitor 2
Moderator: leecollings
-
- Posts: 1
- Joined: Monday 12 October 2020 20:53
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2020.2
- Location: Hungary
- Contact:
Xiaomi Mi Temperature and Humidity Monitor 2
Best,
Attis92
Attis92
-
- Posts: 1
- Joined: Friday 30 October 2020 11:12
- Target OS: Raspberry Pi / ODroid
- Domoticz version:
- Contact:
Re: Xiaomi Mi Temperature and Humidity Monitor 2
Hi,
What firmware you use on Xiaomi Mi Temperature and Humidity Monitor ?
What firmware you use on Xiaomi Mi Temperature and Humidity Monitor ?
-
- Posts: 142
- Joined: Friday 21 October 2016 9:25
- Target OS: NAS (Synology & others)
- Domoticz version:
- Location: Netherlands
- Contact:
Re: Xiaomi Mi Temperature and Humidity Monitor 2
@Attis92 - many thanks. Am trying it out on a few devices. A few notes as follows (for others who might run into issue):
1. Requires Python 3.6 or higher
2. May need to edit the first line "#!/usr/bin/env python3" depending on Python setup for cron to work
3. Does not work with ATC firmware (from Aaron Christophel) https://github.com/atc1441/ATC_MiThermometer. Note that work is ongoing to improve power consumption and BLE transmission power, etc. so in long run this may be a better firmware than the stock one from Xiaomi
1. Requires Python 3.6 or higher
2. May need to edit the first line "#!/usr/bin/env python3" depending on Python setup for cron to work
3. Does not work with ATC firmware (from Aaron Christophel) https://github.com/atc1441/ATC_MiThermometer. Note that work is ongoing to improve power consumption and BLE transmission power, etc. so in long run this may be a better firmware than the stock one from Xiaomi
-
- Posts: 8
- Joined: Sunday 25 October 2020 15:36
- Target OS: Linux
- Domoticz version: 2023.1
- Location: CZ
- Contact:
Re: Xiaomi Mi Temperature and Humidity Monitor 2
@Attis92 - super script. It's running ok. I tested two devices. But I had to add this library before install bluepy:
sudo apt-get install python3-pip libglib2.0-dev.
And I added rights to run py script and write to the folder.
I bought Xiaomi gateway v3, but unfortunately it's not compatible with Domoticz. And this solution is perfect.
Thanks.
sudo apt-get install python3-pip libglib2.0-dev.
And I added rights to run py script and write to the folder.
I bought Xiaomi gateway v3, but unfortunately it's not compatible with Domoticz. And this solution is perfect.
Thanks.
-
- Posts: 4
- Joined: Sunday 27 February 2022 20:04
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2022.2
- Location: Hungary
- Contact:
Re: Xiaomi Mi Temperature and Humidity Monitor 2
Hi Attis92,
The python code seems to break for some reason, the log file stops showing anything after the password:
2023-08-06 00:07:59 INFO ***************************************
2023-08-06 00:07:59 INFO Start script...
2023-08-06 00:07:59 INFO Input parameters:
Domoticz Server IP: 127 .0 .0 .1
Domoticz Server Port: 8080
Domoticz Server User: ****
Domoticz Server Password: ****
Did everything according to your instructions on the github page, and the tweaks mentioned here.
I can reach the Xiaomi BLE device, can read its data, also I can modify the values in Domoticz by the format what the script should spit out and use in the end.
I am not that pro to debug python scripts such like this one.
Looking forward for your response,
Lacman
The python code seems to break for some reason, the log file stops showing anything after the password:
2023-08-06 00:07:59 INFO ***************************************
2023-08-06 00:07:59 INFO Start script...
2023-08-06 00:07:59 INFO Input parameters:
Domoticz Server IP: 127 .0 .0 .1
Domoticz Server Port: 8080
Domoticz Server User: ****
Domoticz Server Password: ****
Did everything according to your instructions on the github page, and the tweaks mentioned here.
I can reach the Xiaomi BLE device, can read its data, also I can modify the values in Domoticz by the format what the script should spit out and use in the end.
I am not that pro to debug python scripts such like this one.
Looking forward for your response,
Lacman
-
- Posts: 29
- Joined: Tuesday 08 October 2019 12:54
- Target OS: Raspberry Pi / ODroid
- Domoticz version: 2023.2
- Location: Enschede (NL)
- Contact:
Re: Xiaomi Mi Temperature and Humidity Monitor 2
Since the update of domoticz i'm having problems updating the sensors. I tried with help from someone to fill my credentials and even call the script from root.
The error:
The error:
Code: Select all
Traceback (most recent call last):
File "/home/pi/xiaomi-mi-lywsd03mmc/xiaomiBleLywsd03mmc.py", line 2, in <module>
import config
File "/home/pi/xiaomi-mi-lywsd03mmc/config.py", line 14
TEMPERATURE_PREC = 2
^
SyntaxError: invalid syntax
Who is online
Users browsing this forum: No registered users and 1 guest