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

[Bug] weird spikes in bucket - collecting feedback. #35

Closed
jeroenterheerdt opened this issue Jun 11, 2020 · 10 comments
Closed

[Bug] weird spikes in bucket - collecting feedback. #35

jeroenterheerdt opened this issue Jun 11, 2020 · 10 comments
Assignees
Labels
bug Something isn't working help wanted Extra attention is needed

Comments

@jeroenterheerdt
Copy link
Owner

Describe the bug
We have seen situations where suddenly the daily adjusted run time bucket is jumping up for no good reason. Please let us know if you see this as well and under what circumstances.

@jeroenterheerdt jeroenterheerdt added the bug Something isn't working label Jun 11, 2020
@jeroenterheerdt jeroenterheerdt self-assigned this Jun 11, 2020
@Justahobby01
Copy link

Yes, since I installed the integration, about two weeks ago, I have noticed it. I have been trying to figure out if it is occurring after I restart HA.

@jeroenterheerdt
Copy link
Owner Author

it is occurring at restarts, but I cannot figure out why. I must be missing something. Next step is to add rigorous logging everywhere and see what is going on.

@Justahobby01
Copy link

I assumed it was my settings since I just took a guess at the flow rate and sq ft of my yard, but I set everything up correctly last night and saw the spike again today. I can add a debug to my logger and see if anything pops up.

jeroenterheerdt added a commit that referenced this issue Jun 16, 2020
…orted is used to calculate the bucket_delta - this assumes you use a cumulative daily sensor, which seems to be the most common case. Also adding lots and lots of logging to try to hunt down #35. Please provide your logs to help fix that bug.
@jeroenterheerdt
Copy link
Owner Author

added lots of logging in v0.0.45. please have a look at the logs

@Justahobby01
Copy link

I rebooted the host and restarted HA about ten times yesterday but didn't see a spike while the bucket was empty. Today, the bucket was at 108 seconds but spiked to 2692 sec after a restart. Debug is below:

irrigation debug.txt

@jeroenterheerdt
Copy link
Owner Author

jeroenterheerdt commented Jun 17, 2020

thanks for sharing this @Justahobby01 - the values you refer to are for adjusted run time, not for the bucket, but I was able to find them. The part where the problem occurs is this:

2020-06-17 12:21:28 INFO (MainThread) [custom_components.smart_irrigation.sensor] async_added_t_hass type: Daily Adjusted Run Time state: 108, attributes: {'adjusted_run_time_minutes': 1.8, 'bucket': '-0.17', 'force_mode_duration': 0, 'force_mode_enabled': False, 'friendly_name': 'Daily Adjusted Run Time', 'icon': 'mdi:sprinkler', 'lead_time': 0, 'maximum_duration': -1, 'unit_of_measurement': 's', 'water_budget': 91.57}
2020-06-17 12:21:28 INFO (MainThread) [custom_components.smart_irrigation.sensor] async_added_to_hass restoring state, settting bucket to: -109.67719298065954

The bucket is erroneously set to -109.67... but as you can see the bucket value discovered to restore is -0.17, which seems much more normal. As a result is bucket = -109 your water budget and daily adjusted run time go sky-high.
I will see if I can understand how this bucket value of -109 came up.

jeroenterheerdt added a commit that referenced this issue Jun 17, 2020
…ast one bug that potentially might have caused the spikes as tracked in #35. Please continue to help us fix this bug by providing your logs!
@jeroenterheerdt
Copy link
Owner Author

jeroenterheerdt commented Jun 17, 2020

I have found a bug! not sure if we have now solved the problem, but at least it looks better on my side now. Please continue monitoring it @Justahobby01, you're a big help! I appreciate it! Oh and by the way, are you running in metric or imperial system?
Also, I noticed you use smartweather as well, correct?

jeroenterheerdt added a commit that referenced this issue Jun 17, 2020
@Justahobby01
Copy link

Awesome! I'm honored to be of assistance. What was the bug, if you don't mind me asking?

I am using imperial and use smartweather for everything except minimum and maximum temps since I didn't see where smartweather provided that info.

@Justahobby01
Copy link

I changed the refresh time to get new values and then restarted HA.......and the values stayed the same. Looks promising!

@jeroenterheerdt
Copy link
Owner Author

jeroenterheerdt commented Jun 17, 2020

ok, so we're in the same boat, I am on imperial as well as using smart weather where I can (but OWM for min and max temps). Figured I could always create a min and max temperature sensor in HA some time. Not for now though :).

The bug was that in some cases I converted twice from metric (this is what the system uses internally) to imperial. Not sure that is fully responsible for the weird behavior, but it was a bug no doubt.
Fingers crossed it works correctly now, keep me posted. Also, note that in v0.0.48 I added the set_bucket service which allows you to set the bucket to a specific value instead of just setting it to 0 with reset_bucket.

@jeroenterheerdt jeroenterheerdt added the help wanted Extra attention is needed label Jun 17, 2020
JeeDeWee pushed a commit to JeeDeWee/HAsmartirrigation that referenced this issue Jun 6, 2023
…orted is used to calculate the bucket_delta - this assumes you use a cumulative daily sensor, which seems to be the most common case. Also adding lots and lots of logging to try to hunt down jeroenterheerdt#35. Please provide your logs to help fix that bug.
JeeDeWee pushed a commit to JeeDeWee/HAsmartirrigation that referenced this issue Jun 6, 2023
…ast one bug that potentially might have caused the spikes as tracked in jeroenterheerdt#35. Please continue to help us fix this bug by providing your logs!
JeeDeWee pushed a commit to JeeDeWee/HAsmartirrigation that referenced this issue Jun 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants