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

[Feature request] - Add a daily minimal usage delay #70

Closed
jmcollin78 opened this issue Nov 10, 2024 · 12 comments
Closed

[Feature request] - Add a daily minimal usage delay #70

jmcollin78 opened this issue Nov 10, 2024 · 12 comments
Labels
developed The issue is developed and is waiting for release enhancement New feature or request P1 Priority

Comments

@jmcollin78
Copy link
Owner

When the production is not enough some devices are not turned on during the day.
But for some device, a minimal daily usage necessary (think pool pump, deshumidifier, battery charging, ...).

So it could be a great feature, to specify a minimal usage duration per day and Solar Optimizer should start it in offpeak hour when the minimal duration is not reach.

Of course the availability and enable state should be checked before starting those devices.

So we need:
2. for each device, an min_on_time_per_day_min. Example: 120
3. an offpeak time at which the device will be started if min_on_time_per_day_min is not satisfied. Example: '22:00'

With the example configuration, the device should have been started during 120 min each day. If it has run for only 20 min during solar production, then it will be started 100 min after 22:00.

This will mandatory stops at midnight. We cannot authorize to start between 0:00 and the sun rising time, else all devices will always be started during this period. This is a limitation.

@jmcollin78 jmcollin78 added enhancement New feature or request P1 Priority labels Nov 10, 2024
@Superdada44
Copy link

I'm very interested for the water heater !
+1 :-)

@jmcollin78
Copy link
Owner Author

I will have a beta this day. Are you interested to test the beta release with me ?

@Superdada44
Copy link

Yes, I will be happy to test with you

@jmcollin78 jmcollin78 added the developed The issue is developed and is waiting for release label Nov 11, 2024
@jmcollin78
Copy link
Owner Author

https://github.com/jmcollin78/solar_optimizer/releases/tag/2.1.0.beta1

I will install it and parametrize some devices for this night. Keep me in touch.

@jmcollin78
Copy link
Owner Author

jmcollin78 commented Nov 12, 2024

My first report:

  1. staring at off-peak declared in the device seems to work fine,

  2. the reset time at 05:00 don't work. My devices, have been reset at 00:00 which was the value before this enhancement. I will have a look why. Because, I don't change the default value I suspect it is not taken into account.

  3. -> i just forgot to edit the Integration and validate the change. There is a mess with the default value: it is displayed as 05:00 but if you don't validate the config panel, then it is not written.

@jmcollin78
Copy link
Owner Author

@Superdada44
Copy link

I've installed the beta3 during the day. Tonight, the water heater started again at the offpeak hour, event he allready had enought runtime (5h).
I probably made something wrong, here is my conf. Is value "max_on_time_per_day_min" mandatory ?

  • name: "Boiler_ECS"
    entity_id: "switch.smartrelay1"
    power_max: 2200
    check_usable_template: "input_boolean.enable_solar_optimizer_boiler_ecs"
    duration_min: 20
    duration_stop_min: 5
    action_mode: "service_call"
    activation_service: "switch/turn_on"
    deactivation_service: "switch/turn_off"
    battery_soc_threshold: 0
    min_on_time_per_day_min: 120
    offpeak_time: "22:15"

Here is the log
image

@jmcollin78
Copy link
Owner Author

probably made something wrong, here is my conf. Is value "max_on_time_per_day_min" mandatory ?

No but if you don't set the max_on_time_per_day_min it will run all along the off-peaks hours.
In my case, except the electric car loading which can continue all the night if necessary, I always set a max_on_time_per_day_min. I should probable precise this in the documentation.

jmcollin78 added a commit that referenced this issue Nov 13, 2024
@jmcollin78
Copy link
Owner Author

@Superdada44
Copy link

Superdada44 commented Nov 13, 2024

probably made something wrong, here is my conf. Is value "max_on_time_per_day_min" mandatory ?

No but if you don't set the max_on_time_per_day_min it will run all along the off-peaks hours. In my case, except the electric car loading which can continue all the night if necessary, I always set a max_on_time_per_day_min. I should probable precise this in the documentation.

Ok thanks ! But I think it would be better if it switch off when the "min_on_time_per_day_min" is reached. So it will keep the water heater on as long as he have enought solar power. And will guarantee to reach the min at the offpeak hours, not more.
I think that the max_on_time_per_day_min is not very usfull for a water heater, he as more sens for a pump or a air-dryer.

It would probably be intersting to have both: If max_on_time_per_day_min is not set, solar optimizer only reach the min_on_time_per_day_min. If both are set, he also run until he reach the max_on_time_per_day_min.

Thanks for the great job !

@jmcollin78
Copy link
Owner Author

I will let as is for the moment and see what are the reaction. I ask myself if I should take the min or max to stop in off-peak.
If I look at my look cases, it is always better to activate for the max until the check_enable will turn to False.
Maybe it is not clear in the documentation, but there is 3 possibilities to stop in off-peak:

  1. the max is exceeded,
  2. the raz time (05:00) is exceeded,
  3. the check_usable returns False.

With this 3 mecanisms , I think we have all what is necessary. But let's wait for usage.

Anyway, thank you for your helpand report.

@Superdada44
Copy link

I'm not sure it's working correctly, yesterday my water heater started at the off-peak hour even if the "min_on_time_per_day_min" was reached. As I understand the doc, if the min value is reached he won't start at the off-peak hour, is that right ?

At 22:15 the "min_on_time_per_day_min" was about 7h.

My conf:

  • name: "Boiler_ECS"
    entity_id: "switch.smartrelay1"
    power_max: 2200
    check_usable_template: "input_boolean.enable_solar_optimizer_boiler_ecs"
    duration_min: 20
    duration_stop_min: 5
    action_mode: "service_call"
    activation_service: "switch/turn_on"
    deactivation_service: "switch/turn_off"
    battery_soc_threshold: 0
    max_on_time_per_day_min: 960
    min_on_time_per_day_min: 60
    offpeak_time: "22:15"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developed The issue is developed and is waiting for release enhancement New feature or request P1 Priority
Projects
None yet
Development

No branches or pull requests

2 participants