Welcome to the Athom Community Forum! This is a place to share ideas, ask for help and discuss about Homey in general.

Please read Welcome to the forum to get started.

[APP v2.0.0 beta] Xiaomi Mi Home (supports Yeelight, Robot Vacuum etc.)

PhuturistPhuturist Member
edited June 5 in Apps

Control Xiaomi Mi Home Wi-Fi devices

App Store Page: https://apps.athom.com/app/com.xiaomi-miio

Use Homey to control Xiaomi Mi Home devices (the Mi Home Ecosystem is also branded as MiJia) that use the miIO protocol. Currently Xiaomi does not offer an open API for controlling these devices. This app uses an unofficial library called the miIO Device Library for communication with these devices, credits go out to the author of this library. This Homey app only adds support for some of the devices that can be controlled directly through Wi-Fi, there is a whole range of Mi Home sensors that can only be used together with the Xiaomi Smart Home Gateway (which uses ZigBee) but this is out the scope of this app.

Warning

For Homey to be able to communicate with these devices a unique device token needs to be obtained. Most of the miIO devices hide their token and some technical skills are needed for retrieving these tokens. If your are not to tech-savvy this app might not be of any use to you. That being said, in the readme of the app in the apps store is explained on how to obtain your token.

Supported devices

Below is a list of currently supported devices and devices that might be supported in the future if there is demand for this. Post a comment in the app store if you would like to see support for a specific device.

  • Yeelight Bulbs Wi-Fi, both color and white (partially supported, no hue and saturation and tested)
  • Robot Vacuum Cleaner (tested)
  • Air Purifiers 2 and Pro (untested)
  • Humidifier (untested)
  • NOT SUPPORTED: Yeelight Desk Lamp, Yeelight LED Strip, Yeelight Ceiling Lamp
  • NOT SUPPORTED: Smart Socket Plug and Power Strips
  • NOT SUPPORTED: Lunar Smart Sleep Sensor
  • NOT SUPPORTED: Air Quality Monitor (PM2.5)

Changelog

2017-06-01 -- v2.0.0

