Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid config after updating to 2.x #140

Closed
ctrl50 opened this issue Jun 1, 2020 · 7 comments
Closed

Invalid config after updating to 2.x #140

ctrl50 opened this issue Jun 1, 2020 · 7 comments
Labels
question Further information is requested

Comments

@ctrl50
Copy link

ctrl50 commented Jun 1, 2020

getting invalid configuration on restart.

1.X has been working fine.

sonoff:
  username: 2ndaccntwithsharedemail
  password: superduperpassword
  reload: once

looked at the docs and didnt see reload: once anywhere so I removed it for 2.x (tried it both ways after the error)

Invalid config
The following integrations and platforms could not be set up:

sonoff
Please check your config.

any idea?

@ctrl50
Copy link
Author

ctrl50 commented Jun 1, 2020

For more information all im running it for is 2, ifan03's ... which has been working fine

@ctrl50
Copy link
Author

ctrl50 commented Jun 1, 2020

Jun 01 16:45:35 server hass[733]: 2020-06-01 16:45:35 ERROR (MainThread) [custom_components.sonoff.sonoff_cloud] Coolkit API
Jun 01 16:45:35 server hass[733]: Traceback (most recent call last):
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/ha/lib/python3.7/site-packages/aiohttp/connector.py", line 936, in _wrap_create_connection
Jun 01 16:45:35 server hass[733]:     return await self._loop.create_connection(*args, **kwargs)  # type: ignore  # noqa
Jun 01 16:45:35 server hass[733]:   File "/usr/lib/python3.7/asyncio/base_events.py", line 981, in create_connection
Jun 01 16:45:35 server hass[733]:     ssl_handshake_timeout=ssl_handshake_timeout)
Jun 01 16:45:35 server hass[733]:   File "/usr/lib/python3.7/asyncio/base_events.py", line 1009, in _create_connection_transport
Jun 01 16:45:35 server hass[733]:     await waiter
Jun 01 16:45:35 server hass[733]:   File "/usr/lib/python3.7/asyncio/sslproto.py", line 530, in data_received
Jun 01 16:45:35 server hass[733]:     ssldata, appdata = self._sslpipe.feed_ssldata(data)
Jun 01 16:45:35 server hass[733]:   File "/usr/lib/python3.7/asyncio/sslproto.py", line 189, in feed_ssldata
Jun 01 16:45:35 server hass[733]:     self._sslobj.do_handshake()
Jun 01 16:45:35 server hass[733]:   File "/usr/lib/python3.7/ssl.py", line 774, in do_handshake
Jun 01 16:45:35 server hass[733]:     self._sslobj.do_handshake()
Jun 01 16:45:35 server hass[733]: ssl.SSLError: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)
Jun 01 16:45:35 server hass[733]: The above exception was the direct cause of the following exception:
Jun 01 16:45:35 server hass[733]: Traceback (most recent call last):
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/.homeassistant/custom_components/sonoff/sonoff_cloud.py", line 106, in _api
Jun 01 16:45:35 server hass[733]:     r = await coro
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/ha/lib/python3.7/site-packages/aiohttp/client.py", line 483, in _request
Jun 01 16:45:35 server hass[733]:     timeout=real_timeout
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/ha/lib/python3.7/site-packages/aiohttp/connector.py", line 523, in connect
Jun 01 16:45:35 server hass[733]:     proto = await self._create_connection(req, traces, timeout)
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/ha/lib/python3.7/site-packages/aiohttp/connector.py", line 859, in _create_connection
Jun 01 16:45:35 server hass[733]:     req, traces, timeout)
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/ha/lib/python3.7/site-packages/aiohttp/connector.py", line 1004, in _create_direct_connection
Jun 01 16:45:35 server hass[733]:     raise last_exc
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/ha/lib/python3.7/site-packages/aiohttp/connector.py", line 986, in _create_direct_connection
Jun 01 16:45:35 server hass[733]:     req=req, client_error=client_error)
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/ha/lib/python3.7/site-packages/aiohttp/connector.py", line 941, in _wrap_create_connection
Jun 01 16:45:35 server hass[733]:     raise ClientConnectorSSLError(req.connection_key, exc) from exc
Jun 01 16:45:35 server hass[733]: aiohttp.client_exceptions.ClientConnectorSSLError: Cannot connect to host eu-api.coolkit.cc:8080 ssl:None [[SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1076)]
Jun 01 16:45:35 server hass[733]: 2020-06-01 16:45:35 ERROR (MainThread) [homeassistant.setup] Error during setup of component sonoff
Jun 01 16:45:35 server hass[733]: Traceback (most recent call last):
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/ha/lib/python3.7/site-packages/homeassistant/setup.py", line 171, in _async_setup_component
Jun 01 16:45:35 server hass[733]:     hass, processed_config
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/.homeassistant/custom_components/sonoff/__init__.py", line 90, in async_setup
Jun 01 16:45:35 server hass[733]:     config[CONF_PASSWORD]):
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/.homeassistant/custom_components/sonoff/sonoff_main.py", line 114, in cloud_login
Jun 01 16:45:35 server hass[733]:     return await self.cloud.login(username, password)
Jun 01 16:45:35 server hass[733]:   File "/home/ctrl/.homeassistant/custom_components/sonoff/sonoff_cloud.py", line 230, in login
Jun 01 16:45:35 server hass[733]:     if 'region' not in resp:
Jun 01 16:45:35 server hass[733]: TypeError: argument of type 'NoneType' is not iterable

