This is the forum archive of Homey. For more information about Homey, visit the Official Homey website.

The Homey Community has been moved to https://community.athom.com.

This forum is now read-only for archive purposes.
Closed Official

[APP] Xiaomi Mi Home (supports Yeelights and Mi Home WiFi devices)

13468913

Comments

  • @Phuturist
    I checked the documentation and my MI Purifier 2 meets all the "requirements" to run the different device modes (I guess this is what you meant?) modes idle, auto and silent work fine, but his device performs better when in medium mode which isn't available now.. It's the last three modes (low, med, high) that don't work. De purifier just doesn't respond when setting it to one of these three modes. 
  • Stevos said:
    @Phuturist
    I checked the documentation and my MI Purifier 2 meets all the "requirements" to run the different device modes (I guess this is what you meant?) modes idle, auto and silent work fine, but his device performs better when in medium mode which isn't available now.. It's the last three modes (low, med, high) that don't work. De purifier just doesn't respond when setting it to one of these three modes. 
    It seems the documentation is wrong than and the modes might be named different. You can check this yourself using the miio command line as described here https://github.com/aholstenson/miio/blob/master/docs/missing-devices.md .

    I don't own the device myself so I can't test it.
  • JerryvdvJerryvdv Member
    edited November 2017
    I was wondering whether the 'Xiaomi Yeelight Smart LED Ceiling Lamp' is already supported (I believe it has both WIFI and Bluetooth connections)?

    *Apologies* I see it's in the list. Will test tonight :smiley:

    Just installed the Mi Home app, I'm unable to add the ceiling light under 'yeelight', which makes sense I suppose.. However, is there a different way to add it (as the list indicates it could potentially be possible)?
  • @Phuturist call me an idiot but where do I enter these command lines? Cmd in windows? Is there an app I must run somewhere? 
  • Stevos said:
    @Phuturist call me an idiot but where do I enter these command lines? Cmd in windows? Is there an app I must run somewhere? 
    You need to install nodejs which comes with the npm package manager. Then you can use npm to install the miio libary which comes with a command line interface to access Mi Home WiFi devices over the miio protocal. But seeying your reaction this is probably not something you are currently comfortable with. If you are willing to invest you could follow some tutorials to learn this though, just google for install nodejs tutorial.
  • I'll give it a try. It all sounds gibberish to me right now but I'm eager to learn
  • @Phuturist Tried to install the library within node.js, but there's no way i'm getting it installed. I haven't got the faintest idea about what i'm actually doing. I won't bore you further with my n00bness. I just want to be able to use homey with my purifier. 
    Maybe the answer can be found in addressing the Identifier? Mine for instance should be the following identifier with Id:
    zhimi.airpurifier.v2 (see models by identifier)

    right? Maybe homey somehow only talks to the first version when addressing the speed function?

  • Stevos said:
    @Phuturist Tried to install the library within node.js, but there's no way i'm getting it installed. I haven't got the faintest idea about what i'm actually doing. I won't bore you further with my n00bness. I just want to be able to use homey with my purifier. 
    Maybe the answer can be found in addressing the Identifier? Mine for instance should be the following identifier with Id:
    zhimi.airpurifier.v2 (see models by identifier)

    right? Maybe homey somehow only talks to the first version when addressing the speed function?

    While looking through the code of the miio library I noticed a comment by the author of the miio library concering this issue, see here: https://github.com/jghaanstra/com.xiaomi-miio/blob/fbc907fc123e5103e81078f7c8d5030dfca40525/node_modules/miio/lib/devices/air-purifier.js#L101

    He added a todo for himself claiming that the available modes differ per model. Appearantly he has not gotten around to it too look into it further and probably does not own the device himself as well. Seeying this issue in his repo there are other people that have similar issues with the v2 version: https://github.com/aholstenson/miio/issues/61

    So it seems ithe v2 is only partially supported right now. There is not much I can do about it without actually owning the device.


  • StevosStevos Member
    edited November 2017
    Thanks for diving into the code. I also peeked but didn't know where to look :D I noticed the original miio library was updated 18 days ago. You think this could make a difference since your app is based on this? Or am I just talking nonsense? 
  • Stevos said:
    Thanks for diving into the code. I also peeked but didn't know where to look :D I noticed the original miio library was updated 18 days ago. You think this could make a difference since your app is based on this? Or am I just talking nonsense? 
    That was only a very small update and not related to the air purifier. Those changed are already part of my app as well.
  • Thanks for your dedication. Guess we'll have to live with it  ;)
  • I have a question regarding yeelight: when I power the light off (with a normal switch), the device obviously also disappears from the network. However the device state of the light remains "on". It it possible to test the availability of the device and when not there mark it automtically as "off", and turn it "on" when it comes online again?
    When this works I can also use it in normal flows, which currently is not reliable.
  • Oskar said:
    I have a question regarding yeelight: when I power the light off (with a normal switch), the device obviously also disappears from the network. However the device state of the light remains "on". It it possible to test the availability of the device and when not there mark it automtically as "off", and turn it "on" when it comes online again?
    When this works I can also use it in normal flows, which currently is not reliable.
    This would require polling, something I'm trying to avoid as it could create a lot of traffic with many lights. It currently works that it goes offline after a command is send to a light that is offline. So you could actually create this polling mechanism yourself or use an app that polls devices IP addresses to achieve this as well.
  • I’ve just gotten the Xiaomi smart fan and hoping to somehow have this integrate to the app? Anything I can do on my end to help include into the app?
  • viix said:
    I’ve just gotten the Xiaomi smart fan and hoping to somehow have this integrate to the app? Anything I can do on my end to help include into the app?
    If you know your way around nodejs and the commandline you can follow the instruction here to discover which commands the device supports. With that info you can submit a feature request in that repo or even better submit a pull request with a driver for the device.

    https://github.com/aholstenson/miio/blob/master/docs/missing-devices.md
  • Latest version - 2017-11-30 -- v2.3.2

    • FIX: added a keep-alive to Yeelight connections to maintain the connection over time
    • FIX: fixed pairing wizard for Humidifier and Purifier
  • I see the fan supported in the newer 
    miio https://github.com/rytilahti/python-miio/blob/master/README.rst
  • viix said:
    I see the fan supported in the newer 
    miio https://github.com/rytilahti/python-miio/blob/master/README.rst
    This is a different miio library written in Python. It will probably give me enough information to add support for the Nodejs miio library but it's currently not very high on my todo list to be honest.
  • I have two Yeelights added to Homey (bulb + LED strip). We had loss of power here the other day and since then they both show up as Offline, and I can't seem to be able to get them back online no matter what I do. I've tried restarting the Xiaomi app, Homey etc. to no avail. The devices are still fully available in the Yeelight app. 

    Any advice, or do I have to remove and re-add them to Homey to fix this? 
  • angr said:
    I have two Yeelights added to Homey (bulb + LED strip). We had loss of power here the other day and since then they both show up as Offline, and I can't seem to be able to get them back online no matter what I do. I've tried restarting the Xiaomi app, Homey etc. to no avail. The devices are still fully available in the Yeelight app. 

    Any advice, or do I have to remove and re-add them to Homey to fix this? 
    Did they perhaps get different IP addresses?
  • Phuturist said:
    Did they perhaps get different IP addresses?
    Yes, quite possible. Wasn't aware that static IP was a requirement. I've updated my IP reservation list with my Yeelights now and readded them, hoping to avoid the same going forward. Thanks! 
  • BebopperBebopper Member
    edited December 2017
    *** update ***
    Always nice when you find a setting called "Block LAN to WLAN Multicast and Broadcast Data" in your new wireless setup :-) Decided to uncheck that box to see what happens and... the yeelights are back and seem to remain back as well!

    ------------------------------------------

    Updated my wireless setup and as a result also had to re-connect my 2 yeelights. No problems so far, managed to reset them (on/off 5 times) and after that reconnect them to the wireless using the yeelight app and turned on LAN control.

    I had already removed the existing yeelights from devices and restarted the Homey Xiaomi Mi Home app.

    After this I added the Yeelight as a new device, it was detected (with the new IP address) without any issues and added and appeared as device. Immediately after however it goes offline to not come online again.

    I can see on my router that the lights are connected to the wifi network just fine, they are connected on the IP addresses on which Homey also found them. I can also still control the lights with the yeelight app just fine.

    I have tried the following:
    - wait a while to see if the yeelight will come back online in Homey --> no success
    - re-do all steps described above (resetting the yeelight, adding it via yeelight app, etc.) --> same end result, the lights get added to Homey only to immediately go offline

    The exact same thing is happening with both my yeelights :(

    Any idea what I could be doing wrong or what I could try to do?
  • I'm looking for beta testers that know how to install a beta version through the command line and have one of the following devices to test with:
    * NEW: added support for the Philips Xiaomi Light Bulbs (untested)
    * NEW: added support for the Philips Xiaomi Eyecare Lamp 2 (untested)
    * NEW: added support for the Xiaomi Single Power Plug (untested)

    The beta release can be downloaded here: https://github.com/jghaanstra/com.xiaomi-miio/archive/2.4.0-beta.zip

    Please let me know if anyone is able to test support for these devices.
  • Phuturist said:
    I'm looking for beta testers that know how to install a beta version through the command line and have one of the following devices to test with:
    * NEW: added support for the Philips Xiaomi Light Bulbs (untested)
    * NEW: added support for the Philips Xiaomi Eyecare Lamp 2 (untested)
    * NEW: added support for the Xiaomi Single Power Plug (untested)

    The beta release can be downloaded here: https://github.com/jghaanstra/com.xiaomi-miio/archive/2.4.0-beta.zip

    Please let me know if anyone is able to test support for these devices.
    Not a single response, I'm just gonna push this to the app store and see what happens.
  • Hey, i only have the Wi-Fi Power Strip (2, and 1 is waiting on my desk till the app supports it). I have no Single Power Plug (as this is really not interesting in the Netherlands as we have the Action stuff and KAKU, which supports grounded EU plugs). If you are adding the Power Strip, is it also possible to read out the wattage it's using? Product number: ZNCXB01ZM.
  • Hey, i only have the Wi-Fi Power Strip (2, and 1 is waiting on my desk till the app supports it). I have no Single Power Plug (as this is really not interesting in the Netherlands as we have the Action stuff and KAKU, which supports grounded EU plugs). If you are adding the Power Strip, is it also possible to read out the wattage it's using? Product number: ZNCXB01ZM.
    I'm still trying to figure out how to add the strip. The documentation of the miio library which is used for communicating with these devices is not clear on this. Without owning the device I cant really test it as well. I asked for support from the guy who wrote the library some time back but without any response. But if I ever do add it, it will probably include power consumption and power usage as well.

    I have published a new release to the app store with the other supported devices.

    Latest version - 2017-12-20 -- v2.4.0

    • NEW: added support for the Philips Xiaomi Light Bulbs (untested)
    • NEW: added support for the Philips Xiaomi Eyecare Lamp 2 (untested)
    • NEW: added support for the Xiaomi Single Power Plug (untested)
  • MichaelvanEeMichaelvanEe Member
    edited January 2018
    Ok, that's a shame. I will be patient  :) I see that the updates of Homekit, Homey and your app are installed. I could try if the Single Power Plug (on/off) also works for the Power Strip. But it still misses the power consumption option then.

    Update: It seems to be quiete a problem to get that security token (i'm using an iPhone). If you know an easy way to do this...
  • Thanks that you added the Philips bulbs. I was able to pair them, but unfortunately, the lamp is not responding most of the time. I can switch it on or off, but with big delays (more then 10 seconds, which is too much for a lamp). Also the tint of the light is not responding to changes in homey.
  • Ok, that's a shame. I will be patient  :) I see that the updates of Homekit, Homey and your app are installed. I could try if the Single Power Plug (on/off) also works for the Power Strip. But it still misses the power consumption option then.

    Update: It seems to be quiete a problem to get that security token (i'm using an iPhone). If you know an easy way to do this...
    It doesnt get easier than described in the docs. I dont think pairing your strip as socket will do you much good. It wont hurt either though, would be interested to see what works.
    GeertK94 said:
    Thanks that you added the Philips bulbs. I was able to pair them, but unfortunately, the lamp is not responding most of the time. I can switch it on or off, but with big delays (more then 10 seconds, which is too much for a lamp). Also the tint of the light is not responding to changes in homey.
    The delay is out of my hands I'm afraid. As this is not an official API from Xiaomi but a reversed engineered one no garantees on functionality and performance can be given. But seeying more and more device (like the vacuum cleaner) stop working properly it makes me wonder if I should continu with this app. I probably know what the issue is with the tint, so I'll implement a possible fix for the next release for now.
  • Thanks for the quick reply. Hope you at least continue with the Yeelights. The RGB bulbs work without any problems (of course because it is another API) without the cost of Hue!
This discussion has been closed.