jeroenterheerdt / HAsmartirrigation

Smart Irrigation custom component for Home Assistant
MIT License
301 stars 47 forks source link

Bucket (ET) calculation seems too big #302

Closed Dave-Bryant closed 7 months ago

Dave-Bryant commented 7 months ago

What happened?

I have upgraded to V2. Very happy user of V1. Can I ask you to run your eye over my sensor definitions. I am calculating the solar radiation (in the Modules page), but all other sensors are from my weather station updating every 10 minutes. Following is a screenshot of the Bureau of Meteorology calculation of an ET of 4.3 (for 2nd October a hot day) but Smart Irrigation is calculating a larger number of 8 and today (4th October) is cooler than yesterday. In V1, none of my annual Evapotranspiration numbers went over 4.8. Perhaps my sensor configuration is wrong or the unit conversion routines have problem. Following is a screenshot of the zones, sensors and sensor values. The Diagnostic file is also included. Screenshot 2023-10-03 163713 config_entry-smart_irrigation-8d7b5fdb8f8a1c549bfa3c78d9a7935e.json (1).txt

How to reproduce

Update Zones then Calculate all zones.

Relevant log output

Everything is normal in Logs.

Which version are you running?

V2023.9.3-alpha-4

Diagnostics file

Additional information

Transferred from Community as requested.

GiorgioUghini commented 7 months ago

Do you see this behavior only when you "update zones then calculate all zones", or also if you leave it fully automatic with automatic calculations at 23:30?

If you see this behavior after calculating all zones manually, this is surely related to my issue: https://github.com/jeroenterheerdt/HAsmartirrigation/issues/289

Dave-Bryant commented 7 months ago

Giorgio, the "update zones then calculate all zones" was done at 1400 hrs i.e. 14 hours of weather data since the automatic reset. The bucket or ET is a cumulative number. I could have waited to 23.30 for the automatic calculation but the ET number was already too large. I dont think it is related to your issue.

jeroenterheerdt commented 7 months ago

@Dave-Bryant how often do you calculate per day?

Dave-Bryant commented 7 months ago

I have the auto calculation happening at 23.00. Here is the panel. Screenshot 2023-10-09 110229

jeroenterheerdt commented 7 months ago

thanks, so it looks like the ET value was -3.7 so that does not seem to very much out of line with the ET value of 4.3 that you reported, right? So your bucket was updated with -3.7, since it was already set to -4.3, the total bucket was set to -8.0. Note that that is not the value for that one day, but rather over two days. I think those ET values (4.3, 3.7) are very much in line with what the weather service reported so I don't think there is a problem here. If you want to have your bucket represent the daily value you should (like in V1) reset the buckets. Are you doing that? If you don't then the bucket will update with every new ET value.

Dave-Bryant commented 7 months ago

Jeroen, you are correct. My reset isnt working. I use the following code but it is not working or giving an error. Any thoughts? self.call_service("smart_irrigation/reset_bucket", entityid = "sensor.smart_irrigation_lawns") Do you use a different namespace or domain in V2?

gatonero commented 7 months ago

The scheme is sensor.smartirrigation[zone-name]. Have a look for your sensors name under settings -> devices -> entities.

Dave-Bryant commented 7 months ago

Yes the entityid is correct i.e. sensor.smart_irrigation_lawns

jeroenterheerdt commented 7 months ago

Jeroen, you are correct. My reset isnt working. I use the following code but it is not working or giving an error. Any thoughts? self.call_service("smart_irrigation/reset_bucket", entityid = "sensor.smart_irrigation_lawns") Do you use a different namespace or domain in V2?

smart_irrigation.reset_bucket, not sure where the / came from?

Dave-Bryant commented 7 months ago

When I make this change the Appdaemon compile shows an error of 'ValueError: Invalid Service Name: smart_irrigation.reset_bucket'

I read on the Community board that 'the “/” is just the syntax for the appdaemon method that calls the home assistant service. The appdaemon call_service method “translates” the “/” to a “.” https://community.home-assistant.io/t/struggling-to-get-call-service-working-again/222931/2

jeroenterheerdt commented 7 months ago

OK, let's troubleshoot this. Try to execute the service using the built in dev tools. If that works without failure, then the issue is not with this integration

Dave-Bryant commented 7 months ago

Jeroen, The service with the dev tools works fine. The problem is with me, not your integration. Thx for your help. Pls close the issue.

jeroenterheerdt commented 7 months ago

I am sorry I cannot be of more help. Hope you get it resolved!