@ctrl50
Copy link
Author

ctrl50 commented Jun 1, 2020

running core 110.4 in a venv on ubuntu. nabu casa. no ssl setup

@ctrl50
Copy link
Author

ctrl50 commented Jun 2, 2020

now im getting an insane ammount of errors.

5:10:27 PM – Home Assistant WebSocket API (ERROR) - message first occurred at 5:10:26 PM and shows up 1760 times
Client exceeded max pending messages [2]: 2048
5:10:19 PM – Home Assistant WebSocket API (ERROR) - message first occurred at 5:10:18 PM and shows up 494 times
Client unable to keep up with pending messages. Stayed over 512 for 5 seconds
5:10:16 PM – Home Assistant WebSocket API (ERROR)
Client exceeded max pending messages [2]: 2048
5:10:10 PM – Home Assistant WebSocket API (ERROR)
Client exceeded max pending messages [2]: 2048
5:10:10 PM – Home Assistant WebSocket API (ERROR) - message first occurred at 5:10:09 PM and shows up 1742 times
Client exceeded max pending messages [2]: 2048
5:10:02 PM – Home Assistant WebSocket API (ERROR) - message first occurred at 5:09:56 PM and shows up 6398 times
Client exceeded max pending messages [2]: 2048
5:09:28 PM – Home Assistant WebSocket API (ERROR) - message first occurred at 5:09:26 PM and shows up 2600 times
Client exceeded max pending messages [2]: 2048
5:09:17 PM – Home Assistant WebSocket API (ERROR) - message first occurred at 5:09:16 PM and shows up 1396 times
Client exceeded max pending messages [2]: 2048
5:09:06 PM – Home Assistant WebSocket API (ERROR) - message first occurred at 5:09:04 PM and shows up 2228 times

@AlexxIT
Copy link
Owner

AlexxIT commented Jun 2, 2020

Add setting mode: local. It will help.
You have problems connecting to ewelink servers.
The new version connects to them by default.
Please read breaking changes 2.0:
https://github.com/AlexxIT/SonoffLAN

@AlexxIT AlexxIT added the question Further information is requested label Jun 2, 2020
@ctrl50
Copy link
Author

ctrl50 commented Jun 3, 2020

yeah i read the changes before updating. just figured that since you say But I recommend using the new mode, it works great. that it would work great. (lol) no sarcasm meant., really appreciate this. (I have the ability to flash tasmota or esphome but rather not if i dont need to!)

mode: local does work, and after I posted this I got it working,

Not sure what the deal is. i can login no problem from my main account and the second account that has the shared devices linked work fine on my wifi network.

I do have a pretty cool/(crazy?) router setup. 3 netgear routers with the main cable router serving dhcp to the other two. everythings been fine for a year like this with no issues. ive got ports forwarded for certian services: I can ssh in, vnc in to all hosts on every router from outside the network. view cameras, etc.

anyway thanks for the integration . Least its working.

@AlexxIT
Copy link
Owner

AlexxIT commented Jun 3, 2020

SSL: WRONG_VERSION_NUMBER means the connection to cloud servers was intercepted with MITM attack or some software error...

@AlexxIT AlexxIT closed this as completed Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants