# \[APP\]\[Pro\] Xiaomi Mi Home App

**URL:** <https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118>\
**Category:** Apps\
**Tags:** app, homey-pro\
**Created:** [August 22, 2018, 11:14am UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118 "2018-08-22T11:14:52Z")\
**Posts on this page:** 20\
**Page:** 5

<div class="post-metadata">

**Author:** ![Keverjeroen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/keverjeroen/32/369_2.png) [@Keverjeroen](https://community.homey.app/u/Keverjeroen)\
**Post date:** [October 24, 2018, 7:55pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/84 "2018-10-24T19:55:29Z")

</div>

> [@Phuturist](#):
>
> > [@Keverjeroen](#):
> >
> > Do I need to reset something before I can find the Token? Factory reset the device? Clearing files from my phone? Creating new Xiaomi-account? Or something else??
> 
> That all seems right to me, not sure why the token is not available. Perhaps Xiaomi has introduced another measure to make it hard to directly control any miio devices … 🤔
> 
> Cant really help you I’m afraid.

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](https://github.com/ultrara1n/MiToolkit/issues/17)

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

---

<div class="post-metadata">

**Author:** ![Daan256](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daan256/32/3508_2.png) [@Daan256](https://community.homey.app/u/Daan256)\
**Post date:** [October 25, 2018, 8:24pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/85 "2018-10-25T20:24:24Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [October 25, 2018, 9:47pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/86 "2018-10-25T21:47:16Z")

</div>

> [@Daan256](#):
>
> 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](https://github.com/aholstenson/miio/issues)

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [October 26, 2018, 3:34pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/87 "2018-10-26T15:34:19Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [October 26, 2018, 6:24pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/88 "2018-10-26T18:24:19Z")

</div>

> [@vaderag](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [October 26, 2018, 7:03pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/89 "2018-10-26T19:03:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [October 26, 2018, 8:01pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/90 "2018-10-26T20:01:14Z")

</div>

> [@vaderag](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [October 26, 2018, 9:37pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/91 "2018-10-26T21:37:34Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [October 27, 2018, 5:22am UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/92 "2018-10-27T05:22:00Z")

</div>

> [@vaderag](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [October 27, 2018, 7:42am UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/93 "2018-10-27T07:42:00Z")

</div>

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)

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [October 27, 2018, 10:17am UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/94 "2018-10-27T10:17:33Z")

</div>

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…)

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [October 27, 2018, 4:16pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/95 "2018-10-27T16:16:37Z")

</div>

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 ☹

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?

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [October 28, 2018, 9:38am UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/96 "2018-10-28T09:38:24Z")

</div>

> [@vaderag](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [October 28, 2018, 10:21am UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/97 "2018-10-28T10:21:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [October 28, 2018, 11:01am UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/98 "2018-10-28T11:01:10Z")

</div>

> [@vaderag](#):
>
> 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.

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [October 28, 2018, 11:18am UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/99 "2018-10-28T11:18:01Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [October 30, 2018, 8:35am UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/100 "2018-10-30T08:35:40Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [October 30, 2018, 10:38am UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/101 "2018-10-30T10:38:45Z")

</div>

> [@vaderag](#):
>
> What can I do here?

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

---

<div class="post-metadata">

**Author:** ![vaderag](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/vaderag/32/150_2.png) [@vaderag](https://community.homey.app/u/vaderag)\
**Post date:** [October 30, 2018, 1:42pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/102 "2018-10-30T13:42:23Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Phuturist](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phuturist/32/49_2.png) [@Phuturist](https://community.homey.app/u/Phuturist)\
**Post date:** [October 30, 2018, 6:34pm UTC](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118/103 "2018-10-30T18:34:14Z")

</div>

> [@vaderag](#):
>
> Can I have a few more details on how to do that?

> [@\[HOW TO\] CLI install method](https://community.homey.app/t/how-to-cli-install-method/198):
>
> Homey Pro only!!! It does not work this way with Homey (cloud), it only supports CLI run which is there only for development purposes. Installing Node.js Check Node.js version on Homey: Homey App: Settings - General - About - Node.js version Download Node.js (use Homey’s version or higher) from [https://nodejs.org/](https://nodejs.org/) and install it on your computer. Download the app you want to install from GitHub Go to the repository on [GitHub](https://github.com/) (the correct link for the app you want to install is at the bottom…

[Previous page](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118.md?page=4)

[Next page](https://community.homey.app/t/app-pro-xiaomi-mi-home-app/118.md?page=6)
