eWelink Integration

ok c’est bon sa fonctionne correctement.merci pour ton aide :smile: :

Bonjour,
A mon tour de vous solliciter : je suis comme la 1ère personne : dès que je modifie mon fichier de config, mon système ne redémarre plus.
Sans cette modif de config mais avec les 3 fichiers placés à l’emplacement indiqué, là, mon HA démarre sans pb.
J’ai allégé les modif de mon fichier de config en ne mettant que les 2 premières lignes : idem (redémarrage bloqué)
Je remets tout en commentaire, mon système démarre tout de suite.
Est-ce que cela parle à qqn ?
Merci beaucoup,
Reg

Collez les lignes de configuration.yaml et collez la sortie de
ls -l …homeassistant /custom_components /sonoff

Je m’excuse, je n’ai pas compris à partir de :’‘et collez la sortie de
ls -l …homeassistant /custom_components /sonoff’’

Cordialement

This component that I authored also controls Sonoffs. Whilst its a bit more difficult to use, it works fully locally, so offers better performance (all traffic is local) and reliability (against internet outages). https://github.com/mattsaxon/sonoff-lan-mode-homeassistant/blob/master/README.md

i have tried same way but getting more errors please find below errors

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/connection.py", line 61, in create_connection
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):
  File "/usr/local/lib/python3.7/socket.py", line 752, in getaddrinfo
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):
socket.gaierror: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 308, in connect
    conn = self._new_conn()
  File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 172, in _new_conn
    self, "Failed to establish a new connection: %s" % e
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0xae379550>: Failed to establish a new connection: [Errno -2] Name does not resolve

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 725, in urlopen
    method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
  File "/usr/local/lib/python3.7/site-packages/urllib3/util/retry.py", line 439, in increment
    raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='qa-api.coolkit.cc', port=8080): Max retries exceeded with url: /api/user/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xae379550>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/setup.py", line 171, in _async_setup_component
    hass, processed_config
  File "/config/custom_components/sonoff/__init__.py", line 53, in async_setup
    hass.data[DOMAIN] = Sonoff(hass, config)
  File "/config/custom_components/sonoff/__init__.py", line 100, in __init__
    self.do_login()
  File "/config/custom_components/sonoff/__init__.py", line 176, in do_login
    headers=self._headers, json=app_details)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 119, in post
    return request('post', url, data=data, json=json, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 516, in send
    raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='qa-api.coolkit.cc', port=8080): Max retries exceeded with url: /api/user/login (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xae379550>: Failed to establish a new connection: [Errno -2] Name does not resolve'))

I got it to work and showing in HA

But I can;t get an entity ID only a device id and rssi.

How can I do integration, scripts etc without entity ID?Capture

Click on the clog in the upper right corner. It will show the entity ID.

No it doesnt show.

This entity does not have a unique ID, therefore its settings cannot be managed from the UI.

Then go to configuration -> entities to find the entity id.

1 Like

thanks sir

My log says that websocket module is missing, any Clue?


File "/home/homeassistant/.homeassistant/custom_components/sonoff/__init__.py", line 28, in <module>
    import websocket
ModuleNotFoundError: No module named 'websocket'

Brian - which sonoff integration are you using - this is probably the best currently = https://github.com/AlexxIT/SonoffLAN

1 Like

Ok, i Will try it, Thanks.

Hi,

I think I did anything that is writen here, but I do not get it run.

My latest error after rebooting the hass-server was this:

Setup failed for sonoff: Requirements for sonoff not found: [‘uuid’].

13:54:18 – setup.py (ERROR)

I found the this within the init.py:
REQUIREMENTS = [‘uuid’, ‘websocket-client==0.54.0’]

But that does not help (to me).

Any idea how to fix that?

To be more precise. The complete log looks like this:

2020-10-25 13:54:07 WARNING (MainThread) [homeassistant.loader] You are using a custom integration for sonoff 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.
2020-10-25 13:54:18 ERROR (SyncWorker_21) [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 55)) (from versions: 1.30)
ERROR: No matching distribution found for uuid==1000000000.0.0 (from -c /usr/src/homeassistant/homeassistant/package_constraints.txt (line 55))
WARNING: You are using pip version 20.2.3; however, version 20.2.4 is available.
You should consider upgrading via the ‘/usr/local/bin/python3 -m pip install --upgrade pip’ command.
2020-10-25 13:54:18 ERROR (MainThread) [homeassistant.setup] Setup failed for sonoff: Requirements for sonoff not found: [‘uuid’].

which sonof integration?
what type of HA are you running -

copy the configuration -> info like this:

System Health

arch x86_64
dev false
docker false
hassio false
installation_type Home Assistant Core
os_name Linux
os_version 4.4.0-184-generic
python_version 3.8.6
timezone Australia/Sydney
version 0.116.4
virtualenv true

Hi!

This is my System Health:

arch armv7l
chassis embedded
dev false
docker true
docker_version 19.03.11
hassio true
host_os HassOS 4.15
installation_type Home Assistant OS
os_name Linux
os_version 4.19.127-v7l
python_version 3.8.5
supervisor 249
timezone Europe/Berlin
version 0.116.4
virtualenv false

I used this sonoff integration:
https://github.com/AlexxIT/SonoffLAN

ok - did you install SonoffLAN manually, or via HACS?

As you are using HassOS, I’m kinda stuck - the error is because some of the python packages that SonoffLAN wants are not installed, but I dont know how to fix that on HassOS

Hmm, okay. Thanks for your support so far.

First I tried the manual installation and as that did not work, I installed it via HACS.

With that I proceeded somehow further, but could not finish it succesfully.

not much more I can say here - but have a look at Sonoff intergration stopped working after hass.io upgrade