[APP][Pro] Xiaomi Mi Home App

Hmmm… Just tried with the 5.0.30 app, and now it worked! I found the token. Maybe this can help for others too… More info over here: dosn't wokt for roborock.vacuum.s5 · Issue #17 · ultrara1n/MiToolkit · GitHub

p.s. I have used the MiToolkit for Windows (you have to install Oracle Java first), that program does all the work.

Hi there,

Thanks for al your work! I have succesfully added the Gateway… in domoticz it’s also possible to play sounds which are installed on the device like alarm, barking dog etc… i have the gateway in the hallway and it would be great if i can sound an alarm when motion is detected and i am not home. would this be possible?

Probably but it’s currently not implemented in the miio library. I had a quick look around and was not even able to find the commands for this. It’s not very high on my priority list atm but you could always submit a feature request here: Issues · aholstenson/miio · GitHub

Sorry, this is a really base question, but I’ve tried googling and can’t find an answer - how do I update the WiFi network on a Yeelight?

You can reset a bulb by switching it off and on again 5 times in a row until the light blinks a couple of times.

Does that mean I’ll need to reset it all up on Homey too?

Not sure, you would have to reenable the developer or LAN mode. It might work after that again if the light uses the same IP address but I’m not sure.

Unrelated to the question above I am actually having real problems with my Yeelights

I had to change my router this afternoon, have set things up exactly as they were, same SSID etc and the yeelights are all active and work via the Yeelight app

Around the time i did the changover, the Mi Home app crashed, and now the Yeelights all show as offline permanently. I tried restarting the app and even restarting Homey but to no avail…

Any ideas?

Make sure that the developer or LAN mode is enabled. If all seems right but it still doesn’t work re-pair them.

It’s all the bulbs, not just one…
All show as offline (in the old app, appear normal in the new app except the toggles don’t work)

Well, just tried resetting one and it definitely doesn’t automatically detect it in Homey…

I really don’t fancy having to go through all my flows correcting this (I haven’t actually tried re-addimg, but so far working on the assumption that it’ll work…)

Yep, on trying to add the one I’ve reset it shows ALL the bulbs as unadded…

Guess something has tripped the app to meaning it doesnt recognise any of the bulbs any more :frowning:

EDIT: For fear of spamming I’m editing, but is there any way to quickly swap one device for another device in a flow (or in bulk)…
I have about 10 bulbs I’m going to have to change around 50 flows for that have somehow got messed up here…

@Phuturist how is the app identifying the bulbs? Because the Yeelight app has maintained knowledge of these bulbs, but your app has completly lost the ability to identify them as what they were previously?

By the id which is returned by a light when they are discovered. If this id changes for some reason the connection is lost.

What would cause the id to change? And is there a way to view this ID anywhere? In my device I only get network stuff from yeelight app

Possibly a silly suggestion but would it not make more sense to use Mac address which presumably wouldn’t ever change?

The quote below id from the Yeelight API description.

“ID”: The ID of a Yeelight WiFi LED device, 3rd party device should use this value to
uniquely identified a Yeelight WiFi LED device.

Well it seems something is going awry.

I ran a few tests while i’ve been (re-)setting things up…

This app: Lost knowledge of bulbs due to some networking issues, potentially an ID change (uncertain)
Alexa Yeelight skill: maintained knowledge of legacy bulb settings, even once renamed and repaired to a different wifi network

E.g. I swapped the Bedroom Light and Bedroom Lamp bulbs around (as easier to reset on the lamp) and changed names accordingly. UNTIL i rescanned devices, Alexa still recognized the Bedroom Lamp as the Bedroom Light and vice versa…
which at least from my novice angle seems to me that either it’s not using the ID (as suggested) or the Homey app ID implementation must be broken. NB. IP addresses changed during this process too, so not using saved IP settings

Okay, after much playing around I seem to now have only one bulb that is acting up.

It’s got LAN control turned on and appears to add when I try add via your app…
But, immediately when it’s added it shows as Offline. Which is not true as it’s online in the Yeelight app and can be controlled from it.

What can I do here?

Try running the app from the command line and see what error it returns when the bulb goes offline.

Can I have a few more details on how to do that?