jeroenterheerdt / HAsmartirrigation

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

Cannot activate continuous calculations #436

Open alexl04 opened 1 month ago

alexl04 commented 1 month ago

What happened?

Just installed the latest version to try out the continous calculation option but it returns a 400 error if I try to activate it.

Also wondering if this feature is intended to work:

  1. if all variables except for the Evapotranspiration come from sensors
  2. Total precipitation to be set on last/max for this feature also? Or do we need to include the actual rain rate instead of the sum per hour/day/week/year which all are provided by weather stations from ecowitt for example.

image

How to reproduce

NTR

Relevant log output

No response

Which version are you running?

v2024.7.5 (config integrations shows v2024.6.1 below the logo)

Diagnostics file

Additional information

No response

jeroenterheerdt commented 1 month ago

It should work for you if you have just sensors as sources for everything except et if using pyeto or static module. Heck, the sensors could even come from an api for all we know. You just can't use a weatherservice you configured through this integration though.

Thanks for trying it out and providing the report this is really helpful to get this working properly!

jeroenterheerdt commented 1 month ago

Oh... I am not seeing this and maybe this is just a browser cache issue since you're also seeing the old version number. Try clearing your browser cache and trying again please?

alexl04 commented 1 month ago

I restarted HASS just once more and now the error is gone! Deleting all history/browser cache on both safari and chrome gave no luck.

Thanks for the fast response! Keen to see how the update works. What about the sensor requirements though? Will continuous work if all variables except for the Evapotranspiration come from sensors?

And do we need to change the variable "Total precipitation" to the average of the actual rain rate sensor instead of the last/max of the rain rate per day sensor?

jeroenterheerdt commented 1 month ago

Should work if you have sensors for everything except et as long as you're using pyeto or static module. If you have et sensor then it should work regardless because you will be doing a simple Passthrough. We need to figure out many things with this and I think you're right, you'd set it to the actual rain rate sensor not the rate per day. That and there solar radiation sensor needs to be processed differently.

jeroenterheerdt commented 1 month ago

I have added a discussion and will point others to that as well. https://github.com/jeroenterheerdt/HAsmartirrigation/discussions/437

alexl04 commented 1 month ago

Just posting my findings here.

The version number and front end of this plugin was still the old version in the IOS APP. In order to fix that do the following: Settings>Companion App>debugging>reset frontend cache

Continuous calculation findings so far:

  1. Did not yet change the total rain sensor from total rain rate per day to actual rain rate but the the trend of the bucket is looking ok to be honest. Forgot to enable debug but will post some screenshots later on of the data.
  2. it seems that we have to unable the automatic weather updates and bucket calculation when continuous calculation has been enabled because the bucket size increased to the amount of a full day with only rain (welcome to the Dutch summer) at exactly the calculation time. Seems logic
jeroenterheerdt commented 1 month ago

The second thing you mention is a good point for sure, that sounds like an oversight on my part. I think we should skip pure sensor sensor groups when continuous updates are on. Then you can still use scheduled updates and calculations for when you have a mixed sensor group or senor groups from weather services. Then you shouldnt have to disable the automatic scheduled updates and calculations.

alexl04 commented 1 month ago

More continuous calculation findings:

  1. Enabled debug mode > file size after 3 days +5GB
  2. Updated calculations seemed to stop updating the irrigation bucket size around the time picker shown in the screenshot below. In the second screenshot it seems that there are no values posted for the bucket size at all but we have to check the debug file for this I guess. No time for this yet
  3. The trend seems to react on the rain as seen in the third screenshot but we have to calculate the bucket size with the raw data to confirm if it is correct or not though. No time yet to check the formula and run it in some Python script
image image image
alexl04 commented 1 month ago

Attached 2 snippets of the debug file. The last screenshot above this comments shows the data for the debug selection 2

debug_selection_1.log debug_selection_2.log