Closed manosioa closed 4 years ago
Cannot connect to host eu-api.coolkit.cc:8080 ssl:default [Connect call failed ('52.57.118.192', 8080)]
Check internet connectivity of the device.
Hi,
@desigan321 Check connectivity of which device? The HA is working without any issue and is connected to the internet.
It can ping the ip and port
All of my sonoff devices are working through the Alexa skill and the EWeLink app. @AlexxIT any ideas?
Thanks :)
Cannot connect to host eu-api.coolkit.cc:8080 ssl:default [Connect call failed ('52.57.118.192', 8080)]
Check internet connectivity of the device.
Try adding debug tracing to Sonoff portion of the config file. Restart HA and check if anything shows up in the logs.
sonoff: username: xxxxxxxxxxxxxxx password: xxxxxxxxxxxxx debug: true
@desigan321
After i added the "debug: true", I got this :
When i click on the "Open Log" i get a blank page.
The Logs from the HA:
`Log Details (ERROR)
Logger: homeassistant.setup
Source: custom_components/sonoff/sonoff_cloud.py:282
First occurred: 4:17:58 PM (1 occurrences)
Last logged: 4:17:58 PM
Error during setup of component sonoff
Traceback (most recent call last):
File "/usr/src/homeassistant/homeassistant/setup.py", line 191, in _async_setup_component
result = await task
File "/config/custom_components/sonoff/__init__.py", line 102, in async_setup
if await registry.cloud_login(config[CONF_USERNAME],
File "/config/custom_components/sonoff/sonoff_main.py", line 110, in cloud_login
return await self.cloud.login(username, password)
File "/config/custom_components/sonoff/sonoff_cloud.py", line 282, in login
if resp.get('error') == 406:
AttributeError: 'NoneType' object has no attribute 'get''
'Log Details (ERROR)
Logger: custom_components.sonoff.sonoff_cloud
Source: custom_components/sonoff/sonoff_cloud.py:147
Integration: sonoff (documentation)
First occurred: 4:17:58 PM (1 occurrences)
Last logged: 4:17:58 PM
Coolkit API error: Cannot connect to host eu-api.coolkit.cc:8080 ssl:default [Connect call failed ('52.57.118.192', 8080)]
Traceback (most recent call last):
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
return await self._loop.create_connection(*args, **kwargs) # type: ignore # noqa
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1025, in create_connection
raise exceptions[0]
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 1010, in create_connection
sock = await self._connect_sock(
File "/usr/local/lib/python3.8/asyncio/base_events.py", line 924, in _connect_sock
await self.sock_connect(sock, address)
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 494, in sock_connect
return await fut
File "/usr/local/lib/python3.8/asyncio/selector_events.py", line 526, in _sock_connect_cb
raise OSError(err, f'Connect call failed {address}')
TimeoutError: [Errno 110] Connect call failed ('52.57.118.192', 8080)
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/config/custom_components/sonoff/sonoff_cloud.py", line 147, in _api
r = await coro
File "/usr/local/lib/python3.8/site-packages/aiohttp/client.py", line 480, in _request
conn = await self._connector.connect(
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 523, in connect
proto = await self._create_connection(req, traces, timeout)
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 858, in _create_connection
_, proto = await self._create_direct_connection(
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
raise last_exc
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 980, in _create_direct_connection
transp, proto = await self._wrap_create_connection(
File "/usr/local/lib/python3.8/site-packages/aiohttp/connector.py", line 943, in _wrap_create_connection
raise client_error(req.connection_key, exc) from exc
aiohttp.client_exceptions.ClientConnectorError: Cannot connect to host eu-api.coolkit.cc:8080 ssl:default [Connect call failed ('52.57.118.192', 8080)]
Log Details (WARNING)
Logger: homeassistant.setup
Source: /usr/local/lib/python3.8/asyncio/events.py:81
First occurred: 4:17:36 PM (1 occurrences)
Last logged: 4:17:36 PM
Setup of sonoff is taking over 10 seconds.
The debug logs don't show much different.
Check/Try the following:
A) Are you using HACS or direct folder copy of Sonoff into custom_components folder? B) What version of SonoffLAN repo are you using? v2.3.1? Have you tried another version? C) Are you running HA from virtual machine or Raspberry Pi? D) What version of eweLink app are you using on your phone?
@desigan321 I followed all your suggestions. Here are the results:
The debug logs don't show much different.
Check/Try the following:
1. Go to Configuration - Server Controls - Check Configuration (Does it return "Configuration Valid"?) Yes! 2. Switch off all phones/devices that have the EweLink/Alexa app installed to check if multiple accounts logging in could be the issue. Logged out of the iOS app, the only app that I use. 3. Comment out everything extra in your configuration.yaml file and leave only the Sonoff lines - to rule out any other issue that might be causing a conflict somewhere. I did and left only Sonoff lines. I get this on the debug log:
2020-09-03 00:49:52 DEBUG main SysInfo: {'version': '0.114.4', 'dev': False, 'hassio': True, 'virtualenv': False, 'python_version': '3.8.3', 'docker': True, 'arch': 'x86_64', 'os_name': 'Linux', 'os_version': '4.19.107-Unraid', 'supervisor': '235', 'host_os': None, 'chassis': None, 'docker_version': '19.03.5'} 2020-09-03 00:49:52 DEBUG main AUTO mode start 2020-09-03 00:50:25 ERROR sonoff_cloud Coolkit API error: Cannot connect to host eu-api.coolkit.cc:8080 ssl:default [Connect call failed ('...', 8080)] 2020-09-03 00:50:25 ERROR sonoff_cloud Login error: None 2020-09-03 00:50:25 WARNING main Can't connect to eWeLink Cloud 2020-09-03 00:50:25 INFO sonoff_local 100099eb90 <= Local1 | No devicekey for device 2020-09-03 00:50:26 INFO sonoff_local 100099d0f6 <= Local1 | No devicekey for device 2020-09-03 00:55:28 DEBUG sonoff_local Zeroconf Removed: eWeLink_100099eb90._ewelink._tcp.local. 2020-09-03 00:55:28 DEBUG sonoff_local Zeroconf Removed: eWeLink_100099d0f6._ewelink._tcp.local.
A) Are you using HACS or direct folder copy of Sonoff into custom_components folder? I Used HACS to install the Sonoff B) What version of SonoffLAN repo are you using? v2.3.1? Have you tried another version?I used v.2.3.1. Just tried v.2.3.0 and v2.2.3, with just the sonoff lines in the config and valid config. Same issue. I get the same output on the debug log. C) Are you running HA from virtual machine or Raspberry Pi? HA is running on a docker on Unraid. Had no issues for a month now. D) What version of eweLink app are you using on your phone? iOS v4.4.0.
Is hassio in docker configured for bridge or host in network config?
Run network docker ls and check. If bridge, change to host (for testing) and restart HA and retry.
@desigan321
In unraid i chose the hassio_supervisor
All the guides online use this as the docker.
You download it on Unraid, start it and it downloads and installs all the required instances.
Then you complete the setup as usual.
The only thing that can be changed is Supervisor.
It was on bridge. Changed to host.
Started the Supervisor (which then automatically runs all the required instances) and it does not start homeassistant, addon_core_configurator,addon_core_ssh.
When I run homeassistant manually I get this message when I cilck on Supervisor
I did not have any problems since mid August. Suddenly without me messing around with anything, sonoff devices stopped working. Then i tried some restarts but no luck. The tried to reinstall the HA from scratch,fresh. No luck. Now i'm here. Not knowing whats the issue.
When it stopped working the first time, did you get the same errors in the log? "Invalid config", "Can't connect to..." ?
Sometimes when the Sonoff devices stop working even in LOCAL mode (with SONOFFLAN), it could be the IP addresses of the devices changed.
It looks like you have already rebooted your router and everything else. I'm not familiar with Unraid so can't suggest anything further with it.
To rule out any physical network (or docker network config), firewall rules, DuckDNS issues etc., I would suggest installing HA on VirtualBox in a Windows environment and see if that works.
This video explains how to do it with VirtualBox: https://www.youtube.com/watch?v=sVqyDtEjudk
When it stopped working the first time, did you get the same errors in the log? "Invalid config", "Can't connect to..." ? Yes! Those errors sent me on the trip i described.
Sometimes when the Sonoff devices stop working even in LOCAL mode (with SONOFFLAN), it could be the IP addresses of the devices changed. All of my Sonoff devices use static IP.
It looks like you have already rebooted your router and everything else. I'm not familiar with Unraid so can't suggest anything further with it. Yes, tried every possible sollution i could think of before posting my issue.
To rule out any physical network (or docker network config), firewall rules, DuckDNS issues etc., I would suggest installing HA on VirtualBox in a Windows environment and see if that works.
This video explains how to do it with VirtualBox: https://www.youtube.com/watch?v=sVqyDtEjudk I'm on it.
@desigan321 Tried everything. Even installing HA on a laptop and installing HA on VM using VirtualBox.
Nothing helped to solve the issue.
I gave up and bought a USB to TTL and DuPont cables and flashed Tasmota on all 10 sonoff devices I have.
Thanks for the help and recommendations.
Hi,
I have the following error in notifications:![image](https://user-images.githubusercontent.com/6305045/91906623-2b6aaf80-ecb1-11ea-9a1f-542140905542.png)
The installation is fresh.
My Configuration yaml:
In the logs:
Any suggestions?