Comments

  • TaxandriaTaxandria Member
    Wow cool. Any chance of connection to the these as well?

  • TedTolboomTedTolboom Moderator, Backer - Geek Edition, Homey Ambassador
    @Taxandria I'm not sure if the bridge of these sensors is accessible through the miIO library.

    I've ordered one set and will have a look once Homey 1.4 enables Zigbee if it is possible to create a driver to communicate directly with these sensors (without the need of a bridge).
  • PhuturistPhuturist Member
    @Taxandria  @TedTolboom
    The Xiaomi Mi Smart Home Kit is supported over Wi-Fi through the miio protocol through the gateway but support has not been built into this app (yet). It gets somewhat complex as you need to register a device (the gateway) to control other devices (the sensors). These kind of dependencies are not supported by default within Homey. With only one gateway you could perhaps register it in the settings of the app but once you have multiple gateways it gets really complex.

    Anyway, a much more elegant solution would be to support the sensors directly over Zigbee without the gateway as Ted already mentioned. Zigbee should become available with firmware 1.4. Athom has no plans to look into this integration so we do depend on the community to look into this. I dont own the Mi Home Smart Kit myself and will not have it any time soon. But I'm sure that if there are any possibilities that Ted will look into it, either through Zigbee directly or by using the miio protocol.

    My focus for this app will first be to improve the Yeelights support. It's still a bit messy and can be improved a lot.

  • AlanMccormickAlanMccormick Backer - Early Bird
    I can confirm the air purifier works, except for speed control. Issue raised in GitHub.
  • PhuturistPhuturist Member
    I can confirm the air purifier works, except for speed control. Issue raised in GitHub.
    Thanks for reporting. It's been fixed in master of the repository. Will publish a new beta release some time soon. Just waiting on a little more feedback.
  • AlanMccormickAlanMccormick Backer - Early Bird
    Fix confirmed!
  • I've tested it with a yeelight color, capturing the token does take some knowledge.

    First check wich ip adres you get when you connect to the yeelight wi-fi, it isn't always 192.168.8.1   (in my case it was 192.168.13.1).

    When i add the yeelight in the App it's not clear wich bulb is the color one. (both can be used, i checked)

    Looking up your ip adres in your router (takes some knowledge), you then also have to make a reserveration so that the local ip adres keeps the same.

    Problem is that i cant seem to get color working.




  • I've tested it with a yeelight color, capturing the token does take some knowledge.

    First check wich ip adres you get when you connect to the yeelight wi-fi, it isn't always 192.168.8.1   (in my case it was 192.168.13.1).

    When i add the yeelight in the App it's not clear wich bulb is the color one. (both can be used, i checked)

    Looking up your ip adres in your router (takes some knowledge), you then also have to make a reserveration so that the local ip adres keeps the same.

    Problem is that i cant seem to get color working.




    I hope to improve the pairing proces for Yeelights in a future update. Currently colors (hue and saturation) are not working yet in this beta version, this is mentioned in the README of the app. Yeelights dont allow to set these values individually and I still need to figure out how to convert RGB values to hue and saturation values.
  • casedacaseda Moderator
    edited June 14
    @Phuturist
    see the tinycolor2 node.js module :smile: you can do a lot of color convertions,
    though homey already uses hue (0.00 - 1.00) and saturation (0.00 - 1.00), not RGB?
  • caseda said:
    @Phuturist
    see the tinycolor2 node.js module :smile: you can do a lot of color convertions,
    though homey already uses hue (0.00 - 1.00) and saturation (0.00 - 1.00), not RGB?
    Yeah, had been looking into a similar color conversion library. Yeelights allow RGB or HSV, no individual hue or saturation. A RGB or HSV capability in the light class would have been a lot more easier but it's not that I dont know how to make this work but it's the lack of time.
  • casedacaseda Moderator
    yeah :sweat_smile: i know all about the time issues at the moment
  • JooleeJoolee Backer - Super Early Bird
    Phuturist said:
    Anyway, a much more elegant solution would be to support the sensors directly over Zigbee without the gateway as Ted already mentioned. Zigbee should become available with firmware 1.4. Athom has no plans to look into this integration so we do depend on the community to look into this. I dont own the Mi Home Smart Kit myself and will not have it any time soon. But I'm sure that if there are any possibilities that Ted will look into it, either through Zigbee directly or by using the miio protocol.

    If you need a set, I'ts collecting dust with me right now because I couldn't get the multicast API working reliably with Homey. I can drop it off if you live in the Randstad.
  • TedTolboomTedTolboom Moderator, Backer - Geek Edition, Homey Ambassador
    @joolee I expect to receive my Mi smart home set early next week. 1.4.0-alpha.2 has been released to Development-Preview and installed on my Homey...
    will start looking into a Mi Zigbee app once the set arrives...
  • Joolee said:
    Phuturist said:
    Anyway, a much more elegant solution would be to support the sensors directly over Zigbee without the gateway as Ted already mentioned. Zigbee should become available with firmware 1.4. Athom has no plans to look into this integration so we do depend on the community to look into this. I dont own the Mi Home Smart Kit myself and will not have it any time soon. But I'm sure that if there are any possibilities that Ted will look into it, either through Zigbee directly or by using the miio protocol.

    If you need a set, I'ts collecting dust with me right now because I couldn't get the multicast API working reliably with Homey. I can drop it off if you live in the Randstad.
    I appreciate the offer but I live in Groningen, so that's not gonna happen. Next to that, I'm seriously meeting the limits of my coding skills already. I doubt if I'll be capable to get it working.

    I'm currently working on auto discovery of yeelights. The yeelights offer an open api next to the miio protocol. Got auto discovery working but I'm stuck with maintaining an open socket for communication. I really wish I was better at coding.
Sign In or Register to comment.