Page 1 of 1

Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Sunday 28 January 2018 19:37
by febalci
xiaomi_pm2.5.jpg
xiaomi_pm2.5.jpg (14.01 KiB) Viewed 5362 times
This plugin connects Domoticz directly to your Xiaomi PM2.5 Sensor and gets aqi index and battery status every 30 seconds. You have to place plugin.py, xiaomiaqi.py files and pyaes directory together with its files into a /xiaomi folder under plugins.

Please inform me of any bugs or problems.

Plugin Download: https://github.com/febalci/DomoticzXiaomiPM2.5

Re: Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Monday 29 January 2018 21:47
by Derik
mmm Thanks for this great work!!
I see this sensor and was thinking to buy it..
Only can you please tell me what the devices are in Domoticz? [ or a screendump ]

Looks a nice peace of hardware.. only what can i do with it??

Re: Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Monday 29 January 2018 22:13
by febalci
Well it's fit for purpose device. First of all it doesn't have humidity or temperature, only PM2.5 particles in the air which denotes air pollution. Like smoking, gas, CO, dust etc. When i smoke in the same area it goes directly to red zone! Very good for childrens room if the room needs any clean air. It also has a rechargeable battery which goes around 2-3 hrs. The plugin reflects the AQI value (also commenting as excellent, good, bad, hazardous etc) and battery level. I can send a screenshot tomorrow.

Re: Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Tuesday 30 January 2018 16:56
by febalci
Hi again,
This is the device:
Screen Shot 2018-01-30 at 18.36.14.png
Screen Shot 2018-01-30 at 18.36.14.png (25.28 KiB) Viewed 5313 times

And this is the devices page:
Screen Shot 2018-01-30 at 18.36.14.png
Screen Shot 2018-01-30 at 18.36.14.png (25.28 KiB) Viewed 5313 times
Now that i realized, i have to use a custom device for this, because this is ppm, whereas PM2.5 is micrometers/something. And so comments doesn't fit like excellent, good bad etc.

Re: Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Thursday 31 May 2018 21:42
by bluedmx
Hi,
i have installed 2 py files and directory under plugins xiaomi folder. I have created a material and after Domoticz was crashing. Need to delete the plugin resources to be able to launch again Domoticz.
Server : Raspberry PI 3B+ Raspbian Stretch.
Domoticz release : v3.9469
Best Regards.

Re: Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Sunday 03 June 2018 8:33
by bluedmx
Hi, i have removed python 3.5 and libpython3.5 and now Xiaomi PM 2.5 is working and no longer crash when installing plugin.
sudo apt-get remove python3.5
sudo apt-get remove python3.5-minimal
sudo apt-get remove libpython3.5
sudo apt-get remove libpython3.5-minimal
Best Regard.

Re: Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Sunday 13 January 2019 9:33
by deennoo
With the lastest FW update the device now need to have a token to retrieve information.

I'll try to update the plugin from github

Re: Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Tuesday 19 March 2019 15:04
by greenwitch
Hi,

I am on firmware version 1.4.3_8103
How do you get the token?
I am not able to get one from nodejs miio solution I used before.
I can retrieve only one for air purifier but not for air monitor.
I do not see also any instruction in any github project
https://github.com/deennoo/domoticz-AirMonitor
Can somebody help me.

Adam

Re: Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Tuesday 19 March 2019 15:09
by greenwitch
Ok,

There is an answer:
https://python-miio.readthedocs.io/en/l ... -home-logs
With app 5.4.49 it is extremely easy!

Adam

Re: Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Wednesday 28 August 2019 16:45
by qaigor
Hello is there any change to make it working with a new Xiaomi MiJia Air Quality Detector (KQJCY02QP)?

Image

It supports such dimensions:
PM2.5
TVOC
CO2a
Temp
Humidity

Re: Python Plugin: Xiaomi PM2.5 Air Quality Sensor

Posted: Friday 01 November 2019 18:12
by qaigor
Finally I found a solution with HA:
https://telegra.ph/Dobavlenie-Xiaomi-Mi ... tant-08-26

Unfortunately the manual is in Russian