fison67 / mi_connector

Connector for Xiaomi Devices with Smartthings, Hubitat
MIT License
210 stars 599 forks source link

Support for zhimi.airpurifier.mb3 #63

Open mikuslaw opened 3 years ago

mikuslaw commented 3 years ago

Hi,

thank you for a great software. It is exactly what I need. Unfortunately I have some issue with support of zhimi.airpurifier.mb3. I didn't find what circle/triangle etc in the support table means, but I assume it's not fully supported. After I add the purifier to the connector, it can read the state of the device, but control ends with error on terminal (mi connector output). After some time, I don't get even that (it timeouts on state read).

2020-12-13 04:41:05 [info]: [ ERR ] Polling issue >> Error: Call to device timed out << zhimi.airpurifier.mb3 - miio:308348604 2020-12-13 04:41:10 [info]: [ ERR ] Polling issue >> Error: Call to device timed out << zhimi.airpurifier.mb3 - miio:308348604 2020-12-13 04:41:15 [info]: [ ERR ] Polling issue >> Error: Call to device timed out << zhimi.airpurifier.mb3 - miio:308348604

at Socket._socket.on (/usr/src/app/node_modules/miio/lib/network.js:158:14) at Socket.emit (events.js:180:13) at UDP.onMessage [as onmessage] (dgram.js:659:8) 2020-12-13 04:41:41 [error]: (node:28) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 3) 2020-12-13 04:41:45 [info]: [ ERR ] Polling issue >> Error: Call to device timed out << zhimi.airpurifier.mb3 - miio:308348604 2020-12-13 04:41:47 [error]: (node:28) UnhandledPromiseRejectionWarning: Error: Call to device timed out at Timeout.retry [as _onTimeout] (/usr/src/app/node_modules/miio/lib/network.js:490:23) at ontimeout (timers.js:466:11) at tryOnTimeout (timers.js:304:5) at Timer.listOnTimeout (timers.js:267:5) 2020-12-13 04:41:47 [error]: (node:28) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 4)

Is the code of the node service available anywhere? I can grab it from the container, but would be nice to work with git repo instead and maybe dockerfile.

Btw, at some point I saw that I was able to control the device, but changes in dth had a different result than anticipated (like full fan speed, instead of low speed etc.)

mikuslaw commented 3 years ago

Just to confirm, I setup the mi home device and connector again on new token. I can get the update on state of device (like temperature, humidity) but when I try to control it I get:

`2020-12-13 05:15:55 [info]: Initialize Wi-Fi Device >> Ip(192.168.55.209), Token(24e2b9cdd190bc6a354015c6d3007214), Type(unknown)
2020-12-13 05:15:55 [info]: Initialize Wi-Fi Device >> Ip(192.168.55.209), Token(24e2b9cdd190bc6a354015c6d3007214), Type(zhimi.airpurifier.mb3)
2020-12-13 05:16:56 [info]: Requested to control by ST >> [zhimi.airpurifier.mb3] >> {"id":"308348604","cmd":"speed","data":5}

2020-12-13 05:17:04 [error]: (node:17) UnhandledPromiseRejectionWarning: Error: Call to device timed out
at Timeout.retry [as _onTimeout] (/usr/src/app/node_modules/miio/lib/network.js:490:23)
at ontimeout (timers.js:466:11)
at tryOnTimeout (timers.js:304:5)
at Timer.listOnTimeout (timers.js:267:5)
2020-12-13 05:17:04 [error]: (node:17) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise wh ich was not handled with .catch(). (rejection id: 1)
2020-12-13 05:17:04 [error]: (node:17) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero ex it code.`

Any help would be welcome.

fison67 commented 3 years ago

DTH was made for classic app. Needs to make a dth for new app. I didn't do it yet.

Maybe power function is available with sensor value now.