GithubHelp home page GithubHelp logo

yeelight_v2's People

Contributors

ezcgman avatar silvest89 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

ezcgman

yeelight_v2's Issues

Incorrect color range for Xiaomi Mi LED Desk Lamp 1S

Config for Lamp 1s in HA:
min_mireds: 153
max_mireds: 370
effect_list:

  • Slow Temp
  • Stop
    supported_color_modes:
  • color_temp
    friendly_name: My Lamp
    supported_features: 47
    ...

But the real range is 200-384 (min-max mireds). So, I have errors like {'code': -5001, 'message': 'invalid params'} (when I select a value outside the real range). Is it a bug of the Lamp or a bug of the integration?

'Illegal Request' when performing saved scenes in HA

I have attached a a log below of an issue I am having when enabling a pre-saved scene in HA. The message pops up in HA after enabling it, something about an illegal request. I have noticed that any interplay with the scenes in HA seems to generate this same request. The models being used here are color4 and strip6 (being used as strip1).

The lights change to the scene ok but I am not sure what the error message is about (error -5006).

2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_yeelight.yeelight.main] miIO: Bulb<192.168.0.71:55443, type=BulbType.Color> > set_power > ['on', 'smooth', 1000]
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_yeelight.yeelight.main] miIO: Bulb<192.168.0.97:55443, type=BulbType.Color> > set_power > ['on', 'smooth', 1000]
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.71:54321 >>: {'id': 24, 'method': 'set_power', 'params': ['on', 'smooth', 1000]}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.97:54321 >>: {'id': 16, 'method': 'set_power', 'params': ['on', 'smooth', 1000]}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.71:54321 (ts: 1970-01-01 00:11:47, id: 24) << {'id': 24, 'result': ['ok']}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_rgb at 0x7f206e6158b0> with ((255, 183, 123), 1000) {}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.light] Setting RGB: (255, 183, 123)
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_yeelight.yeelight.main] miIO: Bulb<192.168.0.71:55443, type=BulbType.Color> > set_rgb > [16758651, 'smooth', 1000]
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.71:54321 >>: {'id': 25, 'method': 'set_rgb', 'params': [16758651, 'smooth', 1000]}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.71:54321 (ts: 1970-01-01 00:11:47, id: 25) << {'id': 25, 'result': ['ok']}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_colortemp at 0x7f206e6159d0> with (None, 1000) {}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_brightness at 0x7f206e615790> with (204, 1000) {}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.light] Setting brightness: 204
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_yeelight.yeelight.main] miIO: Bulb<192.168.0.71:55443, type=BulbType.Color> > set_bright > [80.0, 'smooth', 1000]
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.71:54321 >>: {'id': 26, 'method': 'set_bright', 'params': [80.0, 'smooth', 1000]}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.71:54321 (ts: 1970-01-01 00:11:47, id: 26) << {'id': 26, 'result': ['ok']}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_flash at 0x7f206e615c10> with (None,) {}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_effect at 0x7f206e615d30> with (None,) {}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_default at 0x7f206e615af0> with () {}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_yeelight.yeelight.main] miIO: Bulb<192.168.0.71:55443, type=BulbType.Color> > set_default > []
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.71:54321 >>: {'id': 27, 'method': 'set_default', 'params': []}
2021-01-31 09:27:28 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.71:54321 (ts: 1970-01-01 00:11:47, id: 27) << {'id': 27, 'error': {'code': -5006, 'message': 'illegal request'}}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.97:54321 (ts: 1970-01-02 12:29:32, id: 16) << {'id': 16, 'result': ['ok']}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_rgb at 0x7f206e6158b0> with ((255, 183, 123), 1000) {}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.light] Setting RGB: (255, 183, 123)
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_yeelight.yeelight.main] miIO: Bulb<192.168.0.97:55443, type=BulbType.Color> > set_rgb > [16758651, 'smooth', 1000]
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.97:54321 >>: {'id': 17, 'method': 'set_rgb', 'params': [16758651, 'smooth', 1000]}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.97:54321 (ts: 1970-01-02 12:29:32, id: 17) << {'id': 17, 'result': ['ok']}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_colortemp at 0x7f206e6159d0> with (None, 1000) {}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_brightness at 0x7f206e615790> with (204, 1000) {}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.light] Setting brightness: 204
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_yeelight.yeelight.main] miIO: Bulb<192.168.0.97:55443, type=BulbType.Color> > set_bright > [80.0, 'smooth', 1000]
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.97:54321 >>: {'id': 18, 'method': 'set_bright', 'params': [80.0, 'smooth', 1000]}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.97:54321 (ts: 1970-01-02 12:29:32, id: 18) << {'id': 18, 'result': ['ok']}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_flash at 0x7f206e615c10> with (None,) {}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_effect at 0x7f206e615d30> with (None,) {}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_default at 0x7f206e615af0> with () {}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_yeelight.yeelight.main] miIO: Bulb<192.168.0.97:55443, type=BulbType.Color> > set_default > []
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.97:54321 >>: {'id': 19, 'method': 'set_default', 'params': []}
2021-01-31 09:27:28 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.0.97:54321 (ts: 1970-01-02 12:29:32, id: 19) << {'id': 19, 'error': {'code': -5006, 'message': 'illegal request'}}

