jeroenterheerdt / HAsmartirrigation

Smart Irrigation custom component for Home Assistant
https://jeroenterheerdt.github.io/HAsmartirrigation/
MIT License
362 stars 48 forks source link

After updating to v2024.7.4: No weather data to parse for mapping 0 #430

Closed posixx closed 3 months ago

posixx commented 3 months ago

What happened?

I updated to the latest version coming from the previous stable version a few months old. I’m using my own weatherstation sensors only. Since reboot I get every hour:

2024-07-11 01:29:36.469 WARNING (MainThread) [custom_components.smart_irrigation] [async_update_all] No weather data to parse for mapping 0 2024-07-11 02:29:36.470 WARNING (MainThread) [custom_components.smart_irrigation] [async_update_all] No weather data to parse for mapping 0 2024-07-11 03:29:36.471 WARNING (MainThread) [custom_components.smart_irrigation] [async_update_all] No weather data to parse for mapping 0 2024-07-11 04:29:36.472 WARNING (MainThread) [custom_components.smart_irrigation] [async_update_all] No weather data to parse for mapping 0

How to reproduce

Wait an hour, it will happen every hour as hourly update is configured.

Relevant log output

2024-07-11 01:29:36.469 WARNING (MainThread) [custom_components.smart_irrigation] [async_update_all] No weather data to parse for mapping 0
2024-07-11 02:29:36.470 WARNING (MainThread) [custom_components.smart_irrigation] [async_update_all] No weather data to parse for mapping 0
2024-07-11 03:29:36.471 WARNING (MainThread) [custom_components.smart_irrigation] [async_update_all] No weather data to parse for mapping 0
2024-07-11 04:29:36.472 WARNING (MainThread) [custom_components.smart_irrigation] [async_update_all] No weather data to parse for mapping 0

Which version are you running?

V2024.7.4

Diagnostics file

Additional information

