eWelink Integration

bonjour, comment faites vous pour telecharger les fichiers .py dans github? je ne comprend pas.
Merci à vous

Salut @niconath ,
Sur la page github du projet, en haut a gauche il y un menu “Clone or Download” click dessus et choisis “Download ZIP”
Tous les fichiers necessaire seront dans le fichier zip

d’accord merci beaucoup pour ta réponse, pour le reste de l’installation il suffit de suivre le tutoriel ?
comment fait-on pour détecter les appareils? sont-ils tous compatibles ? j’ai des interrupteur king art king-q4
Merci beaucoup

Une fois installer en suivant les instructions et apres avoir redemmarer homeassistant les appareils Sonoff apparaitront automatiquement.
Pour ton materiel je ne sais pas…

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