-
Notifications
You must be signed in to change notification settings - Fork 70
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
set ntp publish interval #47
Comments
This is quite a specific request. This could be done in the code, but in order to keep that somewhat generic, I would suggest to use a script with two timers and two alarms. |
Thank you very much for your answer. |
As it might be soewhat tricky, here is a script that does the job:
|
I worried about this the local time will be published every 10 minute the local time will be published every 60 minute Thank you. |
Not what you requested for? Do you want an event exactly 10 min after sync? |
Your script works perfectly.
But I have more questions. Q1) Q2)
Japan will be the New Year holiday now. |
Q1: That't correct, the script and the WiFi-Settings are stored independently from the code. Clear flash (or write any file to 0x00000 - at least 64 KB). This will reset the settings as well. Q2: Don't know yet... Happy New Year! |
Thank you for useful Firmware.
After NTP sync has been completed successfully once,
the local time will be published every second under the topic "$SYS/broker/time" in the format "hh:mm:ss".
I want to set publish interval.
set ntp_local_interval1 600
set ntp_local_interval2 3600
set ntp_local_interval3 12:00:00
set ntp_local_interval4 0:00:00
the local time will be published every 10 minute under the topic "$SYS/broker/time1" in the format "hh:mm:ss".
the local time will be published every 60 minute under the topic "$SYS/broker/time2" in the format "hh:mm:ss".
the local time will be published at 12:00:00 under the topic "$SYS/broker/time3" in the format "hh:mm:ss".
the local time will be published at 00:00:00 under the topic "$SYS/broker/time4" in the format "hh:mm:ss".
The text was updated successfully, but these errors were encountered: