Skip to content

Allow using 3 different NTP servers and NTP over DHCP #101

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

Merged
merged 2 commits into from
Jun 28, 2024

Conversation

vortigont
Copy link

This is a really old configuration that is still used by default and allows specifying only one NTP server.
Any change this could be changed to use 3 by default?

@Jason2866
Copy link
Owner

Jason2866 commented Jun 28, 2024

The settings are done to save resources. We don't need more in Tasmota. If there are a good reasons to change, it will be changed. "Just" because the settings upstream are different is NO reason ;-)
NTP over DHCP will not be enabled, since it is disabled in Tasmota. Many consumer routers can't do or doing it wrong. We have been there...

@vortigont
Copy link
Author

it will make me happy :))))
Actually resources there is only 4 bytes per server. Not sure how do you, guys, deal with only one server in Tasmota in case it becomes unreachable? Have additional code to track and switch it? It will use even more resources then 8 bytes for spare servers.
NTP over DHCP is just an option, it is disabled by default and won't interfere, you have to enable it explicitly in user code to accept opt 42.

@Jason2866
Copy link
Owner

Jason2866 commented Jun 28, 2024

Actually resources there is only 4 bytes per server. Not sure how do you, guys, deal with only one server in Tasmota in case it becomes unreachable? Have additional code to track and switch it? It will use even more resources then 8 bytes for spare servers.

Own code even with more NTP servers from "core", the NTP server handling is not good enough for Tasmota needs. Anyways we could waste this few bytes to make you happy ;-)

NTP over DHCP is just an option, it is disabled by default and won't interfere, you have to enable it explicitly in user code to accept opt 42.

True but enabling and not using needs flash space :-(

I invested many hours to save resources as much as possible. Fighting for every byte more free. I am sure you understand that I will not sacrifice this win.

@Jason2866 Jason2866 merged commit 5704442 into Jason2866:v5.1_Arduino Jun 28, 2024
@vortigont
Copy link
Author

Deal! :) I can live without opt 42, not a big waste.
BTW, do you backport anything to previous versions of Arduino core, i.e. 2.0.x? Or it's all long gone? :)
Would be nice to have HTTPClient lib without SSL that I pushed to upstream recently but for older core also. Still using it. Now I have to drag this patched lib into projects as a side component.
Just asking.
You've done a really good work making this core as light as possible. Impressive!

@Jason2866
Copy link
Owner

Jason2866 commented Jun 28, 2024

Core 2.x should possible to compile. All changes from espressif upstream branch release/v2.x are merged (soon) in Tasmota version.
BUT I do no Backport work for core 2.0.x. If you provide your HTTPClient lib without SSL as PR against Core 2.0.x here https://github.com/tasmota/arduino-esp32/tree/release/v2.x
I will merge and build a framework. Just wait until I have updated with the commits from today...

@vortigont
Copy link
Author

That will be great! I'll come up with PR a bit later.
Thanks for all your efforts!

@Jason2866
Copy link
Owner

Btw. the last Tasmota core 2.0.17 has the TLS part stripped too in http client
You can use with

platform = https://github.com/tasmota/platform-espressif32/releases/download/2024.05.00/platform-espressif32.zip

@Jason2866
Copy link
Owner

@vortigont Tasmota core 2.0.18

platform = https://github.com/Jason2866/platform-espressif32/releases/download/2024.06.00/platform-espressif32.zip

@vortigont
Copy link
Author

Awesome, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants