The mac address comes from the discovery process, so at some point the bulb has emitted that properly. Otherwise the error message is too general to say anything about why it’s failing, you would need to enable debug logging for that platform and yeelight
.
Can I ask how to do this? How do I know what traffic to block (and where do I do this? On the Pi or the router?)
This is a very router specific question and be aware that the app won’t work when internet traffic is blocked. The app and bulbs communicate with a common server (yeelight server in China, Korea and I think there is one other option) to allow you to access anywhere you go.
I have my bulbs on a fixed IP on my network. Then I block those IPs from communicating outside their own network with my router/firewall. So no internet or access to my personal networks.
This can be accomplished on most routers with either settings to block traffic or a work around using the parental controls. Do some googling related to your specific router.
In my case yeelight bulbs work ok but I am getting the logs below every ~20mins, using Hassbian 0.68.1.
[homeassistant.components.light.yeelight] Failed to connect to bulb 192.168.1.17, X: A socket error occurred when sending the command.
[homeassistant.components.light.yeelight] Unable to update bulb status: Bulb closed the connection.
I’ve got the Xiaomi Yeelight E27 but it seems duplicated.
- Street Light Bulb
- yeelight_ct2_7c49eb1519dc
I’ve got as config
known_devices.yaml
street_light:
name: Street Light Device
mac: 7C:49:EB:15:19:DC
icon: mdi:lightbulb
hide_if_away: false
track: true
light.yaml
- platform: yeelight
devices:
192.168.0.64:
name: Street Light Bulb
Did I set something wrong ?
Thanks !
Why did you add it to known devices?
It got added automatically. I just renamed it.
But I don’t think it’s related to the duplication as I named it Street Light DEVICE in known_devices
It shows there is something wrong with your config.
it’s a wifi light bulb so I guess that it was added by my nmap scanner ?
device_tracker:
platform: nmap_tracker
hosts: 192.168.0.0/24
home_interval: 10 # minutes before scanning again an existing device
interval_seconds: 60 # seconds between each scan
scan_options: " --privileged -F --host-timeout 5s "
very strange, I restarted HA three times and now the duplicate disappeared,
I’ve now got only the correct one light.street_light_bulb !
I don’t know how it got fixed…
With those Yeelights you don’t need to configure them as they are auto-discovered. You could turn off auto-discovery if you want to set options manually.
Thanks for the hint. I too had duplicates entries until I did the following for my Yeelights:
discovery:
ignore:
- yeelight