Re: Xiaomi Air Purifier 2
Posted: Friday 02 February 2018 14:55
I have created a plugin: https://github.com/kofec/domoticz-AirPurifier
Code: Select all
pi@Rpi:~/domoticz/plugins/domoticz-AirPurifier $ pip freeze
aiohttp==2.2.5
android-backup==0.1.0
asn1crypto==0.24.0
astral==1.4
async-timeout==2.0.0
asyncio==3.4.3
attrs==17.3.0
certifi==2017.7.27.1
cffi==1.11.2
chardet==3.0.4
click==6.7
construct==2.8.17
cryptography==2.1.4
enum-compat==0.0.2
homeassistant==0.56.2
idna==2.6
iotop==0.6
Jinja2==2.9.6
keyring==10.1
keyrings.alt==1.3
MarkupSafe==1.0
multidict==3.3.0
netifaces==0.10.6
pretty-cron==1.0.2
pyasn1==0.1.9
pycparser==2.18
pycrypto==2.6.1
pygobject==3.22.0
python-apt==1.1.0b5
python-miio==0.3.3
pytz==2017.3
pyxdg==0.25
PyYAML==3.12
requests==2.14.2
samsungctl==0.6.0
SecretStorage==2.3.1
six==1.11.0
typing==3.6.2
voluptuous==0.10.5
xmltodict==0.11.0
yarl==0.13.0
zeroconf==0.19.1
Code: Select all
aiohttp==2.3.7
android-backup==0.1.0
astral==1.4
async-timeout==2.0.0
attrs==17.4.0
certifi==2017.11.5
chardet==3.0.4
click==6.7
construct==2.9.26
cryptography==1.7.1
enum-compat==0.0.2
homeassistant==0.61.1
idna==2.6
iotop==0.6
Jinja2==2.10
keyring==10.1
keyrings.alt==1.3
MarkupSafe==1.0
multidict==4.0.0
netifaces==0.10.6
pretty-cron==1.0.2
pyasn1==0.1.9
pycrypto==2.6.1
pygatt==3.2.0
pygobject==3.22.0
pyserial==3.4
python-apt==1.1.0b5
python-miio==0.3.4
pytz==2017.3
pyxdg==0.25
PyYAML==3.12
requests==2.18.4
samsungctl==0.7.0
SecretStorage==2.3.1
six==1.11.0
typing==3.6.2
urllib3==1.22
voluptuous==0.10.5
websocket-client==0.45.0
yarl==0.18.0
zeroconf==0.19.1
Code: Select all
2018-02-02 18:44:47.505 TCPServer: shared server started...
2018-02-02 18:44:47.505 RxQueue: queue worker started...
2018-02-02 18:44:49.507 XiaomiGateway: will listen on 9898 for hardware id 3
2018-02-02 18:44:49.508 XiaomiGateway: Delaying worker startup...
2018-02-02 18:44:49.509 YeeLight Worker started...
2018-02-02 18:44:54.509 Kodi: Started
2018-02-02 18:44:54.515 OpenWeatherMap: Started
2018-02-02 18:44:54.515 (Ble) Started.
2018-02-02 18:44:54.516 (purifier) Started.
2018-02-02 18:44:54.517 EventSystem: reset all events...
2018-02-02 18:44:54.522 dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/proba_lépcső_fel_2.lua
2018-02-02 18:44:54.523 dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/nappali.lua
2018-02-02 18:44:54.524 EventSystem: reset all device statuses...
2018-02-02 18:44:54.525 XiaomiGateway: Worker started...
2018-02-02 18:44:54.526 XiaomiGateway: Using 192.168.1.140 for local IP address.
2018-02-02 18:44:54.613 Kodi: (OSMC) Starting thread.
2018-02-02 18:44:54.631 Kodi: (OSMC) Connected to '192.168.1.105:9090'.
2018-02-02 18:44:54.702 XiaomiGateway: RGB Gateway Detected
2018-02-02 18:44:54.713 Kodi: Starting I/O service thread.
2018-02-02 18:44:54.807 Kodi: (OSMC) Event: 'Video - The Fall [S3E1], Episode 1 (2016)'.
2018-02-02 18:44:54.947 PluginSystem: Entering work loop.
2018-02-02 18:44:55.002 (geteway) Lighting Limitless/Applamp (Geteway light)
2018-02-02 18:44:55.073 (geteway) Temp (Kint)
2018-02-02 18:44:55.080 (geteway) Humidity (kint)
2018-02-02 18:44:55.122 (geteway) Temp (Nappali)
2018-02-02 18:44:55.150 (geteway) Humidity (Nappali pára)
2018-02-02 18:44:55.180 (geteway) Light/Switch (fürdő kapcsoló)
2018-02-02 18:44:55.207 (geteway) Light/Switch (Xiaomi Wired Dual Wall Switch Channel 0)
2018-02-02 18:44:55.239 (geteway) Light/Switch (terasz kapcsoló)
2018-02-02 18:44:55.275 (geteway) Light/Switch (tv 2 kapcsolo)
2018-02-02 18:44:55.302 (geteway) Light/Switch (kanapé előtt kapcsoló)
2018-02-02 18:44:55.433 (geteway) Light/Switch (vilanyradiátor)
2018-02-02 18:44:55.461 (geteway) General/kWh (Villany radiátor fogyasztás)
2018-02-02 18:44:55.529 MQTT: Connecting to localhost:1883
2018-02-02 18:44:55.563 (geteway) Light/Switch (Nappali konnektor)
2018-02-02 18:44:55.633 MQTT: connected to: localhost:1883
2018-02-02 18:44:55.734 MQTT: Subscribed
2018-02-02 18:44:55.859 (Ble) Initialized version 0.0.2, author 'mrin'
2018-02-02 18:44:55.875 (Ble) Entering work loop.
2018-02-02 18:44:56.277 Python EventSystem: Initalizing event module.
2018-02-02 18:44:56.285 EventSystem: Queue thread started...
2018-02-02 18:44:56.293 EventSystem: Started
2018-02-02 18:44:57.760 Error: Domoticz received fatal signal 11 !...
2018-02-02 18:44:57.766 Error: /home/pi/domoticz/domoticz() [0x245628]
2018-02-02 18:44:57.766 Error: /home/pi/domoticz/domoticz(_Z14signal_handleri+0x4c) [0x2456e0]
2018-02-02 18:44:57.767 Error: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0xb6c576b0]
2018-02-02 18:45:34.326 TCPServer: shared server started...
2018-02-02 18:45:34.326 RxQueue: queue worker started...
2018-02-02 18:45:36.328 XiaomiGateway: will listen on 9898 for hardware id 3
2018-02-02 18:45:36.329 XiaomiGateway: Delaying worker startup...
2018-02-02 18:45:36.330 YeeLight Worker started...
2018-02-02 18:45:41.330 Kodi: Started
2018-02-02 18:45:41.332 OpenWeatherMap: Started
2018-02-02 18:45:41.332 (Ble) Started.
2018-02-02 18:45:41.333 (purifier) Started.
2018-02-02 18:45:41.334 EventSystem: reset all events...
2018-02-02 18:45:41.338 XiaomiGateway: Worker started...
2018-02-02 18:45:41.340 XiaomiGateway: Using 192.168.1.140 for local IP address.
2018-02-02 18:45:41.343 dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/proba_lépcső_fel_2.lua
2018-02-02 18:45:41.344 dzVents: Write file: /home/pi/domoticz/scripts/dzVents/generated_scripts/nappali.lua
2018-02-02 18:45:41.345 EventSystem: reset all device statuses...
2018-02-02 18:45:41.438 Kodi: (OSMC) Starting thread.
2018-02-02 18:45:41.451 Kodi: (OSMC) Connected to '192.168.1.105:9090'.
2018-02-02 18:45:41.539 Kodi: Starting I/O service thread.
2018-02-02 18:45:41.613 Kodi: (OSMC) Event: 'Video - The Fall [S3E1], Episode 1 (2016)'.
2018-02-02 18:45:41.768 PluginSystem: Entering work loop.
2018-02-02 18:45:42.337 MQTT: Connecting to localhost:1883
2018-02-02 18:45:42.441 MQTT: connected to: localhost:1883
2018-02-02 18:45:42.468 (Ble) Initialized version 0.0.2, author 'mrin'
2018-02-02 18:45:42.482 (Ble) Entering work loop.
2018-02-02 18:45:42.543 MQTT: Subscribed
2018-02-02 18:45:42.914 Python EventSystem: Initalizing event module.
2018-02-02 18:45:42.925 EventSystem: Queue thread started...
2018-02-02 18:45:42.926 EventSystem: Started
2018-02-02 18:45:43.882 Error: Domoticz received fatal signal 11 !...
2018-02-02 18:45:43.888 Error: /home/pi/domoticz/domoticz() [0x245628]
2018-02-02 18:45:43.888 Error: /home/pi/domoticz/domoticz(_Z14signal_handleri+0x4c) [0x2456e0]
2018-02-02 18:45:43.889 Error: /lib/arm-linux-gnueabihf/libc.so.6(__default_sa_restorer+0) [0xb6c2f6b0]
Cannot see any more error logs. But when I enable the airpurifier plugin, the Dlink connector python plugin not working any more. Also without error log. Just not working. Strange...
Code: Select all
stats = device.getProperties([ 'power', 'mode', 'aqi', 'temperature', 'humidity', 'filter_life_remaining', 'filter_hours_used' ])
console.log(stats);
process.exit();
Code: Select all
pi@raspberrypi:~/Xiaomi $ sudo ./airpurifier.js 192.168.1.72 status
{ power: true,
mode: 'auto',
aqi: 8,
temperature: 19.2,
humidity: 56,
filter_life_remaining: undefined,
filter_hours_used: undefined }