{ "home_assistant": { "installation_type": "Home Assistant OS", "version": "2024.7.2", "dev": false, "hassio": true, "virtualenv": false, "python_version": "3.12.4", "docker": true, "arch": "x86_64", "timezone": "Europe/Amsterdam", "os_name": "Linux", "os_version": "6.6.33-haos", "supervisor": "2024.06.2", "host_os": "Home Assistant OS 12.4", "docker_version": "26.1.4", "chassis": "embedded", "run_as_root": true }, "custom_components": { "kia_uvo": { "documentation": "https://github.com/Hyundai-Kia-Connect/kia_uvo", "version": "2.26.0", "requirements": [ "hyundai_kia_connect_api==3.22.0" ] }, "pyscript": { "documentation": "https://github.com/custom-components/pyscript", "version": "1.5.0", "requirements": [ "croniter==1.3.8", "watchdog==2.3.1" ] }, "zidoo": { "documentation": "https://www.github.com/wizmo2/zidoo-player", "version": "2.0.1", "requirements": [] }, "afvalbeheer": { "documentation": "https://github.com/pippyn/Home-Assistant-Sensor-Afvalbeheer", "version": "5.3.5", "requirements": [ "rsa", "pycryptodome" ] }, "buienalarm": { "documentation": "https://github.com/gieljnssns/buienalarm-sensor-homeassistant/tree/master", "version": "1.9", "requirements": [ "pybuienalarm==0.1.1" ] }, "smart_irrigation": { "documentation": "https://github.com/jeroenterheerdt/HASmartIrrigation", "version": "v2024.7.4", "requirements": [] }, "easee": { "documentation": "https://github.com/nordicopen/easee_hass", "version": "0.9.59", "requirements": [ "pyeasee==0.8.1" ] }, "hacs": { "documentation": "https://hacs.xyz/docs/configuration/start", "version": "1.34.0", "requirements": [ "aiogithubapi>=22.10.1" ] } }, "integration_manifest": { "domain": "smart_irrigation", "name": "Smart Irrigation", "codeowners": [ "jeroenterheerdt" ], "config_flow": true, "dependencies": [ "http", "panel_custom" ], "documentation": "https://github.com/jeroenterheerdt/HASmartIrrigation", "iot_class": "local_push", "issue_tracker": "https://github.com/jeroenterheerdt/HASmartIrrigation/issues", "requirements": [], "version": "v2024.7.4", "is_built_in": false }, "setup_times": { "null": { "setup": 0.0001160898245871067 }, "b0a728f53e166f1e6513da60a7130f51": { "wait_import_platforms": -5.429051163839176, "config_entry_setup": 5.539903113152832 } }, "data": { "use_weather_service": false, "weather_service": null, "store": { "config": { "calctime": "23:55", "units": "metric", "use_weather_service": false, "weather_service": null, "autocalcenabled": true, "autoupdateenabled": true, "autoupdateschedule": "hours", "autoupdatedelay": "0", "autoupdateinterval": "1", "autoclearenabled": true, "cleardatatime": "23:59", "starteventfiredtoday": false, "continuousupdates": false }, "mappings": [ { "id": 0, "name": "Davis Vantage Pro Weerstation", "mappings": { "Dewpoint": { "source": "sensor", "sensorentity": "sensor.davis_vantage_pro2_dauwpunt", "unit": "" }, "Evapotranspiration": { "source": "sensor", "sensorentity": "sensor.davis_vantage_pro2_verdamping", "unit": "" }, "Humidity": { "source": "sensor", "sensorentity": "sensor.davis_vantage_pro2_luchtvochtigheid", "unit": "" }, "Precipitation": { "source": "sensor", "sensorentity": "sensor.davis_vantage_pro2_regenhoveelheid_dag", "unit": "" }, "Pressure": { "source": "sensor", "sensorentity": "sensor.davis_vantage_pro2_barometer", "unit": "millibar" }, "Solar Radiation": { "source": "sensor", "sensorentity": "sensor.davis_vantage_pro2_zonnestraling", "unit": "W/m2" }, "Temperature": { "source": "sensor", "sensorentity": "sensor.davis_vantage_pro2_buitentemperatuur", "unit": "" }, "Windspeed": { "source": "sensor", "sensorentity": "sensor.davis_vantage_pro2_windsnelheid_gemiddeld", "unit": "km/h", "aggregate": "average" } }, "data": [ { "retrieved": "2024-07-11T00:06:37.868737" } ], "data_last_updated": "2024-07-11T00:06:37.868792" } ], "modules": [ { "id": 2, "name": "Passthrough", "description": "Geeft waarde van ET sensor as verandering terug.", "config": {}, "schema": [] } ], "zones": [ { "id": 0, "name": "Voortuin", "size": 80.0, "throughput": 9.0, "state": "automatic", "bucket": -1.3966115997900619, "old_bucket": 0, "delta": 0, "duration": 745, "module": 2, "multiplier": 1.0, "explanation": null, "mapping": 0, "lead_time": 0.0, "maximum_duration": 7200.0, "maximum_bucket": 50, "last_calculated": "2024-07-10T23:55:00.847141", "last_updated": "2024-07-11T00:06:37.868792", "number_of_data_points": 0 }, { "id": 1, "name": "Achtertuin Links", "size": 50.0, "throughput": 6.0, "state": "automatic", "bucket": -1.3966115997900619, "old_bucket": 0, "delta": 0, "duration": 698, "module": 2, "multiplier": 1.0, "explanation": null, "mapping": 0, "lead_time": 0.0, "maximum_duration": 7200.0, "maximum_bucket": 50, "last_calculated": "2024-07-10T23:55:01.279282", "last_updated": "2024-07-11T00:06:37.868792", "number_of_data_points": 0 }, { "id": 2, "name": "Achtertuin Rechts", "size": 155.0, "throughput": 18.0, "state": "automatic", "bucket": -1.3966115997900619, "old_bucket": 0, "delta": 0, "duration": 722, "module": 2, "multiplier": 1.0, "explanation": null, "mapping": 0, "lead_time": 0.0, "maximum_duration": 7200.0, "maximum_bucket": 50, "last_calculated": "2024-07-10T23:55:01.707422", "last_updated": "2024-07-11T00:06:37.868792", "number_of_data_points": 0 } ] } } }

omenek159 commented 3 months ago

You have to go to SmartIrrigation settings in Integrations in HA, click Configure and check 'Use weather service'. Next you have to go to SI in sidebar and in 'Sensor groups' tab you have to select 'Weather service' where you don't use sensors.

posixx commented 3 months ago

So why do i need to actiivate weatherservice if i don't use it? I'm using only weatherstatyion sensors already available.

