tlskinneriv / hassio-addons

MIT License
8 stars 3 forks source link

Latest update fails to see AWS device #17

Closed DeFlanko closed 3 months ago

DeFlanko commented 3 months ago

Integration Version: Current version: 1.1.2 (Changelog)

Home Assistant Version: Core 2024.7.3 Supervisor 2024.06.2 Operating System 12.4 Frontend 20240710.0

Describe the bug Ever since the update this morning , my AWS is not reporting back to HA

To Reproduce Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

Expected behavior A clear and concise description of what you expected to happen. Expected to see data being reported in the logs but not.

Screenshots If applicable, add screenshots to help explain your problem.

Additional context Add any other context about the problem here.

Debug log output from the integration (see Home Assistant docs for how to enable debug logging for an integration; integration name: "custom_components.awnet_local")

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[2024-07-21 15:45:17,543] [INFO    ] LOG_LEVEL: DEBUG (awnet.py:185)
[2024-07-21 15:45:17,543] [INFO    ] HTTP_LISTEN_HOST:  (awnet.py:186)
[2024-07-21 15:45:17,543] [INFO    ] HTTP_LISTEN_PORT: 7080 (awnet.py:187)
[2024-07-21 15:45:17,543] [INFO    ] HA_API_AUTH_TOKEN: 22c634735b2184c804011f47d5e24eb8ead0eb98e4e6a2fd1d3cb1b00b4151ccc7d90172b1739fd1002c3a49c4e1df7926ce8b2b3815bca7 (awnet.py:188)
[2024-07-21 15:45:17,543] [INFO    ] HA_API_BASE_URL: http://supervisor/core/api/ (awnet.py:189)
[2024-07-21 15:45:17,543] [INFO    ] HA_API_VALIDATE_CERTIFICATE: True (awnet.py:190)
[2024-07-21 15:45:17,543] [INFO    ] Serving on http://:7080 (awnet.py:194)

AWS setup: image

image

image

image

eoren1 commented 3 months ago

Same here

sonori-of-trill commented 3 months ago

I'm experiencing the same issue post update.

DeFlanko commented 3 months ago

@eoren1 & @sonori-of-trill Do you have similar logs to post?

sonori-of-trill commented 3 months ago

@DeFlanko My logs look basically identical. Even with Debug it seems to start and then display no further log messages until you stop the service.

Startup s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [2024-07-21 18:33:31,715] [INFO ] LOG_LEVEL: DEBUG (awnet.py:185) [2024-07-21 18:33:31,715] [INFO ] HTTP_LISTEN_HOST: (awnet.py:186) [2024-07-21 18:33:31,715] [INFO ] HTTP_LISTEN_PORT: 7080 (awnet.py:187) [2024-07-21 18:33:31,715] [INFO ] HA_API_AUTH_TOKEN: 889cfee463b21bd1a59546abd5bd9422501258e694c29ef769f3bb2b147b40ad3c51549de644e5f8b340fc971b92eb175e64c9a7afbdc01b (awnet.py:188) [2024-07-21 18:33:31,715] [INFO ] HA_API_BASE_URL: http://supervisor/core/api/ (awnet.py:189) [2024-07-21 18:33:31,715] [INFO ] HA_API_VALIDATE_CERTIFICATE: True (awnet.py:190) [2024-07-21 18:33:31,715] [INFO ] Serving on http://:7080 (awnet.py:194)

After addon is stopped from the GUI

s6-rc: info: service s6rc-oneshot-runner: starting s6-rc: info: service s6rc-oneshot-runner successfully started s6-rc: info: service fix-attrs: starting s6-rc: info: service fix-attrs successfully started s6-rc: info: service legacy-cont-init: starting s6-rc: info: service legacy-cont-init successfully started s6-rc: info: service legacy-services: starting s6-rc: info: service legacy-services successfully started [2024-07-21 18:32:20,504] [INFO ] LOG_LEVEL: DEBUG (awnet.py:185) [2024-07-21 18:32:20,504] [INFO ] HTTP_LISTEN_HOST: (awnet.py:186) [2024-07-21 18:32:20,504] [INFO ] HTTP_LISTEN_PORT: 7080 (awnet.py:187) [2024-07-21 18:32:20,504] [INFO ] HA_API_AUTH_TOKEN: 721b782cb3801a927826a9ee133710dc5b0afcab1cb342a03f16507e22a300dc5d68fa6b9b919180d3375c0e5238dfcaca7ee92534b87437 (awnet.py:188) [2024-07-21 18:32:20,504] [INFO ] HA_API_BASE_URL: http://supervisor/core/api/ (awnet.py:189) [2024-07-21 18:32:20,504] [INFO ] HA_API_VALIDATE_CERTIFICATE: True (awnet.py:190) [2024-07-21 18:32:20,504] [INFO ] Serving on http://:7080 (awnet.py:194) s6-rc: info: service legacy-services: stopping s6-rc: info: service legacy-services successfully stopped s6-rc: info: service legacy-cont-init: stopping s6-rc: info: service legacy-cont-init successfully stopped s6-rc: info: service fix-attrs: stopping s6-rc: info: service fix-attrs successfully stopped s6-rc: info: service s6rc-oneshot-runner: stopping s6-rc: info: service s6rc-oneshot-runner successfully stopped

