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)

1356713

Comments

  • RuudvBRuudvB Member
    Phuturist said:
    RuudvB said:
    Since my Yeelights are now available via homey flows I tried to combine one of them when an alarm kicks in. The principle works, no problem there. On/Off, color change, luminance change do work, great of course.

    But... give someone a finger.... what I like to accomplish seems simple at first but turns out to be somewhat more complicated. Some explanation.
    When an alarm is activated I would like the Yeelight to do:
    - save the current state as in current scenario it is in.
    - start a new scenario (which I would like to define...?)
    - return to the saved scenario.

    Sounds simple? Suggestions are welcome :)
    I have added a feature request to the app repository on GitHub for starting a user defined scenario for advanced users. This should not be so hard to implement. In theory you could keep track of the state yourself using something like BetterLogic if you would only use these scenario cards but once you use your phone Homey would loose track of the correct state.

    I do already save the current state of the device within the app and I could probably go back to the last state but it seems like a lot of work for a small userbase. I'd rather focus on stablizing the support for the Robot Vacuum Cleaner first (and even that will probably have to wait until after my vacation).
    Thanks for the effort, I appreciate it.

    I do use BetterLogic in several other situations. At this time I just don't see how to transfer color, hue etc. to a variable... Any suggestions for this? I don't think that "BL-var1 = Yeelight color" would work? The real question is how to access the Yeelight parameters as a variable I guess.

    If you already saved the current state of the devices, would it be possible to share that state as some kind of variable or parameter?

    I understand your priorities and don't want to be in the way of your vacation :)
  • AmelsfortAmelsfort Member
    edited July 2017
    Phuturist said:
    Amelsfort said:
    The app isn't crashing anymore! Nice!

    But now I am wondering if the Yeelight RGB is known to Homey as a RGB light. Yesterday I asked Homey to turn the 'schemerlamp' to blue, but Homey told me it couldn't find any lights with changable colors.
    The Yeelights color are registered with hue and saturation capabilities so Homey knows they can change color. But there is also a capability called color mode which can switch between color and temperature mode. Perhaps when it's in temperature mode Homey does not see it as a RGB light when using the built-in voice commands. This is out of my hands though. You could ask on Slack or submit a bug on Github in the Athom repository if you have confirmed this.
    I'm not sure if it is supposed to work this way, but yesterday I tried changing the light to a color using the app (so it might be in 'color mode') and then ask Homey to change colors. Unfortunately, that didn't make any difference and Homey still responded that it could find any lights with color abilities.

    Is this something you can look into or do I need to check Slask or Github?
  • Amelsfort said:
    Phuturist said:
    Amelsfort said:
    The app isn't crashing anymore! Nice!

    But now I am wondering if the Yeelight RGB is known to Homey as a RGB light. Yesterday I asked Homey to turn the 'schemerlamp' to blue, but Homey told me it couldn't find any lights with changable colors.
    The Yeelights color are registered with hue and saturation capabilities so Homey knows they can change color. But there is also a capability called color mode which can switch between color and temperature mode. Perhaps when it's in temperature mode Homey does not see it as a RGB light when using the built-in voice commands. This is out of my hands though. You could ask on Slack or submit a bug on Github in the Athom repository if you have confirmed this.
    I'm not sure if it is supposed to work this way, but yesterday I tried changing the light to a color using the app (so it might be in 'color mode') and then ask Homey to change colors. Unfortunately, that didn't make any difference and Homey still responded that it could find any lights with color abilities.

    Is this something you can look into or do I need to check Slask or Github?
    Could you confirm this is working for other lights with the capabilities light_hue and light_saturation. If this is indeed something that is supposed to be supported by Homey I'll look into why it's currently not working for Yeelights.
  • Phuturist said:
    Amelsfort said:
    Phuturist said:
    Amelsfort said:
    The app isn't crashing anymore! Nice!

    But now I am wondering if the Yeelight RGB is known to Homey as a RGB light. Yesterday I asked Homey to turn the 'schemerlamp' to blue, but Homey told me it couldn't find any lights with changable colors.
    The Yeelights color are registered with hue and saturation capabilities so Homey knows they can change color. But there is also a capability called color mode which can switch between color and temperature mode. Perhaps when it's in temperature mode Homey does not see it as a RGB light when using the built-in voice commands. This is out of my hands though. You could ask on Slack or submit a bug on Github in the Athom repository if you have confirmed this.
    I'm not sure if it is supposed to work this way, but yesterday I tried changing the light to a color using the app (so it might be in 'color mode') and then ask Homey to change colors. Unfortunately, that didn't make any difference and Homey still responded that it could find any lights with color abilities.

    Is this something you can look into or do I need to check Slask or Github?
    Could you confirm this is working for other lights with the capabilities light_hue and light_saturation. If this is indeed something that is supposed to be supported by Homey I'll look into why it's currently not working for Yeelights.
    Unfortunately I can't. I don't have any other lights with color abilities.
  • PhuturistPhuturist Member
    edited July 2017
    Amelsfort said:
    Phuturist said:
    Amelsfort said:
    Phuturist said:
    Amelsfort said:
    The app isn't crashing anymore! Nice!

    But now I am wondering if the Yeelight RGB is known to Homey as a RGB light. Yesterday I asked Homey to turn the 'schemerlamp' to blue, but Homey told me it couldn't find any lights with changable colors.
    The Yeelights color are registered with hue and saturation capabilities so Homey knows they can change color. But there is also a capability called color mode which can switch between color and temperature mode. Perhaps when it's in temperature mode Homey does not see it as a RGB light when using the built-in voice commands. This is out of my hands though. You could ask on Slack or submit a bug on Github in the Athom repository if you have confirmed this.
    I'm not sure if it is supposed to work this way, but yesterday I tried changing the light to a color using the app (so it might be in 'color mode') and then ask Homey to change colors. Unfortunately, that didn't make any difference and Homey still responded that it could find any lights with color abilities.

    Is this something you can look into or do I need to check Slask or Github?
    Could you confirm this is working for other lights with the capabilities light_hue and light_saturation. If this is indeed something that is supposed to be supported by Homey I'll look into why it's currently not working for Yeelights.
    Unfortunately I can't. I don't have any other lights with color abilities.
    I just tested this myself and it works fine for me. I asked Homey to change the color to blue and my Yeelight changed it's color to blue (never even knew this was possible). Best is to test it with the speech-input page and make sure you use the correct name of the light.
  • RuudvBRuudvB Member
    edited July 2017
    @Phuturist
    The Yeelights have been working fine using your app, but now I ran into an issue that does not resolve.
    The other day I had to switch of one of the Yeelights using the physical switch. The device disappeared from the Xiaomi app and also from homey (device not available). After switching the light back on the Xiaomi app found the light again and the control works fine again.

    Only homey still sees the device as not available. I have restarted the homey app, without success. Any ideas on how to resolve this? Besides of course deleting the device and then re-pairing it again. I expect this would break up all existing flows since the device will probably get another node ID?
  • PhuturistPhuturist Member
    edited July 2017
    RuudvB said:
    @Phuturist
    The Yeelights have been working fine using your app, but now I ran into an issue that does not resolve.
    The other day I had to switch of one of the Yeelights using the physical switch. The device disappeared from the Xiaomi app and also from homey (device not available). After switching the light back on the Xiaomi app found the light again and the control works fine again.

    Only homey still sees the device as not available. I have restarted the homey app, without success. Any ideas on how to resolve this? Besides of course deleting the device and then re-pairing it again. I expect this would break up all existing flows since the device will probably get another node ID?
    Not sure why this is not working anymore. I did extensive testing with Yeelights going offline and coming back online. It wasnt perfect yet but it's indeed not working at all in the current version. I'll have to see what broke it and hope to fix it in an upcoming release hopefully before my vacation.

    What works for me to get my Yeelight color enabled again is kill the power of the light, restart the app and than power on the light again. Do you have a color or a white?

    (and yes, re-pairing means editing all your flows)

    [EDIT] i need to do more testing but last evening it was working fine again while I hardly touched the code. So I'm not sure if I fixed it or it's not an actual issue. I was thinking, could it be your Yeelight received a different IP address from your router?
  • RuudvBRuudvB Member
    Phuturist said:
    I'll have to see what broke it and hope to fix it in an upcoming release hopefully before my vacation.
    No hurry, take your time and enjoy your holidays first :)

    What works for me to get my Yeelight color enabled again is kill the power of the light, restart the app and than power on the light again. Do you have a color or a white?

    I only use color versions, there is really no point in buying a white version if you compare prices. I tried your sequence without success.

    (and yes, re-pairing means editing all your flows) Good thing up until now I only made a few :)

    [EDIT] i need to do more testing but last evening it was working fine again while I hardly touched the code. So I'm not sure if I fixed it or it's not an actual issue. I was thinking, could it be your Yeelight received a different IP address from your router?

    Now you nailed it!! I forgot to "bind IP to MAC" in my router....
    Just bonded the IP's from the lights, I would expect it to work fine now. If not, I will come back to you. Thanks!

  • AmelsfortAmelsfort Member
    edited July 2017
    Phuturist said:
    Amelsfort said:
    Phuturist said:
    Amelsfort said:
    Phuturist said:
    Amelsfort said:
    The app isn't crashing anymore! Nice!

    But now I am wondering if the Yeelight RGB is known to Homey as a RGB light. Yesterday I asked Homey to turn the 'schemerlamp' to blue, but Homey told me it couldn't find any lights with changable colors.
    The Yeelights color are registered with hue and saturation capabilities so Homey knows they can change color. But there is also a capability called color mode which can switch between color and temperature mode. Perhaps when it's in temperature mode Homey does not see it as a RGB light when using the built-in voice commands. This is out of my hands though. You could ask on Slack or submit a bug on Github in the Athom repository if you have confirmed this.
    I'm not sure if it is supposed to work this way, but yesterday I tried changing the light to a color using the app (so it might be in 'color mode') and then ask Homey to change colors. Unfortunately, that didn't make any difference and Homey still responded that it could find any lights with color abilities.

    Is this something you can look into or do I need to check Slask or Github?
    Could you confirm this is working for other lights with the capabilities light_hue and light_saturation. If this is indeed something that is supposed to be supported by Homey I'll look into why it's currently not working for Yeelights.
    Unfortunately I can't. I don't have any other lights with color abilities.
    I just tested this myself and it works fine for me. I asked Homey to change the color to blue and my Yeelight changed it's color to blue (never even knew this was possible). Best is to test it with the speech-input page and make sure you use the correct name of the light.
    Hmm, that's strange. I checked the voice input page and it showed exactly what I said. I'll try playing with it some more this evening.

    I there a difference in how the light responds to commands like 'Turn on' and 'Change color' or 'Change brightness'? In my flows I just use 'Turn on' and 'Turn off'. Maybe that causes the light to not be in color mode?
  • I found out the lights are changing colors when I ask Homey to switch all lights in the livingroom. And I just noticed I had a Fibaro plug with the same name. I renamed the plug (which isn't necessary anymore since Homey can switch the light directly) and now it's working fine!
  • Hey Phuturist. First of all thx for this app, nice to see that one in the appstore. I just tested it but it seems like I have the same timeout issues as mentioned before. Start cleaning works everytime (5/5 tests) but pause or stop didn't work at all. Timeout everytime. Maybe that helps a bit.
  • Anyone tested the LED strip yet?
  • Hey Phuturist. First of all thx for this app, nice to see that one in the appstore. I just tested it but it seems like I have the same timeout issues as mentioned before. Start cleaning works everytime (5/5 tests) but pause or stop didn't work at all. Timeout everytime. Maybe that helps a bit.
    Thanx, that may indeed help troubleshoot the issue. I'll look into it further after my vacation.
  • Hi Phuturist, thanks again for this great app! Found a minor issue with the yeelights:  
    Via the official Yeelight app I can decrease the brightness level to a really low level while this is not possible via the homey app. The lowest brightness level is around 50% compared to the brightness level of the official app.
    Is this something you can easily solve (after your holidays of course:) ) ?
  • AmelsfortAmelsfort Member
    edited August 2017
    I noticed Homey can't reach the Yeelights sometimes. Yesterday for example the light in the garden was on. The app showed the light as broken, but I was able to connect to it just fine using the Yeelight app. Sometimes, when I switch the light using the Yeelight app, Homey is able to connect with it again.
    The lights haven't changed IP-addresses.

    What could be causing Homey to loose connection to the lights?
  • RuudvBRuudvB Member
    edited August 2017
    Amelsfort said:
    I noticed Homey can't reach the Yeelights sometimes. Yesterday for example the light in the garden was on. The app showed the light as broken, but I was able to connect to it just fine using the Yeelight app. Sometimes, when I switch the light using the Yeelight app, Homey is able to connect with it again.
    The lights haven't changed IP-addresses.

    What could be causing Homey to loose connection to the lights?
    I have encountered the same behavior last night. Just one of the Yeelights was not available via the homey app, 3 others were. All my yeelights have their IP conncted to their MAC.
    Although I cannot explain it, but I first guessed it had something to do with my internet connection dropping out for 15-20 minutes yesterday afternoon. Last night nothing worked to get the light back working with the homey app. I just checked, and now it IS working again....?

    Another thought, after the initial pairing there is no way to see what IP the light uses (except checking in your routers dhcp table). A settings/node information page could be useful for a device.
  • Hey Phuturist. First of all thx for this app, nice to see that one in the appstore. I just tested it but it seems like I have the same timeout issues as mentioned before. Start cleaning works everytime (5/5 tests) but pause or stop didn't work at all. Timeout everytime. Maybe that helps a bit.
    I just received the update to the latest firmware for the Xiaomi Mi Robot and it seems the robot takes way much longer to respond to the calls causing more time outs. I'd have to see if I can change the call time out length in the external miio library without it effecting the other Mi Home devices that are also controlled by this library. 
    ncickc said:
    Hi Phuturist, thanks again for this great app! Found a minor issue with the yeelights:  
    Via the official Yeelight app I can decrease the brightness level to a really low level while this is not possible via the homey app. The lowest brightness level is around 50% compared to the brightness level of the official app.
    Is this something you can easily solve (after your holidays of course:) ) ?
     Hmmm, guess I should be able to solve that. Must be something wrong with the math that converts the Xiaomi config to the Homey config. I'll have a look at it soon.
    Amelsfort said:
    I noticed Homey can't reach the Yeelights sometimes. Yesterday for example the light in the garden was on. The app showed the light as broken, but I was able to connect to it just fine using the Yeelight app. Sometimes, when I switch the light using the Yeelight app, Homey is able to connect with it again.
    The lights haven't changed IP-addresses.

    What could be causing Homey to loose connection to the lights?
    The app checks if it can set up a socket with the bulb, if it cant for some reason it will set the light as Offline assuming it has been powered off by a switch. But I can imagine this sometimes happens when the bulb is actually online. Either my code is not bulletproof (which I can very well imagine) or there was a hickup with the connection or something. Toggling the power of the bulb should fix it. If I can ever get my head around the SDK2 I'll give this some extra love.

  • EdoEdo Member
    Phuturist said:
    dENNtoet said:
    @Phuturist yes I do know my way around the command line, what do you want me to test?
    Nothing yet, I still need to look into the connection time out issue and come up with a fix. Since you where to first to report it I figured you should be able to test it once I do come up with something. I'm a little short on available time though.

    The timeout issue seems to mainly occur since firmware version 3.3.9_003077 which still hasnt rolled out to my robot (and I dont feel like switching to Mainland China in the Mi Home app again). I'm not a power user myself (just scheduled an start cleaning flow based on some conditions) and this has not happened to my yet which makes it hard to troubleshoot.

    @Robiebab , thanks for thinking along. Not sure if those time settings are related. But the issue is for sure related to the miio library used in this app. I might submit an issue there once I'm able to reproduce.

    @RuudvB , perhaps in the future but dont count on it. That's way beyond the default device support.


    I also have the time out issue, all other commands are fine. Have you received the firmware update already?


  • Phuturist said:

    ncickc said:
    Hi Phuturist, thanks again for this great app! Found a minor issue with the yeelights:  
    Via the official Yeelight app I can decrease the brightness level to a really low level while this is not possible via the homey app. The lowest brightness level is around 50% compared to the brightness level of the official app.
    Is this something you can easily solve (after your holidays of course:) ) ?
     Hmmm, guess I should be able to solve that. Must be something wrong with the math that converts the Xiaomi config to the Homey config. I'll have a look at it soon.
    I have looked into this. With the desktop app or webinterface all is working fine, at least for me. I do see issues when setting the dim level using the Homey mobile app but these issues happen on all my bulbs with dim capabilities including those of other manufacturers like LIFX and are therefor not related to my app.

    I also could not find anything in the coding of my app that could explain this, the dim level gets set correctly. I have asked on Slack if the issue with setting the dim levels through the mobile app is a known issue.
  • Phuturist said:
    I have looked into this. With the desktop app or webinterface all is working fine, at least for me. I do see issues when setting the dim level using the Homey mobile app but these issues happen on all my bulbs with dim capabilities including those of other manufacturers like LIFX and are therefor not related to my app.

    I also could not find anything in the coding of my app that could explain this, the dim level gets set correctly. I have asked on Slack if the issue with setting the dim levels through the mobile app is a known issue.
    Clear, thanks for looking into this!
  • Any plans to support the Plant sensor?
  • Tim_Brass said:
    Any plans to support the Plant sensor?
    It's a Bluetooth device, Homey does not support Bluetooth devices yet (at least not properly).
  • I read a couple of articles about robotic vacuum cleaners https://bestvacuum.reviews/robot-vacuum/. As I have always wanted one of them(pretty funny device). Are there people who used them unconditionally? I have a few questions.
    Firstly - are they really powerful enough to clean the house well?
    Secondly - which models can be definitely connected to the "smart house"? Will those listed in that article fit, or should I think about something else?
  • I read a couple of articles about robotic vacuum cleaners https://bestvacuum.reviews/robot-vacuum/. As I have always wanted one of them(pretty funny device). Are there people who used them unconditionally? I have a few questions.
    Firstly - are they really powerful enough to clean the house well?
    Secondly - which models can be definitely connected to the "smart house"? Will those listed in that article fit, or should I think about something else?
    Have a look at this topic: https://forum.athom.com/discussion/2251/the-homey-and-robot-vacuum-cleaners-topic
  • Phuturist said:
    I read a couple of articles about robotic vacuum cleaners https://bestvacuum.reviews/robot-vacuum/. As I have always wanted one of them(pretty funny device). Are there people who used them unconditionally? I have a few questions.
    Firstly - are they really powerful enough to clean the house well?
    Secondly - which models can be definitely connected to the "smart house"? Will those listed in that article fit, or should I think about something else?
    Have a look at this topic: https://forum.athom.com/discussion/2251/the-homey-and-robot-vacuum-cleaners-topic
    Thanks, I have already bought one from dyson)
  • Also having problems with commands sent to the vacuum cleaner. Starting vacuum cleaning is no problem but every command after that failes with a red exclamation mark and 'call to device timed out' error.
  • rtna said:
    Also having problems with commands sent to the vacuum cleaner. Starting vacuum cleaning is no problem but every command after that failes with a red exclamation mark and 'call to device timed out' error.
    This is a know issue and will most likely not be resolved any time soon. It's caused by the latest firmware and I dont think Xiaomi cares since the API is not officially supported. You can track progress here: https://github.com/aholstenson/miio/issues/59
  • PhuturistPhuturist Member
    edited October 2017
    Is there anyone who still has a working Mi Robot device in Homey with the Xiaomi Mi Home app? Mine was sort of working but I removed it to test the pairing process in the new SDK2 app. Now all commands time out. Seeying more and more people experience issues I'm thinking of dropping support for the Xiaomi Mi Robot all together. It's a shame but it's useless if it aint working.

    [EDIT]
    I have just submitted a new version of the Xiaomi Mi Home app to the beta channel. It will be available in a few days but I'm looking for beta testers. Here is the change log.
    • UPDATE: code rewrite for SDK2
    • IMPROVEMENT: use polling mechanism for Mi Robot Vacuum Cleaner (requires repairing)
    • IMPROVEMENT: switched from custom capability for air quality to the new default pm2.5 capability for the Air Purifier (require repairing of the air purifier)
    • NEW: changed Yeelight driver to support Yeelight LED strip (require repairing of ALL Yeelight devices)
    • NEW: added extra action cards for Yeelights: Change brightness over time, Custom command (advanced), Set default on state
    • UPDATE: made use of official donation button feature of Homey app store

    I'm looking for people who can test the following:
    • how the Yeelights perform
    • if the Yeelight LED strip can be added as device
    • if Air Purifier and Humidifier still work
    • if someone is still able to pair his/her Mi Robot Vacuum cleaner
    • let the app run for some time to see if no mem warnings are given
  • I have 4 Yeelights working nicely with the current driver app. When the update hits I will let you know.
  • I have just published a new version of the Xiaomi Mi Home app to the beta channel. Here is the change log.
    • UPDATE: code rewrite for SDK2
    • IMPROVEMENT: use polling mechanism for Mi Robot Vacuum Cleaner (requires repairing)
    • IMPROVEMENT: switched from custom capability for air quality to the new default pm2.5 capability for the Air Purifier (require repairing of the air purifier)
    • NEW: changed Yeelight driver to support Yeelight LED strip (require repairing of ALL Yeelight devices)
    • NEW: added extra action cards for Yeelights: Change brightness over time, Custom command (advanced), Set default on state
    • UPDATE: made use of official donation button feature of Homey app store

    I'm looking for people who can test this beta release and specifically the following:
    • how the Yeelights perform
    • if the Yeelight LED strip can be added as device
    • if Air Purifier and Humidifier still work
    • if someone is still able to pair his/her Mi Robot Vacuum cleaner
    • let the app run for some time to see if no mem warnings are given
This discussion has been closed.