As soon as i enable continous updates the following my log is flooded with the following errors:

2024-07-11 10:11:37.147 ERROR (MainThread) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/config/custom_components/smart_irrigation/init.py", line 499, in async_sensor_state_changed await self.async_continuous_update_for_mapping( File "/config/custom_components/smart_irrigation/init.py", line 557, in async_continuous_update_for_mapping await self.async_calculate_zone( File "/config/custom_components/smart_irrigation/init.py", line 969, in async_calculate_zone f"calculate_zone: modinst.name: {modinst.name} and forecast_days: {modinst._forecast_days}" ^^^^^^^^^^^^^^^^^^^^^^ AttributeError: 'Passthrough' object has no attribute '_forecast_days'

posixx commented 3 months ago

I completely removed the integration and set it up again, but the same issues return..

collateral87 commented 3 months ago

I select weather service and i have the same issue.

No weatherdata at all.

Screenshot_20240711_202538_Home Assistant.jpg

Screenshot_20240711_202502_Home Assistant.jpg

jeroenterheerdt commented 3 months ago

@collateral87 please open a separate issue.

jeroenterheerdt commented 3 months ago

@posixx so without the experimental feature on you are not getting any updates? did the update actually run (if you go into the UI for smart irrigation you can check when it was last updated / calculated). Now, when you turned on the experimental feature, you are clearly hitting a bug, so thanks for reporting that.

posixx commented 3 months ago

I switched from passthrough to PyETO with solrad behaviour to not calculate and forecast 3 days. That way continous updates works. I see you have released v2024.7.5; does this fix both issues? The "No weather data to parse for mapping 0" warning every hour AND "AttributeError: 'Passthrough' object has no attribute '_forecast_days'" warning?

jeroenterheerdt commented 3 months ago

Yes, it should fix both.

posixx commented 3 months ago

Yes it seems the warnings are gone; using passthrough again as my weatherstation has a ET sensor.

one question about the pressure sensor: Davis weatherstation uses configured height of station placement for sea-level pressure display so it can be compared with other stations. So the value it shows is the pressure as was the station placed on sea-level. Using your sensor configuration; would this be absolute or relative setting?

jeroenterheerdt commented 3 months ago

that's relative: https://ambientweather.com/faqs/question/view/id/1591/... Also from the readme:

If you are using your own barometric pressure sensor, enter either the absolute or relative barometric pressure. Absolute barometric pressure is the actual pressure measured at your location and relative barometric pressure is the pressure calculated at sea level. Make this clear in the selection box.

posixx commented 3 months ago

Jeroen,

My log was flooded with the following errors:

2024-07-13 06:59:06.754 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:06.908 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:07.060 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:16.516 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:16.684 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:16.864 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:26.036 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:26.192 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:26.357 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:46.365 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:46.372 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:46.619 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:46.646 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:46.901 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module 2024-07-13 06:59:46.930 ERROR (MainThread) [custom_components.smart_irrigation.calcmodules.passthrough] No Evapotranspiration data specified for Passthrough module

This started right after the daily calculation and till the last time above, From then on it disappeared. Could this be due to the ET sensor being reset to 0 at 0:00h?

Also another observation; yesterday it rained 17mm during the day, but still, the calculation added 1,6 mm to the bucket? I would expect to have 17mm substracted from the stock bucket value?

posixx commented 3 months ago

Yes, definitely a bug: as soon as my ET sensor is reset to 0.0 eventlog is flooded again probably until sensor > 0.0

posixx commented 3 months ago

Also after changing pressure to relative I get every hour:

2024-07-14 01:47:24.950 ERROR (SyncWorker_46) [homeassistant] Error doing job: Task exception was never retrieved (None) Traceback (most recent call last): File "/config/custom_components/smart_irrigation/init.py", line 745, in _async_update_all relative_to_absolute_pressure( File "/config/custom_components/smart_irrigation/helpers.py", line 411, in relative_to_absolute_pressure absolute_pressure = pressure * (T0 / temperature) * (g M / (R * 287))


TypeError: unsupported operand type(s) for *: 'NoneType' and 'float'
posixx commented 3 months ago

Oh and I disabled continuous updates because of the flooding and now no calculation is done at the end of the day. Could be related to the problem above?