tlskinneriv commented 3 months ago

Moving this issue to the add-ons repo since that's where the issue is.

@DeFlanko, is your second screenshot (the add-on configuration page) what is present post update? I adjusted the script inside the container to listen on 7080 instead of port 80. It looks like your configuration is still set to map 7080 -> 80. This is new to me, because I did the update the night of on my HA instance, and it updated the mapping correctly to 7080 -> 7080. You may need to try clicking the "Reset to Defaults" button in "Network" section.

If the "Network" port mapping is not correct (e.g. 7080 -> 80 instead of 7080 -> 7080), it will listen but will absolutely not receive any traffic from the Ambient Weather device. If resetting the mapping does not work, you may need to go as far as uninstalling and reinstalling the add-on (don't forget to copy out your config values first; no need to remove the integration from HA either).

In the meantime, for anyone that this broke, you can safely roll back to the previous version of the add-on. There is effectively nothing different function-wise in this code.

ETA: Screenshot of working config example.

image

DeFlanko commented 3 months ago

Very odd. Ok i "set the port" which then locks it for enabling editing, so then you reset to defaults. reboot the service, then it says 7080 and --> 7080/udp

s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped
s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
[2024-07-21 19:43:29,446] [INFO    ] LOG_LEVEL: DEBUG (awnet.py:185)
[2024-07-21 19:43:29,447] [INFO    ] HTTP_LISTEN_HOST:  (awnet.py:186)
[2024-07-21 19:43:29,447] [INFO    ] HTTP_LISTEN_PORT: 7080 (awnet.py:187)
[2024-07-21 19:43:29,447] [INFO    ] HA_API_AUTH_TOKEN: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX(awnet.py:188)
[2024-07-21 19:43:29,447] [INFO    ] HA_API_BASE_URL: http://supervisor/core/api/ (awnet.py:189)
[2024-07-21 19:43:29,447] [INFO    ] HA_API_VALIDATE_CERTIFICATE: True (awnet.py:190)
[2024-07-21 19:43:29,447] [INFO    ] Serving on http://:7080 (awnet.py:194)
[2024-07-21 19:43:42,520] [DEBUG   ] original requestline: GET ?&PASSKEY=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX&stationtype=AMBWeatherPro_V5.1.5&dateutc=2024-07-22+02:43:42&tempf=73.4&humidity=71&windspeedmph=2.68&windgustmph=4.47&maxdailygust=11.41&winddir=290&uv=0&solarradiation=14.48&hourlyrainin=0.000&eventrainin=0.000&dailyrainin=0.000&weeklyrainin=0.000&monthlyrainin=0.000&yearlyrainin=4.701&totalrainin=4.701&battout=1&tempinf=78.4&humidityin=53&baromrelin=29.802&baromabsin=29.822 HTTP/1.1 (awnet.py:143)
[2024-07-21 19:43:42,521] [DEBUG   ] Environ is: {'__BASHIO_LIB_DIR': '/usr/lib/bashio', 'S6_BEHAVIOUR_IF_STAGE2_FAILS': '2', 'LOG_LEVEL': 'DEBUG', 'HOSTNAME': '8d3f9d88-awnet-to-hass', 'S6_CMD_WAIT_FOR_SERVICES_MAXTIME': '0', 'S6_SERVICES_READYTIME': '50', 'PASSKEY_OVERRIDE': 'c8:c9:a3:14:d8:db', 'PWD': '/', 'UV_EXTRA_INDEX_URL': 'https://wheels.home-assistant.io/musllinux-index/', 'TZ': 'America/Los_Angeles', 'HOME': '/root', 'LANG': 'C.UTF-8', '__BASHIO_BIN': '/usr/lib/bashio/bashio', 'HASSIO_TOKEN': 'XXXXXXXXXXXXXXXXXXXXXX', 'SUPERVISOR_TOKEN': 'c158f3c1f80fae47ead6ea81e348c1ca8f120ada6dadcb0a414e6b9acb4b4971bae172a9ad2cf4a7958cfe092bb1d41bc19259af2e856393', 'SHLVL': '3', 'PATH': '/command:/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin', 'S6_CMD_WAIT_FOR_SERVICES': '1', 'HA_API_AUTH_TOKEN': 'XXXXXXXXXXXXXXXXXXXXXXXX', '_': '/usr/local/bin/python3', 'SERVER_NAME': '8d3f9d88-awnet-to-hass.local.hass.io', 'GATEWAY_INTERFACE': 'CGI/1.1', 'SERVER_PORT': '7080', 'REMOTE_HOST': '', 'CONTENT_LENGTH': '', 'SCRIPT_NAME': '', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SOFTWARE': 'WSGIServer/0.2', 'REQUEST_METHOD': 'GET', 'PATH_INFO': '', 'QUERY_STRING': '&PASSKEY=XXXXXXXXXXXXXXXXXXXXXXXX&stationtype=AMBWeatherPro_V5.1.5&dateutc=2024-07-22+02:43:42&tempf=73.4&humidity=71&windspeedmph=2.68&windgustmph=4.47&maxdailygust=11.41&winddir=290&uv=0&solarradiation=14.48&hourlyrainin=0.000&eventrainin=0.000&dailyrainin=0.000&weeklyrainin=0.000&monthlyrainin=0.000&yearlyrainin=4.701&totalrainin=4.701&battout=1&tempinf=78.4&humidityin=53&baromrelin=29.802&baromabsin=29.822', 'REMOTE_ADDR': '172.10.1.110', 'CONTENT_TYPE': 'text/plain', 'HTTP_HOST': '172.10.1.31', 'HTTP_CONNECTION': 'close', 'HTTP_USER_AGENT': 'AMBWeatherPro', 'wsgi.input': <_io.BufferedReader name=4>, 'wsgi.errors': <_io.TextIOWrapper name='<stderr>' mode='w' encoding='utf-8'>, 'wsgi.version': (1, 0), 'wsgi.run_once': False, 'wsgi.url_scheme': 'http', 'wsgi.multithread': False, 'wsgi.multiprocess': False, 'wsgi.file_wrapper': <class 'wsgiref.util.FileWrapper'>} (awnet.py:107)
[2024-07-21 19:43:42,521] [DEBUG   ] Headers: 

HOST: 172.10.1.31
CONNECTION: close
USER-AGENT: AMBWeatherPro
CONTENT-TYPE: text/plain

 (awnet.py:109)
[2024-07-21 19:43:42,521] [DEBUG   ] Full Data: {'PASSKEY': ['XXXXXXXXXXXXXXXXX'], 'stationtype': ['AMBWeatherPro_V5.1.5'], 'dateutc': ['2024-07-22 02:43:42'], 'tempf': ['73.4'], 'humidity': ['71'], 'windspeedmph': ['2.68'], 'windgustmph': ['4.47'], 'maxdailygust': ['11.41'], 'winddir': ['290'], 'uv': ['0'], 'solarradiation': ['14.48'], 'hourlyrainin': ['0.000'], 'eventrainin': ['0.000'], 'dailyrainin': ['0.000'], 'weeklyrainin': ['0.000'], 'monthlyrainin': ['0.000'], 'yearlyrainin': ['4.701'], 'totalrainin': ['4.701'], 'battout': ['1'], 'tempinf': ['78.4'], 'humidityin': ['53'], 'baromrelin': ['29.802'], 'baromabsin': ['29.822']} (awnet.py:111)
[2024-07-21 19:43:42,521] [DEBUG   ] PASSKEY override: c8:c9:a3:14:d8:db (awnet.py:99)
[2024-07-21 19:43:42,524] [DEBUG   ] Starting new HTTP connection (1): supervisor:80 (connectionpool.py:243)
[2024-07-21 19:43:42,828] [DEBUG   ] http://supervisor:80 "POST /core/api/services/awnet_local/update HTTP/11" 200 2 (connectionpool.py:546)
[2024-07-21 19:43:42,828] [INFO    ] Sent {"PASSKEY": "c8:c9:a3:14:d8:db", "stationtype": "AMBWeatherPro_V5.1.5", "dateutc": "2024-07-22 02:43:42", "tempf": "73.4", "humidity": "71", "windspeedmph": "2.68", "windgustmph": "4.47", "maxdailygust": "11.41", "winddir": "290", "uv": "0", "solarradiation": "14.48", "hourlyrainin": "0.000", "eventrainin": "0.000", "dailyrainin": "0.000", "weeklyrainin": "0.000", "monthlyrainin": "0.000", "yearlyrainin": "4.701", "totalrainin": "4.701", "battout": "1", "tempinf": "78.4", "humidityin": "53", "baromrelin": "29.802", "baromabsin": "29.822"} (awnet.py:74)
[2024-07-21 19:43:42,828] [DEBUG   ] Valid Request (awnet.py:125)
[2024-07-21 19:43:42,829] [INFO    ] "GET ?&PASSKEY=XXXXXXXXXXXXXXXXXXXXXXXXXX&stationtype=AMBWeatherPro_V5.1.5&dateutc=2024-07-22+02:43:42&tempf=73.4&humidity=71&windspeedmph=2.68&windgustmph=4.47&maxdailygust=11.41&winddir=290&uv=0&solarradiation=14.48&hourlyrainin=0.000&eventrainin=0.000&dailyrainin=0.000&weeklyrainin=0.000&monthlyrainin=0.000&yearlyrainin=4.701&totalrainin=4.701&battout=1&tempinf=78.4&humidityin=53&baromrelin=29.802&baromabsin=29.822 HTTP/1.1" 200 0 (awnet.py:175)
DeFlanko commented 3 months ago

image