[APP][Pro] Xiaomi Mi Home App

Will test tmrw :slight_smile:

Im getting this on athom app run

✓ Pre-processing app...
✓ Validating app...

Warning: drivers.mi-robot is missing an array 'energy.batteries' because the capability measure_battery is being used. Specifying the type of battery will be required in the future.

Warning: drivers.air-monitor is missing an array 'energy.batteries' because the capability measure_battery is being used. Specifying the type of battery will be required in the future.

✓ Homey App validated successfully against level `debug`

Homey Offline

You should try again. Homey offline seems like a connection issue unrelated to my app. The warning is due to an unimplemented feature (energy manager which comes with firmware 3.0.0).

Ok so got this today with the new version you posted on github yday:

(node:20197) 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: 2)

There should be more information on the console when running the app with athom app run. This does not tell me anything where the error came from.

─────────────── Logging stdout & stderr ───────────────
2019-09-04 21:20:31 [log] [XiaomiMiioApp] Initializing Xiaomi Mi Home app …
2019-09-04 21:20:34 [log] [ManagerDrivers] [zhimi-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:20:46 [log] [ManagerDrivers] [zhimi-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:20:58 [log] [ManagerDrivers] [zhimi-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:03 [log] [ManagerDrivers] [zhimi-fan] [1] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:10 [log] [ManagerDrivers] [zhimi-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:15 [log] [ManagerDrivers] [zhimi-fan] [1] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:22 [log] [ManagerDrivers] [zhimi-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:27 [log] [ManagerDrivers] [zhimi-fan] [1] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:33 [log] [ManagerDrivers] [dmaker-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:33 [log] [ManagerDrivers] [zhimi-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:39 [log] [ManagerDrivers] [zhimi-fan] [1] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:45 [log] [ManagerDrivers] [dmaker-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:45 [log] [ManagerDrivers] [zhimi-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:51 [log] [ManagerDrivers] [zhimi-fan] [1] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:57 [log] [ManagerDrivers] [dmaker-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }
2019-09-04 21:21:57 [log] [ManagerDrivers] [zhimi-fan] [0] { Error: Could not connect to device, handshake timeout
at Timeout.handshakeTimeout.setTimeout [as _onTimeout] (/node_modules/miio/lib/network.js:450:17)
at ontimeout (timers.js:498:11)
at tryOnTimeout (timers.js:323:5)
at Timer.listOnTimeout (timers.js:290:5) code: ‘timeout’, device: null }

Well, that was a nice try but I guess it ends here. I have no clue how to troubleshoot these timeouts without the actual device so I wont be adding support for the fans. It seems to be some connection issue. This usually happens when a wrong IP or token is used.

Just out of curiosity, do you have two fans connected, a zhimi and a dmaker model? And when pairing these did you see information about the device after hitting the test button?

There is 2 Mi fan devices in the app when I press the add button in the app. So I tested both. One seams to be added as zhimi and one as dmaker.

I don’t know if I do it right when I take the token out. But it seams to change as I had a new token today for my fan.

You should only add it as the correct device (in your case probably a ZhimiFan). Remove the Dmaker device. If you are not sure about the correct token you will need to check that first as the errors you have could very well be caused by that.

But I don’t know which one of the once are the Zhimifan, both of them is called Mifan in the app :slight_smile:

I’ve tried to discover the token but it’s hidden. So I had to connect to the wifi of the fan and then get the token out. If I then try to connect to it through the app, do you think the token will be another one?

Ah, I see the duplicate names now. I have fixed that on GitHub. Just remove both devices and re-pair the correct one. But first you need to retrieve the correct token. The token of a miio device will change once you connect it to your router. You need to use one on the supplied methods here to retrieve the correct token after it’s been connected to your WiFi.

Hi there, great APP! I have verious Xiaomi products and I am wondering wether it is possible to get the Xiaomi MI Rice Cooker integrated as well?

Seems like that after the latest update to firmware 3.5.4_0622 my Roborock S6 isnt working correctly any more. The flow cards wont trigger the cleaning options. After returning to the dock the status is still cleaning. Anyone with the same problem?

Hi,

I think I see the issue, it does not update the night mode when the Yeelight app schedule changes it (Until a device turns on the light).

I use the Yeelight schedule (within mobile app) so the lights come on in night mode between 21:00 and 06:00

My flow checks if night mode is on before turning on the light from a movement sensor, in case the light has been switched to day mode intentionally. So when turning on night mode via the scheduler it does not register with Homey.

If that is the case it might be an issue with the Yeelight api where it does not broadcast an update when changed through the schedule. There is then no way for my app to know it has been changed. You should ask the Yeelight company about this

I will raise it with them and let you know their response.

Good luck!

Hi!

Are Xiaomi Yeelight / Viomi bath heaters supported by the app?

No, at least one of these is a Bluetooth product instead of a WiFi product. And both do not have the Yeelight open api. If the first is a WiFi communicating though the miio protocol it would still not be added because the development of the miio library has stopped. No new products will be added.

@Kingcool @viix what is the current status of you guys testing the Zihmi Fan and/or Dmaker fan. I’m about the revert any changes I made for this unless I can get clear info on what is (not) working.