I just saw this in the system logs:
MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.33.5:6123 ssl:default [Host is unreachable]
I just saw this in the system logs:
MainThread) [supervisor.api.ingress] Ingress error: Cannot connect to host 172.30.33.5:6123 ssl:default [Host is unreachable]
Addon version is not being maintained by me, seems like the package is not installed (not updated in addon docker file)
This docker container doesnât seem to be working for me anymore. I get a dark window that says âZ-Wave Network Viewerâ in the upper left and the little file icon that says JSON in the upper right corner. The docker container log file does throw an error that repeats multiple times whenever I try to visit the network viewer webpage.
Docker command:
sudo docker create --name=zwavemap --restart no -v /etc/localtime:/etc/localtime:ro -e TZ=America/Chicago -e HA_URL=https://super.secret.url:8123 -e HA_TOKEN=WoUlDnTYoULiKeToKnOw -p 6124:6123 eladbar/ha-zwave-network:latest
Youâll notice my port is mapped to a different port. I also have an ESPHome container on the same Docker host, so I had to change this container (this has been discussed previously in this thread). The z wave network viewer was working, it would just take a while to load.
Log error that gets repeated:
|2020-10-23 01:51:09|stderr|----------------------------------------|
|---|---|---|
|2020-10-23 01:51:09|stderr|----------------------------------------|
|2020-10-23 01:51:09|stderr|IndexError: list index out of range|
|2020-10-23 01:51:09|stderr| identifier = device.get("identifiers")[0]|
|2020-10-23 01:51:09|stderr| File "/Managers/data_manager.py", line 364, in load_devices|
|2020-10-23 01:51:09|stderr| self.load_devices(devices, entities, states)|
|2020-10-23 01:51:09|stderr| File "/Managers/data_manager.py", line 321, in _async_load_data|
|2020-10-23 01:51:09|stderr| return future.result()|
|2020-10-23 01:51:09|stderr| File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete|
|2020-10-23 01:51:09|stderr| self._loop.run_until_complete(self._async_load_data())|
|2020-10-23 01:51:09|stderr| File "/Managers/data_manager.py", line 63, in load_data|
|2020-10-23 01:51:09|stderr| manager.load_data()|
|2020-10-23 01:51:09|stderr| File "/Managers/handler.py", line 41, in do_GET|
|2020-10-23 01:51:09|stderr| method()|
|2020-10-23 01:51:09|stderr| File "/usr/local/lib/python3.8/http/server.py", line 415, in handle_one_request|
|2020-10-23 01:51:09|stderr| self.handle_one_request()|
|2020-10-23 01:51:09|stderr| File "/usr/local/lib/python3.8/http/server.py", line 427, in handle|
|2020-10-23 01:51:09|stderr| self.handle()|
|2020-10-23 01:51:09|stderr| File "/usr/local/lib/python3.8/socketserver.py", line 720, in __init__|
|2020-10-23 01:51:09|stderr| super().__init__(*args, **kwargs)|
|2020-10-23 01:51:09|stderr| File "/usr/local/lib/python3.8/http/server.py", line 647, in __init__|
|2020-10-23 01:51:09|stderr| self.RequestHandlerClass(request, client_address, self)|
|2020-10-23 01:51:09|stderr| File "/usr/local/lib/python3.8/socketserver.py", line 360, in finish_request|
|2020-10-23 01:51:09|stderr| self.finish_request(request, client_address)|
|2020-10-23 01:51:09|stderr| File "/usr/local/lib/python3.8/socketserver.py", line 347, in process_request|
|2020-10-23 01:51:09|stderr| self.process_request(request, client_address)|
|2020-10-23 01:51:09|stderr| File "/usr/local/lib/python3.8/socketserver.py", line 316, in _handle_request_noblock|
|2020-10-23 01:51:09|stderr|Traceback (most recent call last):|
|2020-10-23 01:51:09|stderr|Exception happened during processing of request from ('172.17.0.1', 52596)|
EDIT: the log is newest first, so read from the bottom up.
I will add more logs (info / debug) and release new version later today, I can guess what happened, not sure I will be able to solve it without the additional logs
What kind of integration are you using? (ZWave / OZW)
Thanks
Iâm using the built in ZWave integration in HA.
Release new version with lots of changes, mostly to make the component easier to maintain,
but also to be able to assist faster in case thereâs an issue.
To define the container web server port - set the SERVER_PORT
@squirtbrnr, please let me know if you have an issue once switching to that version,
In case you do, you can create mount to local PC (mount bind) of containerâs folder /debug
,
send me a link to download the files from that folder (as zip file) and I will be able to reproduce it in my PC.
In addition, added lots of logs, so maybe you will be able to find the issue over there.
ENTRYPOINT ["python3", "/app/webserver.py"]
SERVER_PORT
DEBUG
/debug
volume instead of HA (for debugging purposes) using environment variable LOCAL
Is the addon version dead? there hasnât been any response.
Sorry, Iâve been swamped at work. Iâm working on releasing a new version of the addon, I have the dependency issue fixed but the new version of the tool has caused some other issues with the addon. Iâm trying to figure out what is going on there.
@bar Iâm trying to get the addon working with the new release, but am running into issues getting the container talking to HA. Any idea what would be causing the error below to repeat over and over again in the logs (hostnames and tokens have been obfuscated)?
Iâm assuming the HA_URL environment variable should be pointing to my HA front-end, and not the supervisor API like I used in the past. That doesnât seem to work with this new version.
UPDATE: I just tried building a docker container using the ha-zwave-network Dockerfile and running it on my home server and I see the same errors.
INFO:Managers.configuration_manager:Configuration is valid, data: {'home_assistant_url': 'https://hassio.example.com:8123/', 'home_assistant_token': 'xxxxxxxx', 'ssl_key': '/ssl/privkey.pem', 'ssl_certificate': '/ssl/fullchain.pem', 'is_debug': True, 'is_local': False, 'server_port': 6123, 'home_assistant_web_socket_url': 'wss://hassio.example.com:8123/', 'is_ssl': True, 'ssl_context': ('/ssl/fullchain.pem', '/ssl/privkey.pem')}
DEBUG:asyncio:Using selector: EpollSelector
INFO:Managers.data_manager:Connecting to wss://hassio.example.com:8123/
* Serving Flask app "webserver" (lazy loading)
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: on
INFO:werkzeug: * Running on https://0.0.0.0:6123/ (Press CTRL+C to quit)
INFO:werkzeug: * Restarting with stat
ERROR:Managers.data_manager:Failed to connect due to error: 'NoneType' object has no attribute 'encode'
INFO:Managers.configuration_manager:Configuration is valid, data: {'home_assistant_url': 'https://hassio.example.com:8123/', 'home_assistant_token': 'xxxxxxx', 'ssl_key': '/ssl/privkey.pem', 'ssl_certificate': '/ssl/fullchain.pem', 'is_debug': True, 'is_local': False, 'server_port': 6123, 'home_assistant_web_socket_url': 'wss://hassio.example.com:8123/', 'is_ssl': True, 'ssl_context': ('/ssl/fullchain.pem', '/ssl/privkey.pem')}
DEBUG:asyncio:Using selector: EpollSelector
INFO:Managers.data_manager:Connecting to wss://hassio.example.com:8123/
WARNING:werkzeug: * Debugger is active!
ERROR:Managers.data_manager:Failed to connect due to error: 'NoneType' object has no attribute 'encode'
INFO:werkzeug: * Debugger PIN: xxx-xxx-xxx
INFO:Managers.data_manager:Connecting to wss://hassio.example.com:8123/
ERROR:Managers.data_manager:Failed to connect due to error: 'NoneType' object has no attribute 'encode'
INFO:Managers.data_manager:Connecting to wss://hassio.example.com:8123/
Iâm working on additional release with more details when exceptions takes place,
Before that, just to make sure, can you please check if the container can access the host that you are trying to connect ping / curl,
I want to rule out any communication error because the line the code fail on was related to the connect function of websocket.
Another direction I would like to rule out is about the certificate, are you using self-sign or CA certificate?
thanks
I comared the logs you have sent to the one I have,
URL ends with /
, please remove it and it will work for you (reproduced it).
sorry it took me a while to reply. Hereâs the extended error I was getting:
date | stream | content |
---|---|---|
2020-10-24 13:52:55 | stderr | ERROR:Managers.data_manager:Failed to refresh data due to error: invalid literal for int() with base 10: âvolume_1â |
2020-10-24 13:52:55 | stderr | INFO:Managers.data_manager:Loading devices |
2020-10-24 13:52:54 | stderr | INFO:Managers.data_manager:Reloading data |
2020-10-24 13:52:53 | stderr | ERROR:Managers.data_manager:Failed to refresh data due to error: invalid literal for int() with base 10: âvolume_1â |
2020-10-24 13:52:53 | stderr | INFO:Managers.data_manager:Loading devices |
2020-10-24 13:52:53 | stderr | INFO:Managers.data_manager:Reloading data |
2020-10-24 13:52:47 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:47] â[33mGET /favicon.ico HTTP/1.1[0mâ 404 - |
2020-10-24 13:52:47 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:47] â[37mGET /data/nodes.json HTTP/1.1[0mâ 200 - |
2020-10-24 13:52:47 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:47] â[37mGET /index.html HTTP/1.1[0mâ 200 - |
2020-10-24 13:52:43 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:43] â[33mGET /favicon.ico HTTP/1.1[0mâ 404 - |
2020-10-24 13:52:43 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:43] â[33mGET /index.htm HTTP/1.1[0mâ 404 - |
2020-10-24 13:52:39 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:39] â[33mGET /favicon.ico HTTP/1.1[0mâ 404 - |
2020-10-24 13:52:39 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:39] â[33mGET /index.tm HTTP/1.1[0mâ 404 - |
2020-10-24 13:52:36 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:36] â[37mGET /data/nodes.json HTTP/1.1[0mâ 200 - |
2020-10-24 13:52:36 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:36] â[37mGET / HTTP/1.1[0mâ 200 - |
2020-10-24 13:52:33 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:33] â[33mGET /favicon.ico HTTP/1.1[0mâ 404 - |
2020-10-24 13:52:33 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:33] â[37mGET /data/nodes.json HTTP/1.1[0mâ 200 - |
2020-10-24 13:52:32 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:32] â[37mGET /static/images/json.png HTTP/1.1[0mâ 200 - |
2020-10-24 13:52:32 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:32] â[37mGET /static/css/styles.css HTTP/1.1[0mâ 200 - |
2020-10-24 13:52:32 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:32] â[37mGET /static/scripts/networkViewer.js HTTP/1.1[0mâ 200 - |
2020-10-24 13:52:32 | stderr | INFO:werkzeug:192.168.1.95 - - [24/Oct/2020 13:52:32] â[37mGET / HTTP/1.1[0mâ 200 - |
2020-10-24 13:52:24 | stderr | ERROR:Managers.data_manager:Failed to refresh data due to error: invalid literal for int() with base 10: âvolume_1â |
2020-10-24 13:52:24 | stderr | INFO:Managers.data_manager:Loading devices |
2020-10-24 13:52:24 | stderr | INFO:Managers.data_manager:Reloading data |
2020-10-24 13:52:23 | stderr | ERROR:Managers.data_manager:Failed to refresh data due to error: invalid literal for int() with base 10: âvolume_1â |
2020-10-24 13:52:23 | stderr | INFO:Managers.data_manager:Loading devices |
2020-10-24 13:52:22 | stderr | INFO:Managers.data_manager:Reloading data |
2020-10-24 13:51:54 | stderr | ERROR:Managers.data_manager:Failed to refresh data due to error: invalid literal for int() with base 10: âvolume_1â |
2020-10-24 13:51:54 | stderr | INFO:Managers.data_manager:Loading devices |
2020-10-24 13:51:53 | stderr | INFO:Managers.data_manager:Reloading data |
2020-10-24 13:51:52 | stderr | ERROR:Managers.data_manager:Failed to refresh data due to error: invalid literal for int() with base 10: âvolume_1â |
2020-10-24 13:51:52 | stderr | INFO:Managers.data_manager:Loading devices |
2020-10-24 13:51:52 | stderr | INFO:Managers.data_manager:Reloading data |
2020-10-24 13:51:23 | stderr | ERROR:Managers.data_manager:Failed to refresh data due to error: invalid literal for int() with base 10: âvolume_1â |
2020-10-24 13:51:23 | stderr | INFO:Managers.data_manager:Loading devices |
2020-10-24 13:51:22 | stderr | INFO:Managers.data_manager:Reloading data |
2020-10-24 13:51:22 | stderr | INFO:Managers.data_manager:Login completed, Home Assistant version: 0.116.4 |
2020-10-24 13:51:22 | stderr | DEBUG:Managers.data_manager:Login message received: {âtypeâ: âauth_okâ, âha_versionâ: â0.116.4â} |
2020-10-24 13:51:22 | stderr | DEBUG:Managers.data_manager:Login message received: {âtypeâ: âauth_requiredâ, âha_versionâ: â0.116.4â} |
2020-10-24 13:51:22 | stderr | INFO:Managers.data_manager:Logging into wss://super.secret.url:8123 |
2020-10-24 13:51:22 | stderr | INFO:werkzeug: * Debugger PIN: ###-###-### |
2020-10-24 13:51:22 | stderr | WARNING:werkzeug: * Debugger is active! |
2020-10-24 13:51:22 | stderr | INFO:Managers.data_manager:Connecting to wss://super.secret.url:8123 |
2020-10-24 13:51:22 | stderr | DEBUG:asyncio:Using selector: EpollSelector |
2020-10-24 13:51:22 | stderr | INFO:Managers.configuration_manager:Configuration is valid, data: {âhome_assistant_urlâ: âhttps://super.secret.url:8123â, âhome_assistant_tokenâ: âWoUlDnTYoULiKeToKnOwâ, âssl_keyâ: ââ, âssl_certificateâ: ââ, âis_debugâ: True, âis_localâ: False, âserver_portâ: 6123, âhome_assistant_web_socket_urlâ: âwss://super.secret.url:8123â, âis_sslâ: False, âssl_contextâ: None} |
2020-10-24 13:51:22 | stderr | ERROR:Managers.data_manager:Failed to refresh data due to error: invalid literal for int() with base 10: âvolume_1â |
2020-10-24 13:51:22 | stderr | INFO:Managers.data_manager:Loading devices |
2020-10-24 13:51:22 | stderr | INFO:Managers.data_manager:Reloading data |
2020-10-24 13:51:22 | stderr | INFO:Managers.data_manager:Login completed, Home Assistant version: 0.116.4 |
2020-10-24 13:51:22 | stderr | DEBUG:Managers.data_manager:Login message received: {âtypeâ: âauth_okâ, âha_versionâ: â0.116.4â} |
2020-10-24 13:51:22 | stderr | DEBUG:Managers.data_manager:Login message received: {âtypeâ: âauth_requiredâ, âha_versionâ: â0.116.4â} |
2020-10-24 13:51:22 | stderr | INFO:Managers.data_manager:Logging into wss://super.secret.url:8123 |
2020-10-24 13:51:22 | stderr | INFO:werkzeug: * Restarting with stat |
2020-10-24 13:51:22 | stderr | INFO:werkzeug: * Running on http://0.0.0.0:6123/ (Press CTRL+C to quit) |
2020-10-24 13:51:21 | stdout | * Debug mode: on |
2020-10-24 13:51:21 | stdout | Use a production WSGI server instead. |
2020-10-24 13:51:21 | stdout | WARNING: This is a development server. Do not use it in a production deployment. |
2020-10-24 13:51:21 | stdout | * Environment: production |
2020-10-24 13:51:21 | stdout | * Serving Flask app âwebserverâ (lazy loading) |
2020-10-24 13:51:21 | stderr | INFO:Managers.data_manager:Connecting to wss://super.secret.url:8123 |
2020-10-24 13:51:21 | stderr | DEBUG:asyncio:Using selector: EpollSelector |
2020-10-24 13:51:21 | stderr | INFO:Managers.configuration_manager:Configuration is valid, data: {âhome_assistant_urlâ: âhttps://super.secret.url:8123â, âhome_assistant_tokenâ: âWoUlDnTYoULiKeToKnOwâ, âssl_keyâ: ââ, âssl_certificateâ: ââ, âis_debugâ: True, âis_localâ: False, âserver_portâ: 6123, âhome_assistant_web_socket_urlâ: âwss://super.secret.url:8123â, âis_sslâ: False, âssl_contextâ: None} |
âvolume_1â refers to a sensor for my Synology disk station:
{
"config_entries": [
"dc3476f9c26e405f98b29d61a69de76d"
],
"connections": [],
"manufacturer": "Synology",
"model": "DS1515+",
"name": "Synology NAS (Volume 1 - SHR with 1 disk protect)",
"sw_version": "DSM 6.2.3-25426 Update 2",
"entry_type": null,
"id": "59ef40738d5b48baba9760ec7b21e6d7",
"identifiers": [
[
"synology_dsm",
"XXXXXXXXXXXXX",
"volume_1"
]
],
"via_device_id": "bb0acb15501a405597ef76cd2fa88d0a",
"area_id": null,
"name_by_user": null
},
found the issue and fixed it, new release is available
I want to use the addon but get:
INFO:werkzeug: * Running on http://0.0.0.0:6123/ (Press CTRL+C to quit)
ERROR:Managers.data_manager:Failed to connect due to error: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123) [LN: 87]
INFO:Managers.data_manager:Connecting to ws://supervisor/core
ERROR:Managers.data_manager:Failed to connect due to error: [SSL: WRONG_VERSION_NUMBER] wrong version number (_ssl.c:1123) [LN: 87]
I using SSL https://domain.nl
what can I do? because the addon has no configuration parameters.
are you using SSL? seems that youâve entered http://supervisor/core as URL
Currently from the logs above there are 3 potential issues:
please check and let me know which one of them cause the error
thanks
The addon is fubared at the moment, Iâm working on a fix but running into issues with some of the recent changes.
I just published a new release of the addon that should get it working for everyone again. There are two big changes:
Here is the changelog update:
Can you share what caused the change that forces to enter the configuration manually?
Thanks
The old version worked with the http://supervisor/core URL and the supervisor token. The supervisor token wonât work on the regular URL, so that requires creating a token and adding it to the config. I also canât find anything in the addon APIs that will give me the URL and port of the web interface, so that needs to be in the config as well. Supposedly there is a function bassio::core.port that should at least give me the port number, but I have yet to get it to return anything. Iâm guessing there is some magic value that needs to be set in the addon config.json that I havenât found yet. Iâm planning on pulling down some addons and digging through their code to see if I can find one where that works.
If SSL isnât enabled on HA, it should be possible to use http://homeassistant.local.hass.io:. But if SSL is enabled on HA, that URL will fail unless you also add homeassistant.local.hass.io as a SAN on the certificate. And I still have the issue of needed to get the port from somewhere. Unfortunately it canât just use http[s]://127.0.0.1: either, since localhost doesnât map to the docker image running HA from inside the addon container.
Iâm going to try and find some time to do some code refactoring for the addon, and in the process Iâm going to do some more digging. Unfortunately, I donât think there is any way around needing at least the token in the config even if I do figure out how to get the hostname or IP and port.