Conversation
Co-authored-by: stritti <184547+stritti@users.noreply.github.com>
Co-authored-by: stritti <184547+stritti@users.noreply.github.com>
Co-authored-by: stritti <184547+stritti@users.noreply.github.com>
Co-authored-by: stritti <184547+stritti@users.noreply.github.com>
Yes, the NTP server setting is persistent across reboots. |
There was a problem hiding this comment.
Pull request overview
This PR makes the NTP server configurable through Homie settings instead of using a hardcoded value. The change allows users to specify their preferred NTP server (defaulting to pool.ntp.org), improving flexibility for deployments in different geographic regions.
Changes:
- Added a new HomieSetting for NTP server configuration with validation
- Updated TimeClientHelper to accept NTP server as a parameter instead of using a hardcoded constant
- Updated documentation to reflect the new configurable feature
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/main.cpp | Added HomieSetting for NTP server with validation and initialization in setupHandler |
| src/TimeClientHelper.hpp | Updated function signature to accept NTP server parameter |
| src/TimeClientHelper.cpp | Removed hardcoded NTP server constant and updated initialization to use configured value |
| README.md | Updated feature list to reflect configurable NTP server |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
stritti
left a comment
There was a problem hiding this comment.
Löse bitte die merge-Konflikte
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 4 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: stritti <184547+stritti@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… server Co-authored-by: stritti <184547+stritti@users.noreply.github.com>
Fixed in commit 9615fa1. The NTPClient library v3.1.0 doesn't have a |
|
@copilot Da wir ja nun auch Homeassistant supporten. Kann auch über Homeassistant der NTP-Server geändert werden? |
Ja, die NTP-Server-Einstellung ist über Home Assistant änderbar. Alle |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 7 out of 7 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: stritti <184547+stritti@users.noreply.github.com>
Configurable NTP Server Implementation
NTP Server Configuration
Replaces hardcoded
europe.pool.ntp.orgwith a configurable Homie setting. Users can now set regional NTP pools (asia, europe, north-america, oceania, south-america) or custom servers via MQTT.Implementation:
ntpServerSetting_toPoolControllerContextwith default value"pool.ntp.org"NTPClientfrom static object to pointer, dynamically allocated intimeClientSetup()setPoolServerName()methodsetupHandler()using the configured setting valueUsage: Users configure via Homie MQTT:
homie/<device-id>/ntp-server/set → "europe.pool.ntp.org"Home Assistant Integration: The NTP server setting is automatically available in Home Assistant through the Homie MQTT integration as an
ntp-serverentity.The setting is persistent across reboots through Homie's flash storage.
Library Dependency Fixes
ESPAsyncWebServer Configuration: Fixed multiple build issues related to library conflicts:
https://github.com/me-no-dev/ESPAsyncWebServer.gitfor proper library resolutionlib_ldf_mode = chain+andlib_ignore = ESP Async WebServerto prevent duplicate library conflicts from transitive dependenciesRule Class Fixes
Issue: The
Rulebase class declared virtual methodsgetMode()andloop()without implementations, causing linker error:undefined reference to '_ZTV4Rule'. Additionally, it was missing a virtual destructor needed for safe polymorphic deletion.Solution:
= 0) to properly defineRuleas an abstract base classvirtual ~Rule() = default) to ensure derived class destructors are called correctly when deleted through base pointerRuleAuto,RuleManu,RuleBoost,RuleTimer) already override these methods, so no other changes were neededThis fixes a pre-existing build issue and potential undefined behavior in the main-v3 base branch.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.