Xiaomi Yeelight E27 bulb component

not sure about what you mean. But no the yeelight are not part of an automation … but let me check script

I have only ip address and name, no automatic_add, nothing else.

- platform: yeelight
  devices:
    192.168.z.x:
      name: Living Room Light
    192.168.z.y:
      name: Living Room Corner Light

ok, removed automatic add
removed the pycache directory
just recopied mxtra file (just in case)

rebooting.

The IP is correct, I checked on the MIHome app

this also I dont understand

mine

  - platform: yeelight
    devices:
      192.168.1.203:
        name: Hallway left
      192.168.1.204:
        name: Living table lamp
      192.168.1.187:
        name: TV Room top lamp

And, still doesn’t work?
Paste your error log here.

Regarding the “Then check that you didn’t mix up the ip and name in the devices list/section.” I was trying to say that your ip might be pointing to the hallway left instead of TV room top lamp, so just check if the ip points to the correct device in order to avoid confusion when reading the error messages.

nada all 3 lights disappeared WTF???

in log it shows the error for lights 192.168.1.187 and 204,

while the white lamo 192.168.1.203 nowhere, totally disappeared also in log … that is weird

17-01-12 22:08:57 custom_components.light.yeelight: Failed to connect to bulb 192.168.1.187, TV Room top lamp
17-01-12 22:08:57 custom_components.light.yeelight: Failed to connect to bulb 192.168.1.204, Living table lamp

17-01-12 22:08:57 homeassistant.core: Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 335, in _async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 204, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    state = self.state
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 338, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/home/hass/.homeassistant/custom_components/light/yeelight.py", line 100, in is_on
    return self.bulb.isOn()
AttributeError: 'YeelightBulb' object has no attribute 'isOn'

I checked in router and in Mihome app, the IP are fine. The 3 lamp work perfectly in Mihome app.

Yesterday the white lamp was working perfectly. The 2 RGB lamp no. Now all 3 do not work … GGRRRRR

This is wired. HA complains that it cannot connect to the lights.
I would start looking at the server/pc running HA and at the home network. It looks like a IP connectivity problem.
Check if you can ping the ip’s from your HA box, maybe it lost connection for some reason. Maybe your HA box needs a reboot :slight_smile:

I reboot HA (on pi3), the router and extender

Still the same… everyday there is another at this HASS, I am getting tired

17-01-12 22:27:30 custom_components.light.yeelight: Failed to connect to bulb 192.168.1.187, TV Room top lamp
17-01-12 22:27:30 custom_components.light.yeelight: Failed to connect to bulb 192.168.1.204, Living table lamp
17-01-12 22:27:30 homeassistant.core: Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 335, in _async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 204, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    state = self.state
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 338, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/home/hass/.homeassistant/custom_components/light/yeelight.py", line 100, in is_on
    return self.bulb.isOn()
AttributeError: 'YeelightBulb' object has no attribute 'isOn'

what is sooo strange is that the white light it disappeared entirely from HASS

Can you ping the lights from your pi? This will tell you if it’s a connectivity or a hass issue?
Also, I saw somewhere a telnet command you can use to test if you can trigger an event on the light from the command line. This basically tells you if it’s a hass issue or a yeelight (probably firmware/developer mode) issue.

yes
pi@raspberrypi:~ $ ping 192.168.1.203
PING 192.168.1.203 (192.168.1.203) 56(84) bytes of data.
64 bytes from 192.168.1.203: icmp_seq=1 ttl=255 time=5.93 ms
64 bytes from 192.168.1.203: icmp_seq=2 ttl=255 time=634 ms
64 bytes from 192.168.1.203: icmp_seq=3 ttl=255 time=599 ms
64 bytes from 192.168.1.203: icmp_seq=4 ttl=255 time=1.49 ms
64 bytes from 192.168.1.203: icmp_seq=5 ttl=255 time=1.89 ms
64 bytes from 192.168.1.203: icmp_seq=6 ttl=255 time=1.55 ms
64 bytes from 192.168.1.203: icmp_seq=7 ttl=255 time=5.07 ms
64 bytes from 192.168.1.203: icmp_seq=8 ttl=255 time=1.93 ms
64 bytes from 192.168.1.203: icmp_seq=9 ttl=255 time=2.14 ms
^C
— 192.168.1.203 ping statistics —
9 packets transmitted, 9 received, 0% packet loss, time 8010ms
rtt min/avg/max/mdev = 1.495/139.316/634.097/255.416 ms

not sure what you mean.

The white lamp does not exist as entity_id.

Now I removed the RGB lights from HASS, still error, and of course now it does not say cannot find the 2 rgb lampo

17-01-12 22:33:44 homeassistant.components.light: Setting up light.yeelight
17-01-12 22:33:44 homeassistant.core: Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.4/asyncio/tasks.py", line 237, in _step
    result = next(coro)
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 335, in _async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity_component.py", line 204, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 220, in async_update_ha_state
    state = self.state
  File "/srv/hass/hass_venv/lib/python3.4/site-packages/homeassistant/helpers/entity.py", line 338, in state
    return STATE_ON if self.is_on else STATE_OFF
  File "/home/hass/.homeassistant/custom_components/light/yeelight.py", line 100, in is_on
    return self.bulb.isOn()
AttributeError: 'YeelightBulb' object has no attribute 'isOn'
17-01-12 22:33:44 homeassistant.core: Bus:Handling <Event state_changed[L]: new_state=<state group.all_lights=unknown; friendly_name=all lights, auto=True, order=2, entity_id=('light.hallway_left',), hidden=True @ 2017-01-12T22:33:44.205347+01:00>, old_state=None, entity_id=group.all_lights>

now I removed entirely the custom component light/yeelight of mxtra

Removed the 2 rgb from configuration.

Restart HASS, now the white lamp is working, I guess under standard HA component yeelight.

EDIT: the white lamp is present in front end, but not working 100% correctly

now removed the white, keep the 2 rgb and put the mxtra custom_component.

Still it fails to connect to the 2 rgb, but no other errors in the log

17-01-12 22:53:03 custom_components.light.yeelight: Failed to connect to bulb 192.168.1.187, TV Room top lamp
17-01-12 22:53:03 custom_components.light.yeelight: Failed to connect to bulb 192.168.1.204, Living table lamp

Did anyone test this with the Yeelight Strip?

http://m.gearbest.com/smart-lighting/pp_424884.html

Yes, works fine for me.

Hi @anon35356645,

In my case y have HA working on raspberry pi 2 B, and 5 white lamps+ 1 RGB, and all works well.

I have HA version 0.33 with custom_component yeelight and i don’t have any problem.

Just now i have disconnected the RGB because a friend wants test it at their home. Once when he will return to me, i csn show you.