Xiaomi Philips Zhirui Downlights

Hi,
I have 3 of these installed, but I can’t add them to HA.

This is my config.yaml section:
entity_id: switch.sonofftouch1

  - platform: xiaomi_miio
    name: livingroom_tv_light1
    host: 192.168.131.171
    token: !secret philips_down3
    model: philips.light.bulb

I get these messages in the log:

> 2019-04-26 16:29:13 ERROR (MainThread) [homeassistant.components.xiaomi_miio.light] Got exception while fetching the state: Unable to discover the device 192.168.131.171
> 2019-04-26 16:29:20 ERROR (SyncWorker_4) [homeassistant.components.yeelight] Unable to update bulb status: A socket error occurred when sending the command.

I followed the instruction here and in this post. and I got the keys from the devices.

Please help, I dont know what I am doing wrong…

Thanks for the helpers,
Naor.

Found the problem… seems like the light must be in the same VLAN/Subnet as HA server.

Got the clue from this post…

Once I added them to the same wifi network, they worked like a charm!

Maybe this should be added to the device HA config page…

Hey! i know you solved the problem, but i’m struggling witchxiaomi zhirui and maybe you can help me, can you show me how did you add them to configuración.yaml?

i can only have 1 of them in ha, if i add more ha just ignore them.

Sure… Below is my config for these lights. But look at what I wrote… They must be on the same network as your HA server!

  - platform: xiaomi_miio
    name: livingroom_tv_light1
    host: 192.168.129.171
    token: !secret philips_down1
    model: philips.light.downlight
  - platform: xiaomi_miio
    name: livingroom_tv_light2
    host: 192.168.129.172
    token: !secret philips_down2
    model: philips.light.downlight
  - platform: xiaomi_miio
    name: livingroom_tv_light3
    host: 192.168.129.173
    token: !secret philips_down3
    model: philips.light.downlight
  - platform: group
    name: livingroom_mood_wall
    entities:
      - light.livingroom_tv_light1
      - light.livingroom_tv_light2
      - light.livingroom_tv_light3

wow, thank you, with your help now i’ve got it working!! just one more thing, does lights appears as devices or just as entities? because for making automations, it’s necesary to appear as devices.

It depends on where you configure them. On my config they are under the “light” family devices so they are fully accessible with all light services for automation. I actually have them in several automation myself.

Happy to help.

Naor

Sorry for noob question, I have 20 of this and not sure about value of !secret field and ip address. Guess, every single fixture need to have its own ip address from given range and that !secret need to be wifi password or…?

Oh… you pulled out an oldie…

As you can see from my config, you need to create an entry for each bulb. on each you can specify its IP and password in the secrets file