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

Unhandled exception when calculating Beaufort Scale #260

Closed
skipper-hqst opened this issue Aug 22, 2022 · 4 comments · Fixed by #261
Closed

Unhandled exception when calculating Beaufort Scale #260

skipper-hqst opened this issue Aug 22, 2022 · 4 comments · Fixed by #261
Assignees
Labels
bug Bugs or issues which will cause a problem for users

Comments

@skipper-hqst
Copy link

skipper-hqst commented Aug 22, 2022

Successfully installed and configured. Working for a while and stopped.
Found in logs as below:

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
[03:47:23] INFO: Fetching configuration...
[03:47:24] INFO: Using MQTT host: core-mosquitto
[03:47:24] INFO: Using MQTT port: 1883
[03:47:24] INFO: Using MQTT username: addons
[03:47:24] INFO: Using MQTT password: REDACTED
[03:47:25] INFO: Starting Ecowitt2MQTT
2022-08-22 03:47:26,514 | ecowitt2mqtt | INFO | Starting ecowitt2mqtt (version 2022.08.3)
2022-08-22 03:47:34,156 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:47:39,693 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:47:50,727 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:48:06,158 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:48:22,162 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:48:32,174 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:48:38,162 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:48:54,762 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:49:10,131 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:49:26,170 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:49:32,133 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:49:42,152 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:49:58,744 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:50:14,154 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:50:30,165 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:50:35,654 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:50:46,149 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:51:02,783 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:51:18,132 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:51:34,572 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:51:39,655 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:51:50,146 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:52:06,717 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:52:22,156 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:52:32,132 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:52:38,154 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:52:54,168 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:53:10,898 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:53:26,116 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:53:32,182 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:53:42,153 | ecowitt2mqtt | INFO | Published to Home Assistant MQTT Discovery
2022-08-22 03:53:57,919 | ecowitt2mqtt | ERROR | too many values to unpack (expected 1)
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

something misconfigured?

@bachya
Copy link
Owner

bachya commented Aug 22, 2022

