but this will be added? Please…
I have tried the component with my T1 UK 3 gang switch, running with FW 3.0 and it is working. I have set my region to ‘as’ and it has unnoticeable delay when i trigger the switch with HA. Vice versa, the refresh state in HA is pretty quick when i trigger the switch with Google Assistant.
Question: if i want to add more Sonoff devices in future, will the devices show up by just restarting the HA?
Anyway, thanks @peterbuga for his work on the component.
yes, the entities will show up automatically
Is there any chance to shut off the network indicator like in ewelink?
You can do that in the ewelink app.
You can do this in the ewelink app.
That’s nice!
I know it can be done in the ewelink app but it turns back on when it is in local network only
My Sonoff Micro just arrived yesterday and I tested it with this integration and it seems to work.
I noticed that it creates 4 switches (CH1, CH2, CH3 and CH4), although there is only one channel and of course only Channel 1 can be switched on or off.
another example of itead no-sense logic, i don’t understand why a device like this would have the ability to create 4 switches (when there’s a clear definition for 1-switch devices already available)
unfortunately without a sonoff-debug.py
dump i cannot detect this particular device and stop creating additional switches, feel free to open an issue on the project’s github if you want
Hello, I fighting since yestoorday with messeage “Invalid config”. When I run:
python sonoff-debug.py ‘email or phone-number username’ ‘password’
I getting timeout error as I understand Could you please take a look and help me
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/urllib3/connection.py", line 156, in _new_conn
conn = connection.create_connection(
File "/usr/lib/python3.8/site-packages/urllib3/util/connection.py", line 84, in create_connection
raise err
File "/usr/lib/python3.8/site-packages/urllib3/util/connection.py", line 74, in create_connection
sock.connect(sa)
TimeoutError: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 665, in urlopen
httplib_response = self._make_request(
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/usr/lib/python3.8/site-packages/urllib3/connection.py", line 300, in connect
conn = self._new_conn()
File "/usr/lib/python3.8/site-packages/urllib3/connection.py", line 168, in _new_conn
raise NewConnectionError(
urllib3.exceptions.NewConnectionError: <urllib3.connection.VerifiedHTTPSConnection object at 0x763efbb0>: Failed to establish a new connection: [Errno 110] Operation timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 439, in send
resp = conn.urlopen(
File "/usr/lib/python3.8/site-packages/urllib3/connectionpool.py", line 719, in urlopen
retries = retries.increment(
File "/usr/lib/python3.8/site-packages/urllib3/util/retry.py", line 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='us-api.coolkit.cc', port=8080): Max retries exceeded with url: /api/user/login (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x763efbb0>: Failed to establish a new connection: [Errno 110] Operation timed out'))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "sonoff-debug.py", line 100, in <module>
do_login()
File "sonoff-debug.py", line 67, in do_login
r = requests.post('https://%s-api.coolkit.cc:8080/api/user/login' % api_region, headers=headers, json=app_details)
File "/usr/lib/python3.8/site-packages/requests/api.py", line 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/lib/python3.8/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/lib/python3.8/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/lib/python3.8/site-packages/requests/adapters.py", line 516, in send
raise ConnectionError(e, request=request)
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='us-api.coolkit.cc', port=8080): Max retries exceeded with url: /api/user/login (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x763efbb0>: Failed to establish a new connection: [Errno 110] Operation timed out'))
@art8814 you clearly have something blocking the access from HA to coolkit.cc servers, check your firewall settings, especially if you’re using some kind of proxy to connect to internet
Strange thing is that my Sonoff equipment is connecting to the servers via my Wifi (I can control them with Evelink). But only when my phone is connected via GSM. WHen I connect my phone to my Wifi (the same Wifi where sonoff’s are connected) I can not use Evelink app.
I have no firewall set up for sure.Do you know what server excatly (server adress) my network provider is blocking? If I get that information I can speak with them.
With that information I can ping that server to check.
How did you configure it? Got the API key?
Buddy @peterbuga , Here is my folder structure.
Here is my configuration.yaml
But I can’t see any Integration or Entities in Lovelace UI.
Help me setting up this, Please
Did you check your logs to see if the sonoff component has loaded? In my case I didn’t have the python module “websocket” installed.
Edit: I got it working, I missed the ' '
while defining login credentials.
Thanks @peterbuga you’re a life saver
Here is the Error Log buddy
Sun Feb 09 2020 21:11:21 GMT+0530 (India Standard Time)
Error during setup of component sonoff
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 485, in wrap_socket
cnx.do_handshake()
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1934, in do_handshake
self._raise_ssl_error(self._ssl, result)
File "/usr/local/lib/python3.7/site-packages/OpenSSL/SSL.py", line 1663, in _raise_ssl_error
raise SysCallError(errno, errorcode.get(errno))
OpenSSL.SSL.SysCallError: (104, 'ECONNRESET')
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 672, in urlopen
chunked=chunked,
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 376, in _make_request
self._validate_conn(conn)
File "/usr/local/lib/python3.7/site-packages/urllib3/connectionpool.py", line 994, in _validate_conn
conn.connect()
File "/usr/local/lib/python3.7/site-packages/urllib3/connection.py", line 394, in connect
ssl_context=context,
File "/usr/local/lib/python3.7/site-packages/urllib3/util/ssl_.py", line 370, in ssl_wrap_socket
return context.wrap_socket(sock, server_hostname=server_hostname)
File "/usr/local/lib/python3.7/site-packages/urllib3/contrib/pyopenssl.py", line 491, in wrap_socket
raise ssl.SSLError("bad handshake: %r" % e)
ssl.SSLError: ("bad handshake: SysCallError(104, 'ECONNRESET')",)
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 720, 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 436, in increment
raise MaxRetryError(_pool, url, error or ResponseError(cause))
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='cn-api.coolkit.cc', port=8080): Max retries exceeded with url: /api/user/login (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 170, 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 116, in post
return request('post', url, data=data, json=json, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/api.py", line 60, in request
return session.request(method=method, url=url, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 533, in request
resp = self.send(prep, **send_kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/sessions.py", line 646, in send
r = adapter.send(request, **kwargs)
File "/usr/local/lib/python3.7/site-packages/requests/adapters.py", line 514, in send
raise SSLError(e, request=request)
requests.exceptions.SSLError: HTTPSConnectionPool(host='cn-api.coolkit.cc', port=8080): Max retries exceeded with url: /api/user/login (Caused by SSLError(SSLError("bad handshake: SysCallError(104, 'ECONNRESET')")))
I have only been using hassio for a few days and am in the process of migrating my sonoff devices to tasmota. This component works great but the new 105.2 update checker says it breaks this sonoff component. Has anyone tried the new update?
works great here on 105.2
Works on 105.2 for me.