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)

2456713

Comments

  • @dENNtoet, there is another user reporting timeouts for his Robot Vacuum Cleaner. Do you know your way around the command line? Although I was hoping to stay away from it I could create a version of the app that polls the robot for it's status instead of doing live requests. Downside is no realtime data and a lot more network traffic even when the robot is idle but possible upside could be that it reduces the number of simultaneous request to the robot. It's worth testing.

    Let me know.
  • After installing the new version(2.1.0) i having problems connection to the vacuum cleaner. i have the correct token and ip. i needed 29 trys to accept the token :P. after i could add the device it was nearly impossible to let it work (timeout).

    in a quick view i saw that u use miio libary version 12, i don't know if 13 fixed things?
    "https://registry.npmjs.org/miio/-/miio-0.13.0.tgz"


  • PhuturistPhuturist Member
    edited July 2017
    Robiebab said:
    After installing the new version(2.1.0) i having problems connection to the vacuum cleaner. i have the correct token and ip. i needed 29 trys to accept the token :P. after i could add the device it was nearly impossible to let it work (timeout).

    in a quick view i saw that u use miio libary version 12, i don't know if 13 fixed things?
    "https://registry.npmjs.org/miio/-/miio-0.13.0.tgz"


    That new version of the library only fixes a small coding error in the library, so that will not make a difference. See the post just above yours which I posted at the same time. There is not much I can do other than switching to polling for the device. And on which Robot firmware are you, perhaps it's related to the latest firmware which I have not received myself yet.
  • i'm on firmware: 3.3.9_003077
  • RuudvBRuudvB Member
    @Phuturist
    Great job!! I just added my yeelights, peace of cake now :)
    Will play with it more tomorrow but for now THANK YOU!
  • RuudvB said:
    @Phuturist
    Great job!! I just added my yeelights, peace of cake now :)
    Will play with it more tomorrow but for now THANK YOU!
    me too! so far it looks/works great!
  • Yesterday I added two of my Yeelights and that worked fine. Unfortunately, the app crashes a lot afterwards. When I restart the app, I'm able to control the lights just fine. Homey is also able to control them from the flows, but after a while the app crashes again.
  • Amelsfort said:
    Yesterday I added two of my Yeelights and that worked fine. Unfortunately, the app crashes a lot afterwards. When I restart the app, I'm able to control the lights just fine. Homey is also able to control them from the flows, but after a while the app crashes again.
    I submitted a bug fix in the app store yesterday for at least one bug. What does the red triangle say in the apps page?
  • Phuturist said:
    Amelsfort said:
    Yesterday I added two of my Yeelights and that worked fine. Unfortunately, the app crashes a lot afterwards. When I restart the app, I'm able to control the lights just fine. Homey is also able to control them from the flows, but after a while the app crashes again.
    I submitted a bug fix in the app store yesterday for at least one bug. What does the red triangle say in the apps page?
    I haven't checked the triangle. I was restarting the app from my mobile (using desktop view of the Homey webpage). And now the app hasn't crashed.... But I'll keep an eye on it!
  • 2017-07-10 -- v2.1.1

    • FIX: fixed app crashing due to error in connection with Yeelight (which could be the case then the Yeelight is unplugged)
  • RobiebabRobiebab Member
    edited July 2017
    i found out that on firmware: 3.3.9_003077 it is possible to send a command using the app except you have to wait  2 min before you can use the next command. i don't know if something is buildin that can cause this timeout?

    [quick code  look]
     if i look into the code, i see 2 things that match that outcome: 120000 or 120 packet.js (handshake) and token.js(MAX_STALE_TIME) in the mii folder


  • RuudvBRuudvB Member
    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 :)
  • @Phuturist yes I do know my way around the command line, what do you want me to test?
  • 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.


  • RuudvBRuudvB Member
    Phuturist said:
    @RuudvB , perhaps in the future but dont count on it. That's way beyond the default device support.
    I totally agree :) This is definitely not a task as default support. 
    Still i'm hoping there are some guys around with clever idea's that have some (partly) solutions.

    As for testing I just added some tasks for the same light about 1 second apart. This results in an push message error stating "Syntax error Unexpected token at O" (the rest is off screen) Not sure what causes this. Below a simple flow just for testing.


  • RuudvB said:
    Phuturist said:
    @RuudvB , perhaps in the future but dont count on it. That's way beyond the default device support.
    I totally agree :) This is definitely not a task as default support. 
    Still i'm hoping there are some guys around with clever idea's that have some (partly) solutions.

    As for testing I just added some tasks for the same light about 1 second apart. This results in an push message error stating "Syntax error Unexpected token at O" (the rest is off screen) Not sure what causes this. Below a simple flow just for testing.


    It's caused by too many commands executed after each other and the Homey app cant keep up with the status updates being send by the Yeelight. I'm just worked on some code of which I hope will prevent the app from crashing over this and will push it to the app store. The guys at Athom must be going nuts over all these app approvals .. :-)
  • RuudvBRuudvB Member
    Phuturist said:
    It's caused by too many commands executed after each other and the Homey app cant keep up with the status updates being send by the Yeelight. I'm just worked on some code of which I hope will prevent the app from crashing over this and will push it to the app store. The guys at Athom must be going nuts over all these app approvals .. :-)
    I already guessed something like that, great that you found it so quickly.

    >>The guys at Athom must be going nuts over all these app approvals .. :-)<<
    They better not complain; they should have done the job.... :p
  • 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.
  • 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.
  • RuudvBRuudvB Member
    edited July 2017
    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.
    Interesting... I never thought about asking homey for a specific color, in fact I don't ask very much anymore because of the speech issues.
    I wonder how homey would know what type of blue you want, since there is a large pallet of blue shades possible. If possible, can we also use this in flows?

    BTW, I have ordered more Yeelights yesterday. They will replace some WEMO lights that I found not to be reliable. There is _ALWAYS_ another update in the app, lights keep disappearing from the app, lights stay off or on because homey cannot make a connection. 

    If someone is interested in the WEMO's just drop me a pm :)
  • 2017-07-11 -- v2.1.2

    • FIX: fixed app crashing due to error in processing Yeelight status
  • RuudvB said:

    BTW, I have ordered more Yeelights yesterday. 

    Found any good deals ? Now that the app for yeelight is working good im ready to expand.
  • zimbrazimbra Member
    RuudvB said:

    BTW, I have ordered more Yeelights yesterday. 

    Found any good deals ? Now that the app for yeelight is working good im ready to expand.
    http://www.gearbest.com/smart-lighting/pp_361555.html
    €15 euro for E27 color lamps
  • zimbrazimbra Member
    Imperihome now also supports yeelights ;)
  • RuudvBRuudvB Member
    zimbra said:
    RuudvB said:

    BTW, I have ordered more Yeelights yesterday. 

    Found any good deals ? Now that the app for yeelight is working good im ready to expand.
    http://www.gearbest.com/smart-lighting/pp_361555.html
    €15 euro for E27 color lamps
    Very good! I used the same link For € 14,88 you can't go wrong I would think :)
  • RuudvBRuudvB Member
    Phuturist said:

    2017-07-11 -- v2.1.2

    • FIX: fixed app crashing due to error in processing Yeelight status
    Yup, I can confirm no more crashing. Thanks again!
  • ncickcncickc Member
    I'm not able to find and connect to any of my Yeelight bulbs anymore since the last update (auto discovery is not working). All bulbs were working okay in the version before (with manual pairing)..
    Does someone has any advice?
  • ncickc said:
    I'm not able to find and connect to any of my Yeelight bulbs anymore since the last update (auto discovery is not working). All bulbs were working okay in the version before (with manual pairing)..
    Does someone has any advice?
    Did you read the instructions before trying to pair your Yeelights?

    Adding Yeelights

    This Homey app supports direct control for Yeelights. Before being able to add your Yeelights as devices in Homey you will need to enable the "Developer Mode". You can do this by using the official Yeelight app on your smartphone (not the Xiaomi Mi Home app but the actual Yeelight app). In this app go into the settings of your bulb and you will see a menu item called Developer Mode. This contains a toggle to enable the developer mode. After enabling this the Homey app will be able to autodiscover your bulb when adding it as new device.

  • ncickcncickc Member
    Completely missed this instruction ... :s
    All working perfectly now, thanks!! 
  • 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).
This discussion has been closed.