Xiaomi Yeelight E27 bulb component

Thanks! I got them working already :slight_smile: Sorry, although I did read the docs before, didn’t figure out how to make the scenes available to Google Home. I was missing the step where you expose the scenes to emulated_hue:

emulated_hue:
  listen_port: 80
  host_ip: 192.168.1.XXX
  expose_by_default: true
  exposed_domains:
    - light
    - switch
    - scene

Same problem here, was working fine with Limitlessled.

  action:
    - service: light.turn_on
      data:
        entity_id: light.bedroom
        brightness: 10
        color_name: red
    - service: light.turn_on
      data:
        entity_id: light.bedroom
        brightness: 255
        color_name: white
        transition: 1200   

I don’t have any default transition activated in the yeelight conf.

1 Like

does anyone else’s bulb regularly go ‘unavailable’. Mine do and its really annoying. Additionally, home assistant seems quite slow to respond to the toggle switch. It wont call the service immediately and went I toggle it on/off quickly then it never recognises both actions

i have not assigned them a static IP yet. would this help?

Yes that could help, because as soon as your router changes the ip of the bulb it is not getting recognized. So when you set a static ip for the bulbs they always match your config. I can spam the on and off button and it works all the time.
But you cannot set the static ip in the miihome app. you have to do it trough your router.

I have this problem.

I have 6 bulbs and 2 light strips.

All of them go unavailable at the same time. I have music mode on, but doesn’t seem to make a difference.

I don’t have any Wifi issues, they don’t drop packets when pinging their IP when they go unavailable in HA?

I’m using Hass.io too, if it makes any difference? They are all on the latest firmware and HA is latest version too.

It’s becoming very fustrating, is this happening to everyone else?

I enabled music mode and then disabled it again. It didn’t seem to make any difference.

Very strangely, my lights seem to act up in relation to my presence in the house. When i am in there are seldom times when they go ‘unavailable’ but as soon as i leave they go bonkers (please see pictures)



all fine untill i leave for work and then boom…‘unavailable’ on repeat all day long

this is an exmaple of the errors i get in my log file (all day long)

2017-10-25 07:37:46 ERROR (SyncWorker_6) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
2017-10-25 07:37:51 ERROR (SyncWorker_2) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
2017-10-25 07:37:56 ERROR (SyncWorker_8) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
2017-10-25 07:38:01 ERROR (SyncWorker_7) [homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
2017-10-25 07:41:18 ERROR (SyncWorker_4) [homeassistant.components.light.yeelight] Unable to update bulb status: A socket error occurred when sending the command.
2017-10-25 07:41:18 ERROR (SyncWorker_6) [homeassistant.components.light.yeelight] Unable to update bulb status: A socket error occurred when sending the command.
2017-10-25 07:41:18 ERROR (SyncWorker_10) [homeassistant.components.light.yeelight] Unable to update bulb status: A socket error occurred when sending the command.
2017-10-25 07:41:18 ERROR (SyncWorker_12) [homeassistant.components.light.yeelight] Unable to update bulb status: A socket error occurred when sending the command.
  - platform: yeelight
    devices:
      192.168.0.36:
        name: Fish Lamp
      192.168.0.37:
        name: Floor Lamp
      192.168.0.38:
        name: Table Lamp
      192.168.0.139:
        name: Bedroom

any help would be greatly appreciated!

EDIT: I set a static ip of 192.168.0.139 for my bedroom light but it has made 0 difference as its as bad as the rest

Assign a static IP and don’t use music mode. I have seen very few accounts of music mode helping anything. Static IPs for your devices that use them as part of the configuration are a must. Your router will frequently renegotiate IPs with your devices, usually they stay the same, but they can change, which will just make that item invisible to HA.

Your issue (to me at least) seems to be a network of wifi issue or the power is being cut. NMAP doesn’t see your phone and you go away and then your wifi connected bulbs cannot communicate with HA.

I would check that the power isn’t being cut also. If someone is turning off the switch, the bulb loses power and can’t communicate.

hi silvrr, do you have any suggestions what i could do?

I am going to remove nmap temporarily and see if it makes a difference. In terms of wifi, the router remains on power and once i leave for work no one else is in to switch off lamps or the router

I have 100meg internet but a crappy virgin Superhub 3.0 so there is not much customization options. would port forwarding a specific port help?

All the yeelight stuff is internal for HA so your external connection or port forwarding doesn’t come into play here.

I had a base level netgear router and as I added more and more wifi devices it would struggle, especially when we would stream TV at night. the NMAP can add a lot of traffic also depending on your settings. I offloaded my routing to another box and my issues went away. Im not saying that is your issue but it may be worthwhile to lighten the load on your router a bit and see if the issues persist.

You can try looking at your router logs also for any indication of issues.

1 Like

i have figured out the Nmap is not the problem; it is BT. I am still having the issue and no idea how to fix it.

I am having the ‘unavailable’ issue but don’t have any Bluetooth tracking so I wouldn’t yet suggest that this is the cause.

I have same issue in HA.
I had same issue in [yeelight-homebridge] plugin. but, yeelight-homebridge developer solved this issue.
(yeelight-homebridge developer is Yeelight staff developer)

http://forum.yeelight.com/t/homebridge-plugin/83/118 <<< this is that thread.

I checked yeelight-homebridge log.

new code effect is reconnect between yeelight, homebridge server. (almost every 5sec)

maybe HA must reconnect to yeelight often.

sorry for bad english

Same here… after the upgrade to 0.57. No bluethooth config here. All yeelights come available for some time… and fall back to unavailable

Just got one yeelight-white and wow its a headache to get it to work in HA

all am getting is unavailable

I have tried lots of combination
example…
light:

  • platform: yeelight
    devices:
    192.168.0.198:
    name: ‘testing 1st yeelight’

still no luck it working great on the app. also, the device_tracker says it home and I tested home and not-home and this park I know is true.

Love to see some’s setting where its working

Did you enable LAN Control in yeelight app?

how do I enable LAN Control in yeelight app and enable development mode
I have look all over the app and I don’t see where to do this

I wrote up some detailed instructions here. Not sure if they are still up to date.

In new yeelight app it looks like this.

Development mode is renamed to lan control.

Hmm, I saw the new app and was wondering if I needed to update the instructions. I don’t have rights to edit that post anymore though.