Sonoff /eWeLink component for original firmware

Hi, I getting this error message in my logs.

Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for sonoff doing I/O at custom_components/sonoff/init.py, line 372: r = requests…

Any idea to fix it??

I’m also geting a simiar error on the logs, can you advise if this something I need to worried about?
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for sonoff doing I/O at custom_components/sonoff/init.py, line 175: r = requests.post(‘https://{}-api.coolkit.cc:8080/api/user/login’.format(self._api_region),
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for sonoff doing I/O at custom_components/sonoff/init.py, line 372: r = requests.get(‘https://{}-api.coolkit.cc:8080/api/user/device?lang=en&apiKey={}&getTags=1&version=6&ts=%s&nonce=%s&appid=oeVkj2lYFGnJu5XUtWisfW4utiN4u9Mq&imei=%s&os=iOS&model=%s&romVersion=%s&appVersion=%s’.format(
Detected I/O inside the event loop. This is causing stability issues. Please report issue to the custom component author for sonoff doing I/O at custom_components/sonoff/init.py, line 221: r = requests.post(‘https://%s-disp.coolkit.cc:8080/dispatch/app’ % self._api_region, headers=self._headers)

Last update broke sonoff integration

4 Likes

2020-09-17 21:08:20 ERROR (SyncWorker_10) [homeassistant.util.package] Unable to install package uuid: ERROR: Could not find a version that satisfies the requirement uuid==1000000000.0.0 (from -c /usr/src/homeassistant/homeassistant/package_constraints.txt (line 51)) (from versions: 1.30)

ERROR: No matching distribution found for uuid==1000000000.0.0 (from -c /usr/src/homeassistant/homeassistant/package_constraints.txt (line 51))

2020-09-17 21:08:20 ERROR (MainThread) [homeassistant.setup] Setup failed for sonoff: Requirements for sonoff not found: [‘uuid’].

1 Like

2020-09-17 21:08:20 ERROR (SyncWorker_10) [homeassistant.util.package] Unable to install package uuid: ERROR: Could not find a version that satisfies the requirement uuid==1000000000.0.0 (from -c /usr/src/homeassistant/homeassistant/package_constraints.txt (line 51)) (from versions: 1.30)
ERROR: No matching distribution found for uuid==1000000000.0.0 (from -c /usr/src/homeassistant/homeassistant/package_constraints.txt (line 51))
2020-09-17 21:08:20 ERROR (MainThread) [homeassistant.setup] Setup failed for sonoff: Requirements for sonoff not found: [‘uuid’].

Temporary workaround:

pip3 install uuid

not familiar with this, running my HA on pi3b+. how do i temp fix this?

Yeah latest 0.115.0 kills the integration. Any workaround?

Sonoff devices working fine for me on 0.115
actually I may have being having a “moment” when I posted this…my devices are working but I’m not using this component any more (sorry) :man_facepalming:…my devices are working on 0.115 with this custom component https://github.com/AlexxIT/SonoffLAN

For me also no more sonof - error message:

"2020-09-17 21:10:07 ERROR (MainThread) [homeassistant.setup] Setup failed for sonoff: Requirements for sonoff not found: [‘uuid’].

don’t know how/where to give command “pip3 install uuid” (have HA install on RP4)

same here.
Setup failed for sonoff: Requirements for sonoff not found: [‘uuid’].
using a hass VM

same here.
I’ve executed correctly “pip3 install uuid” from ssh but same error persists and sonoffs not discovered.

I’ve just installed this via HACS


and my Sonoffs are back, just need to change the way I output the power reading on my Pow’s.
3 Likes

Yes, it works! Thanks!

2 Likes

thanks! solved my problem

This graph was done using @peterbuga home assistant custom component and than all the data is in home assitant. And possibilities of graph are than endless:

  • graph of state in home assistant (basic one)
  • use integration with influxdb + graphana
  • access home assistant state database and export (this was my case, but I’ve used node-red to push values to demo.thingsboard.io
  • etc

Another solution here:

Ola consigo obeter kwh com meu sonoff pow r2 com firmware original no ha?

I just replace Peter’s code with the AlexxIT/SonoffLAN so I could have a known working upgrade path for Hassio. After several years happily using @PeterBuga 's code (thanks very much!), I thought it was probably best to switch to something where the developer has more time to devote to the project. I know Peter was only ever doing this for fun.
The SonoffLAN component is working fine with my cloud-controlled fleet of Sonoffs. :slight_smile:

Just wondering what you guys recommend for AlexxIT/SonoffLAN to ensure the flawless Temperature and Humidity updating from TH10? HAs been resolved the 2nd ewlink account issue? i.e. HA need to be rebooted when a new device added

Already installed the sonoff component. Everything is ok.
During HA start I receive this error:

Logger: root
Source: custom_components/sonoff/sonoff_local.py:178
First occurred: 13:34:33 (1 occurrences)
Last logged: 13:34:33

Uncaught thread exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.8/site-packages/zeroconf/__init__.py", line 1755, in run
    self._service_state_changed.fire(
  File "/usr/local/lib/python3.8/site-packages/zeroconf/__init__.py", line 1513, in fire
    h(**kwargs)
  File "/config/custom_components/sonoff/sonoff_local.py", line 178, in _zeroconf_handler
    if data.startswith(b'{"rf'):
AttributeError: 'NoneType' object has no attribute 'startswith'

Is there something wrong with my configuration?
The two switches work well.