HACS Support

Hi Is it possible installing and updating this using hacs

Invalid config with new core-2021.6.3

Hello,

I have done the update of HA, 2021.6.3, and since the integration is not functional.
I have this error:

"The following integrations and platforms could not be set up:
yeelight_v2"

1S Bulbs (color4) Timing Out

Both bulbs are on a separate VLAN from my HA server and don't have internet access.

I did

git clone --recursive [email protected]:Silvest89/yeelight_v2.git

inside the custom_components folder

added these to my configuration.yaml

yeelight_v2:
  devices:
    10.50.0.30:
      name: Bed
    10.50.0.31:
      name: Desk

logger:
  default: critical
  logs:
    custom_components.yeelight_v2: debug
    custom_components.yeelight_v2.python_yeelight.yeelight.main: debug

then restarted HA

they show up but time out after a few minutes or after I interact with them

2021-01-18 09:04:13 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.30:55443, type=-1> > {'id': 3, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-18 09:04:13 DEBUG (SyncWorker_3) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.31:55443, type=-1> > {'id': 3, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-18 09:04:14 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.30:55443, type=1> < {'id': 3, 'result': ['on', '', '100', '4000', '16711680', '359', '100', '2', '0', '', '', '', '', '', '', '', '', '', '']}
2021-01-18 09:04:14 DEBUG (SyncWorker_3) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.31:55443, type=-1> < {'id': 3, 'result': ['on', '', '100', '4000', '16711680', '359', '100', '2', '0', '', '', '', '', '', '', '', '', '', '']}
2021-01-18 09:04:14 DEBUG (SyncWorker_2) [custom_components.yeelight_v2] Device 10.50.0.30, Bed capabilities: {'id': '0x00000000124c9db9', 'model': 'color4', 'fw_ver': '31', 'support': 'get_prop set_default set_power toggle set_bright set_scene cron_add cron_get cron_del start_cf stop_cf set_ct_abx adjust_ct set_name set_adjust adjust_bright adjust_color set_rgb set_hsv set_music udp_new udp_keep_alive chroma', 'power': 'on', 'bright': '100', 'color_mode': '2', 'ct': '4000', 'rgb': '16711680', 'hue': '359', 'sat': '100', 'name': ''}
2021-01-18 09:04:14 DEBUG (SyncWorker_3) [custom_components.yeelight_v2] Device 10.50.0.31, Desk capabilities: {'id': '0x00000000124d906a', 'model': 'color4', 'fw_ver': '31', 'support': 'get_prop set_default set_power toggle set_bright set_scene cron_add cron_get cron_del start_cf stop_cf set_ct_abx adjust_ct set_name set_adjust adjust_bright adjust_color set_rgb set_hsv set_music udp_new udp_keep_alive chroma', 'power': 'on', 'bright': '100', 'color_mode': '2', 'ct': '4000', 'rgb': '16711680', 'hue': '359', 'sat': '100', 'name': ''}
2021-01-18 09:04:14 DEBUG (MainThread) [custom_components.yeelight_v2.light] Adding Bed
2021-01-18 09:04:14 DEBUG (MainThread) [custom_components.yeelight_v2.light] Adding Desk
2021-01-18 09:04:43 DEBUG (SyncWorker_6) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.30:55443, type=1> > {'id': 4, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-18 09:04:43 DEBUG (SyncWorker_4) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.31:55443, type=1> > {'id': 4, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-18 09:04:44 DEBUG (SyncWorker_4) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.31:55443, type=1> < {'id': 4, 'result': ['on', '', '100', '4000', '16711680', '359', '100', '2', '0', '', '', '', '', '', '', '', '', '', '']}
2021-01-18 09:04:44 DEBUG (SyncWorker_6) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.30:55443, type=1> < {'id': 4, 'result': ['on', '', '100', '4000', '16711680', '359', '100', '2', '0', '', '', '', '', '', '', '', '', '', '']}
2021-01-18 09:05:13 DEBUG (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.30:55443, type=1> > {'id': 5, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-18 09:05:13 DEBUG (SyncWorker_6) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.31:55443, type=1> > {'id': 5, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-18 09:05:14 DEBUG (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.30:55443, type=1> < {'id': 5, 'result': ['on', '', '100', '4000', '16711680', '359', '100', '2', '0', '', '', '', '', '', '', '', '', '', '']}
2021-01-18 09:05:14 DEBUG (SyncWorker_6) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.31:55443, type=1> < {'id': 5, 'result': ['on', '', '100', '4000', '16711680', '359', '100', '2', '0', '', '', '', '', '', '', '', '', '', '']}
2021-01-18 09:05:43 DEBUG (SyncWorker_6) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.30:55443, type=1> > {'id': 6, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-18 09:05:43 DEBUG (SyncWorker_7) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.31:55443, type=1> > {'id': 6, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-18 09:05:44 DEBUG (SyncWorker_6) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.30:55443, type=1> < {'id': 6, 'result': ['on', '', '100', '4000', '16711680', '359', '100', '2', '0', '', '', '', '', '', '', '', '', '', '']}
2021-01-18 09:05:44 DEBUG (SyncWorker_7) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.31:55443, type=1> < {'id': 6, 'result': ['on', '', '100', '4000', '16711680', '359', '100', '2', '0', '', '', '', '', '', '', '', '', '', '']}
2021-01-18 09:06:13 DEBUG (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.30:55443, type=1> > {'id': 7, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-18 09:06:13 DEBUG (SyncWorker_0) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Bulb<10.50.0.31:55443, type=1> > {'id': 7, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-18 09:06:17 ERROR (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-18 09:06:17 ERROR (SyncWorker_0) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-18 09:06:17 ERROR (SyncWorker_0) [custom_components.yeelight_v2] Unable to update device 10.50.0.31, Desk: timed out
2021-01-18 09:06:17 ERROR (SyncWorker_1) [custom_components.yeelight_v2] Unable to update device 10.50.0.30, Bed: timed out

Unable to discover a device at address

After Haas Core and system update my yeelight_v2 custom integration no longer discovers one of my lamps.
I did not change anything in configuration

Now lamp is automatically detected by default yeelight integration, can be added and controlled. Howevert default integration lacks means to enable nightlight, which was possible in yeelight_v2

2021-11-12 14:17:20 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Milo: True, SSDP: True
2021-11-12 14:17:20 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_yeelight.yeelight.main] miIO: Bulb<192.168.1.100:55443, type=BulbType.Unknown> > get_prop > ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']
2021-11-12 14:17:25 DEBUG (SyncWorker_5) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] Unable to discover a device at address 192.168.1.100
yeelight_v2:
  devices:
    192.168.1.122:
      name: Yeelight 480
      model: ceiling3
      save_on_change: true
      nightlight_switch_type: light
      ssdp_fallback: True
      miio_token: "xxxxxxxxxxxxxxxxxx"
    192.168.1.100:
      name: Yeelight meteorite
      model: ceiling10
      save_on_change: true
      nightlight_switch_type: light
      ssdp_fallback: True
      miio_token: "xxxxxxxxxxxxxxxxxx"
    192.168.1.104:
      name: Big Yeelight
      model: ceiling4
      save_on_change: true
      nightlight_switch_type: light
      ssdp_fallback: True
      miio_token: "xxxxxxxxxxxxxxxxxxx"

Device at 192.168.1.100 cannot be discovered, but MiHome and Yeelight app do it without problems. IP is correct, token is also correct.

Works with 5-10 seconds delay

The custom interation works with 5-10 seconds delay.
I have 3x 1S (color4) bulbs connected with firmware 2.0.6_0030, on china server.
If I change color, brightness or on/of, it takes about 5-10 seconds for the bulb to respond to the command.
But they stay available until now, that's a huge improvement

The log is flooding with errors:

Logger: custom_components.yeelight_v2.python_yeelight.yeelight.main
Source: custom_components/yeelight_v2/python_yeelight/yeelight/main.py:823
Integration: YeelightV2 (documentation)
First occurred: 23:40:21 (124 occurrences)
Last logged: 23:52:23

timed out
[Errno 9] Bad file descriptor
2021-01-28 23:45:11 ERROR (SyncWorker_8) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-28 23:45:11 ERROR (SyncWorker_12) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-28 23:45:11 ERROR (SyncWorker_20) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-28 23:45:37 DEBUG (SyncWorker_12) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Milo: False, SSDP: True
2021-01-28 23:45:37 DEBUG (SyncWorker_12) [custom_components.yeelight_v2.python_yeelight.yeelight.main] LAN Control: Bulb<192.168.2.92:55443, type=BulbType.Color> > {'id': 10, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-28 23:45:37 DEBUG (SyncWorker_9) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Milo: False, SSDP: True
2021-01-28 23:45:37 DEBUG (SyncWorker_9) [custom_components.yeelight_v2.python_yeelight.yeelight.main] LAN Control: Bulb<192.168.2.93:55443, type=BulbType.Color> > {'id': 13, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-28 23:45:37 DEBUG (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Milo: False, SSDP: True
2021-01-28 23:45:37 DEBUG (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] LAN Control: Bulb<192.168.2.94:55443, type=BulbType.Color> > {'id': 18, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-28 23:45:41 ERROR (SyncWorker_12) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-28 23:45:41 ERROR (SyncWorker_9) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-28 23:45:41 ERROR (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-28 23:46:07 DEBUG (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Milo: False, SSDP: True
2021-01-28 23:46:07 DEBUG (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] LAN Control: Bulb<192.168.2.92:55443, type=BulbType.Color> > {'id': 11, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-28 23:46:07 DEBUG (SyncWorker_9) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Milo: False, SSDP: True
2021-01-28 23:46:07 DEBUG (SyncWorker_9) [custom_components.yeelight_v2.python_yeelight.yeelight.main] LAN Control: Bulb<192.168.2.93:55443, type=BulbType.Color> > {'id': 14, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-28 23:46:07 DEBUG (SyncWorker_15) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Milo: False, SSDP: True
2021-01-28 23:46:07 DEBUG (SyncWorker_15) [custom_components.yeelight_v2.python_yeelight.yeelight.main] LAN Control: Bulb<192.168.2.94:55443, type=BulbType.Color> > {'id': 19, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-28 23:46:08 DEBUG (SyncWorker_11) [custom_components.yeelight_v2.python_yeelight.yeelight.main] LAN Control: Bulb<192.168.2.92:55443, type=BulbType.Color> > {'id': 12, 'method': 'set_power', 'params': ['on', 'smooth', 350]}
2021-01-28 23:46:08 INFO (SyncWorker_4) [homeassistant.components.command_line.switch] Running state value command: curl -s "http://192.168.2.66:7999/1/detection/status"
2021-01-28 23:46:11 ERROR (SyncWorker_15) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-28 23:46:11 ERROR (SyncWorker_9) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-28 23:46:11 ERROR (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out
2021-01-28 23:46:11 ERROR (SyncWorker_11) [custom_components.yeelight_v2.python_yeelight.yeelight.main] [Errno 9] Bad file descriptor
2021-01-28 23:46:11 DEBUG (SyncWorker_11) [custom_components.yeelight_v2.light] Calling <function YeelightGenericLight.set_rgb at 0x7f9f52ea60> with ((255, 0, 0), 350) {}
2021-01-28 23:46:11 DEBUG (SyncWorker_11) [custom_components.yeelight_v2.light] Setting RGB: (255, 0, 0)
2021-01-28 23:46:11 DEBUG (SyncWorker_11) [custom_components.yeelight_v2.python_yeelight.yeelight.main] LAN Control: Bulb<192.168.2.92:55443, type=BulbType.Color> > {'id': 13, 'method': 'set_rgb', 'params': [16711680, 'smooth', 350]}
2021-01-28 23:46:12 DEBUG (SyncWorker_11) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Response: Bulb<192.168.2.92:55443, type=BulbType.Color> < {'method': 'props', 'params': {'hue': 0, 'sat': 100, 'rgb': 16711680, 'color_mode': 1}}
2021-01-28 23:46:15 ERROR (SyncWorker_11) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out

Did I do something wrong, or is there something wrong in the integration?
On a sidenote: Could this also be the same problem with Hyperion. I'm not able to get them responding there too.

Thanks a lot, so far

Connection reset by peer Yeelight YLXD76YL

I'm trying this integration because my Yeelight YLXD76YL has problems with the normal integration of becoming unavailable.
But this integration does not help I'm afraid.

Log:

2021-02-09 12:27:39 DEBUG (MainThread) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Model unknown (ceila). Providing a fallback

2021-02-09 12:30:38 DEBUG (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Milo: False, SSDP: True
2021-02-09 12:30:38 DEBUG (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] LAN Control: Bulb<192.168.178.49:55443, type=BulbType.WhiteTemp> > {'id': 6, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-02-09 12:30:38 DEBUG (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Response: Bulb<192.168.178.49:55443, type=BulbType.WhiteTemp> < {'method': 'props', 'params': {'power': 'on'}}
2021-02-09 12:30:38 ERROR (SyncWorker_1) [custom_components.yeelight_v2.python_yeelight.yeelight.main] [Errno 104] Connection reset by peer
Config:
yeelight_v2:
  devices:
    192.168.178.49:
      name: Slaapkamer
      ssdp_fallback: True
      miio_token: "0c39f3a75da9ea80293497e170ac8***"
      use_music_mode: true

It works for a few minutes and then the connection is cut by the light. The only way to fire it back up again is by power cycling the Yeelight.

When I disable LAN control on the Yeelight it fails to connect even when using the miio_token:
[custom_components.yeelight_v2.python_yeelight.yeelight.main] [Errno 111] Connection refused

Cannot add Yeelight color 3

Hello,
I'm having a problem to add this model : yeelink.light.color3 with yeelight_v2.
I followed mainly this issue : home-assistant/core#44540
Makolink in this article seems to have integrated yeelink.light.color3 so it might be possible to add mine also.
My bulb is currently working with Xiaomi home, I tried to put it on local control but this model doesn't seems to accept this option.

I have the token of the device and I tried with MIIO for yeelight, MIIO for Xiaomi and yeelight_v2.

The configuration.yaml has been modified as below : (token has been replaced by "xxx")
`yeelight_v2:
devices:
192.168.1.56:
name: "XiaomiBulb"
ssdp_fallback: True # Recommended, the default value is False
miio_token: "xxx" # if provided miio protocol is used (optional)

#logs
logger:
default: critical
logs:
custom_components.yeelight_v2: debug
custom_components.yeelight_v2.python_yeelight.yeelight.main: debug`

Here after the log error and the full log:

Log error :

Logger: custom_components.yeelight_v2.python_miio.miio.miioprotocol Source: custom_components/yeelight_v2/python_miio/miio/miioprotocol.py:239 Integration: YeelightV2 (documentation) First occurred: March 22, 2021, 2:44:11 PM (1 occurrences) Last logged: March 22, 2021, 2:44:11 PM Got error when receiving: timed out

Full log : (token has been replaced by "xxx")

`2021-03-22 14:43:54 DEBUG (MainThread) [custom_components.yeelight_v2] Importing configured 192.168.1.56
2021-03-22 14:43:58 DEBUG (MainThread) [custom_components.yeelight_v2] Device config options: {'name': 'XiaomiBulb', 'model': 'yeelink.light.color3', 'miio_token': 'xxx', 'transition': 350, 'use_music_mode': False, 'save_on_change': False, 'ssdp_fallback': True, 'nightlight_switch': False}
2021-03-22 14:44:00 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Milo: True, SSDP: True
2021-03-22 14:44:00 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_yeelight.yeelight.main] miIO: Bulb<192.168.1.56:55443, type=BulbType.Unknown> > get_prop > ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']
2021-03-22 14:44:00 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.protocol] Unable to decrypt, returning raw bytes: b''

2021-03-22 14:44:00 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x07\xd0#\xb0\x00\x00,9' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('07d023b0')
ts = 1970-01-01 03:08:41
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2021-03-22 14:44:00 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] Discovered 07d023b0 with ts: 1970-01-01 03:08:41, token: b'ffffffffffffffffffffffffffffffff'
2021-03-22 14:44:00 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.1.56:54321 >>: {'id': 1, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-03-22 14:44:05 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] Retrying with incremented id, retries left: 1
2021-03-22 14:44:06 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.protocol] Unable to decrypt, returning raw bytes: b''
2021-03-22 14:44:06 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] Got a response: Container:
data = Container:
data = b'' (total 0)
value = b'' (total 0)
offset1 = 32
offset2 = 32
length = 0
header = Container:
data = b'!1\x00 \x00\x00\x00\x00\x07\xd0#\xb0\x00\x00,?' (total 16)
value = Container:
length = 32
unknown = 0
device_id = unhexlify('07d023b0')
ts = 1970-01-01 03:08:47
offset1 = 0
offset2 = 16
length = 16
checksum = b'\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff\xff' (total 16)
2021-03-22 14:44:06 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] Discovered 07d023b0 with ts: 1970-01-01 03:08:47, token: b'ffffffffffffffffffffffffffffffff'
2021-03-22 14:44:06 DEBUG (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] 192.168.1.56:54321 >>: {'id': 102, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-03-22 14:44:11 ERROR (SyncWorker_2) [custom_components.yeelight_v2.python_miio.miio.miioprotocol] Got error when receiving: timed out`

Notifications (push status updates by lights) not supported?

Installed via HACS from custom repo, transferred one of my lights from built-in HA integration to this one. Seems to work okay, BUT - just to make sure - similar to built-in HA integration this one does not support push status update (notifications from lights), correct? Status seems to be updated only via polling with ca. 30 sec frequency?

No 'version' key in the manifest file for custom integration 'yeelight_v2'

Got this in my logs today. I haven't updated to 2121.6 yet and wanted to warn others as I dont think the integration will work in the latest version.

2021-04-23 14:47:44 WARNING (MainThread) [homeassistant.loader] No 'version' key in the manifest file for custom integration 'yeelight_v2'. As of Home Assistant 2021.6, this integration will no longer be loaded. Please report this to the maintainer of 'yeelight_v2'

Cannot add custom_effects or use yeelight_v2 flow service(s)

Adding custom_effects to the config makes the lights unavailable and using yeelight_v2.set_color_flow_scene for example seems to result in a "name 'yeelight' is not defined" error. I haven't tested all the other yeelight_v2.services just yet, but set_color_scene, for example, seems to be working fine.

No entity found when starting

Looks like the integration has loaded but the bulb connection is timing out.
Is this the only log or is there more needed?

I am running this is my config:

yeelight_v2:
devices:
192.168.1.71:
name: "Desk_Lamp"
ssdp_fallback: True

logger:
default: critical
logs:
custom_components.yeelight_v2: debug
custom_components.yeelight_v2.python_yeelight.yeelight.main: debug

2021-01-22 10:11:01 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for yeelight_v2 which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2021-01-22 10:11:01 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for hacs which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant.
2021-01-22 10:11:02 DEBUG (MainThread) [custom_components.yeelight_v2] Importing configured 192.168.1.71
2021-01-22 10:11:02 DEBUG (MainThread) [custom_components.yeelight_v2] Device config options: {'name': 'Desk_Lamp', 'model': 'color4', 'miio_token': '', 'transition': 1000, 'use_music_mode': False, 'save_on_change': True, 'ssdp_fallback': True, 'nightlight_switch': False}
2021-01-22 10:11:04 DEBUG (SyncWorker_6) [custom_components.yeelight_v2.python_yeelight.yeelight.main] Milo: False, SSDP: True
2021-01-22 10:11:04 DEBUG (SyncWorker_6) [custom_components.yeelight_v2.python_yeelight.yeelight.main] LAN Control: Bulb<192.168.1.71:55443, type=BulbType.Unknown> > {'id': 0, 'method': 'get_prop', 'params': ['power', 'main_power', 'bright', 'ct', 'rgb', 'hue', 'sat', 'color_mode', 'flowing', 'bg_power', 'bg_lmode', 'bg_flowing', 'bg_ct', 'bg_bright', 'bg_hue', 'bg_sat', 'bg_rgb', 'nl_br', 'active_mode']}
2021-01-22 10:11:07 ERROR (SyncWorker_6) [custom_components.yeelight_v2.python_yeelight.yeelight.main] timed out

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.