Unauthorized WebSocket access, problems with APIs, google home, darksky, spotfy etc

I´m really need a help, opened some threads about some of my problems including in github but noone was able to help me.

My cloud is not conecting to my google home, my darksky is not conecting and not showing in the fontpage, my spotfy not conecting as well, everything leads me to think it´s a connection problem, but when I tried to access for example the url from darksky directly from my computer I can, so it seems it´s a problem from hassio, or the HassOS or my docker, I really don´t know. Also I can´t update to 0.85

supervisor logs:

19-01-15 22:04:42 INFO (MainThread) [hassio.api.proxy] Home Assistant WebSocket API request initialize
19-01-15 22:04:42 WARNING (MainThread) [hassio.api.proxy] Unauthorized WebSocket access
-01-16 13:19:44 WARNING (MainThread) [hassio.updater] Can't fetch versions from https://s3.amazonaws.com/hassio-version/stable.json: Cannot connect to host s3.amazonaws.com:443 ssl:None [Try again]

19-01-16 13:24:51 ERROR (MainThread) [hassio.api.proxy] Client error on WebSocket API Cannot connect to host 172.30.32.1:8123 ssl:False [Connection refused].
19-01-16 13:21:58 WARNING (MainThread) [hassio.updater] Can't fetch versions from https://s3.amazonaws.com/hassio-version/stable.json: Cannot connect to host s3.amazonaws.com:443 ssl:None [Try again]

one of my hassios logs

Unexpected error
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cloud/iot.py", line 97, in connect
    yield from self._handle_connection()
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cloud/iot.py", line 153, in _handle_connection
    yield from hass.async_add_job(auth_api.check_token, self.cloud)
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/cloud/auth_api.py", line 108, in check_token
    if cognito.check_token():
  File "/usr/local/lib/python3.6/site-packages/warrant/__init__.py", line 260, in check_token
    self.renew_access_token()
  File "/usr/local/lib/python3.6/site-packages/warrant/__init__.py", line 555, in renew_access_token
    AuthParameters=auth_params,
  File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 312, in _api_call
    return self._make_api_call(operation_name, kwargs)
  File "/usr/local/lib/python3.6/site-packages/botocore/client.py", line 592, in _make_api_call
    operation_model, request_dict)
  File "/usr/local/lib/python3.6/site-packages/botocore/endpoint.py", line 141, in make_request

Unable to connect to Dark Sky: HTTPSConnectionPool(host='api.darksky.net', port=443): Max retries exceeded with url: /forecast/b5dadd6836074028261ee0e4c44eb2fe/-23.5733,-46.6417?units=si&lang=en (Caused by NewConnectionError('<urllib3.connection.VerifiedHTTPSConnection object at 0x728170d0>: Failed to establish a new connection: [Errno -3] Try again',))

hope someone could give me a light

May some parental control (e.g. in your router) block the device from connecting to the internet?
Did you alter hass.io’s network settings?
Did you already restart the device?
Did you consider creating a backup and doing a fresh install of hass.io, check if connections to the outside world works, restoring the backup and checking again if the connection still work?

Hey thanks for the reply,
I didn´t change anything on my router, I don´t have any firewalls or anything likely to this
I´ve been able to access my Hassio through duck dns outside my network, so I believe he´s connecting to the outside world right?
I restarted several times, reload the supervisor, retored an old snapshot and nothing seems to work, my problems styarted last week since I updated to 0.84.6
I´m leaving this alternative as my last resort as I don´t want to do fresh install my last one was pretty traumatic.

As far as I understand some of my logs are showing difficultie to connect to the ip 172.x.x.x.32 tha it semms to be a kind of subnet, but my lack of knowledge is not helping I´m just reading a lot of similar threads to try to find a solution.

If you can connect from the outside using your DuckDNS address you device is able to connect to the internet.

The 172.* IPs belong to the Docker setup.

Please have a look if there is a file named ip_bans.yaml in your config folder. If it is delete it and restart the device.

Make also sure your http configuration is correct. You could post that configuration here to let the community have look at it. Don’t forget to redact sensitive data like DuckDNS Urls, Passwords, etc. from it.

If you have a spare SD card you could put a fresh hass.io installation on that, restore you backup there and check if the problems return. If they are the problem is likely related to your configuration.

Hi many thanks will try to find this config folder, I´m not in my home right now, I´m sure I didn´t comment this in http inside configuration.yaml, I´ll also post it later my configuration.

The config folder is the one your configuration.yaml is in :slight_smile:

here´s my http config:

http:
  api_password: secretpassword
  base_url: https://xxxx.duckdns.org:8123
  ssl_certificate: /ssl/fullchain.pem
  ssl_key: /ssl/privkey.pem
  cors_allowed_origins:
    - https://xxxxxx.duckdns.org:7080

check my logs again and everything is messed up

??? What purpose is that serving?

it´s a custom addon that didn´t work but never bother to erase

Not surprised it didn’t work… the port specification I don’t think is valid. I’d get rid of those lines and see if your problem is solved!

I’ve had similar issues before. Restarting Home Assistant didn’t fix it, but what worked for me was to go into the Hass.io menu and reboot the device.

1 Like

Thanks that what I did, in fact i unplugged and plugg again and it happens to work, let’s see if will keep wprking