dewenni / ESP_Buderus_KM271

Control your Buderus Logamatic 2107 or HS-2105 with MQTT or Home Assistant
MIT License
54 stars 10 forks source link

feature-request: set Logamatic time with NTP automatically after power loss #87

Closed mutex1980 closed 1 month ago

mutex1980 commented 2 months ago

Would it be possible to have an option to automatically set the time and weekday from NTP after the Logamatic had a power loss? Potentially some automatic NTP sync if the difference between the Logamatic time and the NTP time shows significant difference?

As far as I understood, this can be only done manually in the web UI currently?

As an alternative

Thanks, Mirko

dewenni commented 2 months ago

Unfortunately it is not possible to read the actual time from the Logamatic. At least I don´t know how to read it. The only way is to set/write date and time from the ESP to the Logamatic. I have already implemented, that the Time will be set when the "daylight saving time" has changed.

It is also possible to set the date and time on the logamatic with an mqtt command. In that case the actual ntp time is used and will be set to the logamatic.

mqtt  topic:  ../setvalue/setdatetime
payload: none

So you could do this by your own, but you should wait some seconds or better some minutes after restart before you trigger the command, because it took some time to get the ntp time from the ntp Server after restart.

dewenni commented 2 months ago

but I can also think about an additional option, that date and time will be set automatically after restart. This could be an option in the "date and time" settings.

mutex1980 commented 2 months ago

but I can also think about an additional option, that date and time will be set automatically after restart. This could be an option in the "date and time" settings.

Yes, this would be a solution as the ESP itself is supplied by Logamatic power. Thanks for your work Sven.

Actually this is my primary use case for making the Logamatic smart at all. I often realize only after days it again lost time synchronization after power loss and the water is not hot enough during day time.

dewenni commented 2 months ago

will be implemented within next release

dewenni commented 2 months ago

@mutex1980 implemented in v4.0.4 please test and give Feedback

mutex1980 commented 3 days ago

Sorry for the late reply - I tested today with 4.1.0 and it works. Thanks for implementing.

Maybe one note: the web ui seems to always forget the setting of the checkbox for this feature (shows it to be inactive after restart) although it is working and present in the json file.