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

duration parameter is buggy. #13

Closed
seniskenis opened this issue Jan 31, 2023 · 6 comments
Closed

duration parameter is buggy. #13

seniskenis opened this issue Jan 31, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@seniskenis
Copy link

seniskenis commented Jan 31, 2023

In documentation: "duration can be in the range of 1 to 5 and specifies how large window of consecutive hours to slide forward in search for a minimum average price."

in my case I don't need hours to be consecutive, it can be 02:00, 04:00, 05:00... etc.
so "duration = 1" would be good for me, but when is set to one, the sensor is always ON.

in case:
image
and duration set to 2 sensor starts at 02:00, but the good price is also at 00:00 so one hour remains unused.

can "duration = 1" bug be fixed or I'm doing something wrong, because it always on for me.

edit: after midnight strategy changed and with "duration=2" all consecutive hours from 00:00 to 07:00 were used, so this time it worked ok. but another problem happened in post bellow.

@seniskenis
Copy link
Author

And totally wrong behavior on this set of data:
duration: 2
moving:
search_length: 24
image
image

@dala318
Copy link
Owner

dala318 commented Feb 8, 2023

Thanks for sharing, I have not been able to test this very much since it requires you to debug during specific hours of the day unless running it in a simulated environment which I have not found time to create.
As for my own use I'm not using this very much at the moment as boiler-room is under renovation and no wifi access to heat-pump at the moment, hence I have not been checking the result very much lately.

For the but I could imagine it could miss to check current_hour, hence duration=1 would give only one possible slot. Could also be related to #12 where it's off-by-one.

Cannot make any promises to investigate this now as I'm busy with the renovation but will keep in mind as soon as done.

@dala318 dala318 added the bug Something isn't working label Feb 8, 2023
@dala318 dala318 mentioned this issue Mar 9, 2023
@dala318
Copy link
Owner

dala318 commented Mar 9, 2023

Please check if release 0.2.3 fixes the issue with duration = 1

@CommanderROR9
Copy link

This appears to still be an issue even today...

@dala318
Copy link
Owner

dala318 commented Jan 19, 2024

From the last plot above I would say the following:
00:00-01:00 On -> Correct as the average price 00:00-02:00 likely the lowest
01:00-05:00 Off -> Correct as the average 05:00-07:00 lowest ahead
05:00-08:00 On -> Correct as price is continuously increasing and hence no cheaper average can be found in the future (the moving window does not look in the past)
08:00-09:00 On -> Questionable as visually I would say the average 22:00-24:00 look to be lower

@dala318
Copy link
Owner

dala318 commented Sep 25, 2024

With release of version 2 #45 I'm closing this as the code is completely rewritten. But feel free to reopen or create new issue if similar problem is still seen.

@dala318 dala318 closed this as completed Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants