Invalid config - Cannot connect to host eu-api.coolkit.cc:8080 - Can't connect to eWeLink Cloud
See original GitHub issueHi,
I have the following error in notifications:

The installation is fresh.
Environment:
Home Assistant Core release with the issue: Home Assistant 0.114.4
My Configuration yaml:
# Configure a default setup of Home Assistant (frontend, api, etc)
default_config:
# Text to speech
tts:
- platform: google_translate
#Magichome LED strip
light:
- platform: flux_led
devices:
192.168.1.110:
name: TV Light
mode: "rgbw"
#Sonoff & EweLink Devices
sonoff:
username: xxxxxxxxxxxxxxx
password: xxxxxxxxxxxxx
#Yeelight Bubls
yeelight:
devices:
192.168.1.193:
name: Tall Lamp
192.168.1.213:
name: Ball Lamp
192.168.1.128:
name: Office Lamp
#LG WebOS TV
webostv:
host: 192.168.1.50
#other settings
turn_on_action:
service: wake_on_lan.send_magic_packet
data:
mac: xxxxxxxxxxxxxxxxxx
broadcast_address: 192.168.1.45
#Broadlink RM MIni 3
remote:
- platform: broadlink
host: 192.168.1.126
mac: xxxxxxxxxxxxxxxxxxxx
- platform: broadlink
host: 192.168.1.127
mac: xxxxxxxxxxxxxxxxxxxx
smartir:
switch:
- platform: broadlink
host: 192.168.1.126
mac: xxxxxxxxxxxxxxxxx
type: rm_mini
- platform: broadlink
host: 192.168.1.127
mac: xxxxxxxxxxxxxxxxxx
type: rm_mini
#Air Condition
climate:
- platform: smartir
name: Living Room A/C
unique_id: living_room_ac
device_code: 1960
controller_data: 192.168.1.126
- platform: smartir
name: Bedroom A/C
unique_id: bedroom_ac
device_code: 1960
controller_data: 192.168.1.127
#Soundbar & BluRay
media_player:
- platform: smartir
name: Soundbar
unique_id: soundbar
device_code: 1041
controller_data: 192.168.1.126
- platform: smartir
name: Blue Ray
unique_id: bluray
device_code: 1020
controller_data: 192.168.1.126
#Camera
camera:
- platform: mjpeg
mjpeg_url: http://192.168.1.202/mjpeg
group: !include groups.yaml
automation: !include automations.yaml
script: !include scripts.yaml
scene: !include scenes.yaml
`
In the logs:
`Log Details (ERROR)
Logger: homeassistant.setup
Source: custom_components/sonoff/sonoff_cloud.py:282
First occurred: 12:11:51 AM (1 occurrences)
Last logged: 12:11:51 AM
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: 12:11:51 AM (1 occurrences)
Last logged: 12:11:51 AM
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: 12:11:29 AM (1 occurrences)
Last logged: 12:11:29 AM
Setup of sonoff is taking over 10 seconds.`
Any suggestions?
Issue Analytics
- State:
- Created 3 years ago
- Comments:11
Top Results From Across the Web
Cannot connect to host eu-api.coolkit.cc:8080 #653 - GitHub
Cannot connect to host eu-api.coolkit.cc:8080 #653 ... WARNING (MainThread) [custom_components.sonoff] Can't connect to eWeLink Cloud.
Read more >Pairing failed? Read this before you try again
As soon as your device and smartphone are both in 2.4Ghz radio band, all we need to do is open eWeLink app>>Tap "+"button>>Select...
Read more >Control Sonoff Devices with eWeLink (original) firmware over ...
Pros: work with original Sonoff firmware work over local network (LAN) work with devices without DIY-mode work with devices in DIY-mode ...
Read more >HomeBridge eWeLink WebSocketClient: error '0' (Error
Below is my working snippet from config.json on my raspberry pi, the websocketAPI field is ... "webSocketApi" : "eu-pconnect3.coolkit.cc".
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@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.
Try adding debug tracing to Sonoff portion of the config file. Restart HA and check if anything shows up in the logs.
#Sonoff & EweLink Devices sonoff: username: xxxxxxxxxxxxxxx password: xxxxxxxxxxxxx debug: true