Try enabling verbose logging (it's one of the configuration options) and restart it; if it drops again, post that whole log.

@skipper-hqst
Copy link
Author

skipper-hqst commented Aug 23, 2022

I'm back :(

2022-08-23 17:08:03,532 | ecowitt2mqtt | DEBUG | Received data from the Ecowitt device: {'PASSKEY': '9B3609D12F1B8E485B770C257C95F5D3', 'stationtype': 'EasyWeatherV1.6.4', 'dateutc': '2022-08-23 15:08:01', 'tempinf': '72.3', 'humidityin': '74', 'baromrelin': '30.039', 'baromabsin': '29.156', 'tempf': '72.1', 'humidity': '85', 'winddir': '71', 'windspeedmph': '4.0', 'windgustmph': '4.5', 'maxdailygust': '8.1', 'rainratein': '0.000', 'eventrainin': '2.787', 'hourlyrainin': '0.000', 'dailyrainin': '0.157', 'weeklyrainin': '2.807', 'monthlyrainin': '4.878', 'yearlyrainin': '92.020', 'totalrainin': '92.020', 'solarradiation': '275.01', 'uv': '2', 'wh65batt': '0', 'freq': '868M', 'model': 'WS2900_V2.01.08'}
INFO:     192.168.5.120:9628 - "POST /data/report HTTP/1.1" 204 No Content
2022-08-23 17:08:03,534 | ecowitt2mqtt | DEBUG | Publishing payload: {'PASSKEY': '9B3609D12F1B8E485B770C257C95F5D3', 'stationtype': 'EasyWeatherV1.6.4', 'dateutc': '2022-08-23 15:08:01', 'tempinf': '72.3', 'humidityin': '74', 'baromrelin': '30.039', 'baromabsin': '29.156', 'tempf': '72.1', 'humidity': '85', 'winddir': '71', 'windspeedmph': '4.0', 'windgustmph': '4.5', 'maxdailygust': '8.1', 'rainratein': '0.000', 'eventrainin': '2.787', 'hourlyrainin': '0.000', 'dailyrainin': '0.157', 'weeklyrainin': '2.807', 'monthlyrainin': '4.878', 'yearlyrainin': '92.020', 'totalrainin': '92.020', 'solarradiation': '275.01', 'uv': '2', 'wh65batt': '0', 'freq': '868M', 'model': 'WS2900_V2.01.08'}
2022-08-23 17:08:03,535 | ecowitt2mqtt | DEBUG | Calculator found for tempinf: calculate_temperature (key: tempin, value: 72.3)
2022-08-23 17:08:03,535 | ecowitt2mqtt | DEBUG | Calculator found for humidityin: calculate_relative_humidity (key: humidityin, value: 74)
2022-08-23 17:08:03,536 | ecowitt2mqtt | DEBUG | Calculator found for baromrelin: calculate_pressure (key: baromrel, value: 30.039)
2022-08-23 17:08:03,536 | ecowitt2mqtt | DEBUG | Calculator found for baromabsin: calculate_pressure (key: baromabs, value: 29.156)
2022-08-23 17:08:03,536 | ecowitt2mqtt | DEBUG | Calculator found for tempf: calculate_temperature (key: temp, value: 72.1)
2022-08-23 17:08:03,537 | ecowitt2mqtt | DEBUG | Calculator found for humidity: calculate_relative_humidity (key: humidity, value: 85)
2022-08-23 17:08:03,537 | ecowitt2mqtt | DEBUG | Calculator found for winddir: calculate_wind_dir (key: winddir, value: 71)
2022-08-23 17:08:03,537 | ecowitt2mqtt | DEBUG | Calculator found for windspeedmph: calculate_wind_speed (key: windspeed, value: 4.0)
2022-08-23 17:08:03,538 | ecowitt2mqtt | DEBUG | Calculator found for windgustmph: calculate_wind_speed (key: windgust, value: 4.5)
2022-08-23 17:08:03,538 | ecowitt2mqtt | DEBUG | Calculator found for maxdailygust: calculate_wind_speed (key: maxdailygust, value: 8.1)
2022-08-23 17:08:03,538 | ecowitt2mqtt | DEBUG | Calculator found for rainratein: calculate_rain_rate (key: rainrate, value: 0.0)
2022-08-23 17:08:03,539 | ecowitt2mqtt | DEBUG | Calculator found for eventrainin: calculate_rain_volume (key: eventrain, value: 2.787)
2022-08-23 17:08:03,539 | ecowitt2mqtt | DEBUG | Calculator found for hourlyrainin: calculate_rain_volume (key: hourlyrain, value: 0.0)
2022-08-23 17:08:03,539 | ecowitt2mqtt | DEBUG | Calculator found for dailyrainin: calculate_rain_volume (key: dailyrain, value: 0.157)
2022-08-23 17:08:03,540 | ecowitt2mqtt | DEBUG | Calculator found for weeklyrainin: calculate_rain_volume (key: weeklyrain, value: 2.807)
2022-08-23 17:08:03,540 | ecowitt2mqtt | DEBUG | Calculator found for monthlyrainin: calculate_rain_volume (key: monthlyrain, value: 4.878)
2022-08-23 17:08:03,540 | ecowitt2mqtt | DEBUG | Calculator found for yearlyrainin: calculate_rain_volume (key: yearlyrain, value: 92.02)
2022-08-23 17:08:03,541 | ecowitt2mqtt | DEBUG | Calculator found for totalrainin: calculate_rain_volume (key: totalrain, value: 92.02)
2022-08-23 17:08:03,541 | ecowitt2mqtt | DEBUG | Calculator found for solarradiation: calculate_solar_radiation_wm2 (key: solarradiation, value: 275.01)
2022-08-23 17:08:03,542 | ecowitt2mqtt | DEBUG | Calculator found for uv: calculate_uv_index (key: uv, value: 2)
2022-08-23 17:08:03,542 | ecowitt2mqtt | DEBUG | Calculator found for wh65batt: calculate_battery (key: wh65batt, value: 0)
2022-08-23 17:08:03,543 | ecowitt2mqtt | DEBUG | Sending DISCONNECT
2022-08-23 17:08:03,544 | ecowitt2mqtt | ERROR | too many values to unpack (expected 1)
2022-08-23 17:08:03,549 | ecowitt2mqtt | DEBUG |   File "/usr/lib/python3.9/site-packages/ecowitt2mqtt/helpers/logging.py", line 47, in wrapper
    return func(*args, **kwargs)
  File "/usr/lib/python3.9/site-packages/ecowitt2mqtt/cli.py", line 229, in main
    loop.run_until_complete(ecowitt.async_start())
  File "uvloop/loop.pyx", line 1501, in uvloop.loop.Loop.run_until_complete
  File "/usr/lib/python3.9/site-packages/ecowitt2mqtt/core.py", line 46, in async_start
    await self._runtime.async_start()
  File "/usr/lib/python3.9/site-packages/ecowitt2mqtt/runtime.py", line 157, in async_start
    await asyncio.gather(*self._runtime_tasks)
  File "/usr/lib/python3.9/site-packages/ecowitt2mqtt/runtime.py", line 91, in _async_create_mqtt_loop
    await self._publisher.async_publish(
  File "/usr/lib/python3.9/site-packages/ecowitt2mqtt/helpers/publisher/hass.py", line 483, in async_publish
    processed_data = ProcessedData(self.ecowitt, data)
  File "<string>", line 6, in __init__
  File "/usr/lib/python3.9/site-packages/ecowitt2mqtt/data.py", line 297, in __post_init__
    self.output[payload_key] = calculator(
  File "/usr/lib/python3.9/site-packages/ecowitt2mqtt/helpers/calculator/meteo.py", line 581, in calculate_beaufort_scale
    [rating] = [
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

@bachya
Copy link
Owner

bachya commented Aug 23, 2022

Thanks, @skipper-hqst! I'm investigating.

@bachya bachya removed the question label Aug 23, 2022
@bachya bachya self-assigned this Aug 23, 2022
@bachya
Copy link
Owner

bachya commented Aug 23, 2022

@skipper-hqst I don't see from your logs: what unit systems (input and output) are you using?

EDIT: nevermind – I can reproduce that from the data. Good news: I've found the issue! Will fix it shortly.

@bachya bachya added the bug Bugs or issues which will cause a problem for users label Aug 23, 2022
@bachya bachya transferred this issue from bachya/home-assistant-addons Aug 23, 2022
@bachya bachya changed the title Addon stopped Unhandled exception when calculating Beaufort Scale Aug 23, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Oct 31, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Bugs or issues which will cause a problem for users
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants