peterbuga / HASS-sonoff-ewelink

Home Assistant component to control Sonoff/eWeLink devices with original firmware
MIT License
791 stars 296 forks source link

new (non-sonoff) 4 outlets device uiid 77 #237

Closed peterbuga closed 4 years ago

peterbuga commented 4 years ago

@tyjtyj copy-paste all the files from the branch

I got from async-patch branch. Am I doing it correct ?

https://github.com/peterbuga/HASS-sonoff-ewelink/tree/async-patch

Update: I just finished copy the whole sonoff folder again and this is the error MY Home Assistant version 0.109.6. If you needed debug logs, will provide.

2020-05-12 17:16:01 WARNING (MainThread) [homeassistant.setup] Setup of sonoff is taking over 10 seconds.
2020-05-12 17:16:03 WARNING (MainThread) [homeassistant.components.binary_sensor] Setup of binary_sensor platform ping is taking over 10 seconds.
2020-05-12 17:16:11 ERROR (MainThread) [homeassistant.components.binary_sensor] Error while setting up sonoff platform for binary_sensor
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/home/homeassistant/.homeassistant/custom_components/sonoff/binary_sensor.py", line 23, in async_setup_platform
    if hass.data[SONOFF_DOMAIN].uiid_to_name[device['uiid']] == 'RF_BRIDGE':
KeyError: 77
2020-05-12 17:16:11 ERROR (MainThread) [homeassistant.components.fan] Error while setting up sonoff platform for fan
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/home/homeassistant/.homeassistant/custom_components/sonoff/fan.py", line 19, in async_setup_platform
    if 'FAN' in hass.data[SONOFF_DOMAIN].device_type_by_uiid(device):
TypeError: argument of type 'NoneType' is not iterable
2020-05-12 17:16:11 ERROR (MainThread) [homeassistant.components.switch] Error while setting up sonoff platform for switch
Traceback (most recent call last):
  File "/srv/homeassistant/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py", line 178, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/lib/python3.7/asyncio/tasks.py", line 416, in wait_for
    return fut.result()
  File "/home/homeassistant/.homeassistant/custom_components/sonoff/switch.py", line 20, in async_setup_platform
    if 'FAN' in hass.data[SONOFF_DOMAIN].device_type_by_uiid(device):
TypeError: argument of type 'NoneType' is not iterable

Originally posted by @tyjtyj in https://github.com/peterbuga/HASS-sonoff-ewelink/issues/232#issuecomment-627217474

peterbuga commented 4 years ago

hi @tyjtyj i suspect you have a new type of sonoff device not present in my list so i opened this new issue to track down your problem

please run the instructions from here https://github.com/peterbuga/HASS-sonoff-ewelink/tree/async-patch/sonoff-debug if possible and attach the output to sort things out

tyjtyj commented 4 years ago

I really appreciate you putting extra effort to look into my device ...

I hope i did it correctly..

devices.json.txt

This is not sonoff device but use ewelink to control. This is probably the reason it does not work on sonoff lan too.

peterbuga commented 4 years ago

@tyjtyj dump was good, i pushed a fix. copy-paste all the files from async-patch branch & let me know ;)

tyjtyj commented 4 years ago

Yes... all good.. perfect......Since I am not the owner of this case. I cant close it..

peterbuga commented 4 years ago

@tyjtyj perfect! another happy customer 😄