Skip to content
This repository has been archived by the owner on Nov 15, 2022. It is now read-only.

How do I choose my own NTP server? #1

Closed
tulpenwase opened this issue Jan 23, 2021 · 6 comments
Closed

How do I choose my own NTP server? #1

tulpenwase opened this issue Jan 23, 2021 · 6 comments

Comments

@tulpenwase
Copy link

Hallo mcer12,
first of all I must say the clock is the madness! Great work.
Now to my question, I would like to use my own NTP server in my network. All my devices on the network are already synchronized through it. Currently running on my router. Is possible if so how do you do that exactly?

I have found in the IN12_DIRECT_NEW.ino the entry for the NTP server const char* ntpServerName there I would deposit the IP or NTP address of my router. So far so good. In the wiki you write that Arduino binary are supported. But how do I create a new firmeware that I can upload?

Or if I could wish something would be in an upcoming update a selection menu in the web interface very helpful.

@mcer12
Copy link
Owner

mcer12 commented Jan 24, 2021 via email

@tulpenwase
Copy link
Author

Thank you very much for the answer. Unfortunately my router does not have this redirect function. So I have to either set up a new NTP server, for example on a Raspberry Pi, which can do this or I replace the sketch...i have no idea how difficult it will be.
In case I decide to use the new sketch I would be interested to understand how to do this exactly.
I edit the IN12_DIRECT_NEW.ino and export it as binary IN12_DIRECT_NEW.hex. The *.hex and only this one file I then upload under IP_ADRESS/update with Update Firmware? Then reboot and cross my fingers.
Oh, and is there anything to note about the libraries you used for the sketch? So certain versions or from whom it was offered. I had several problems in the past because I used the wrong one.

I see forward

@mcer12
Copy link
Owner

mcer12 commented Jan 24, 2021

No, in arduino IDE you can open tab Project / Export compiled binary. This will compile the project and save it as .bin file in the project directory. You still have to (!!!) set the ESP options to 1MB flash + 64KB FS, 160mhz frequency. If you forget to change the flash size, it will probably brick the clock. Sadly, I don't know what versions of libraries are used there as it's been a while since I flashed it. Hopefully downloading the latest versions will work fine.

I think it would be for the best if I just add the option in firmware and you just download the binary from github and upload it :) I will try to get to it at the start of the week.

@tulpenwase
Copy link
Author

Good evening, I'm glad you took the trouble to add the option. Thank you very much.

@mcer12
Copy link
Owner

mcer12 commented Jan 31, 2021

I've added the option and fixed a bug in daylight saving. I tested it on my clock and it works OK so fingers crossed :D It accepts server address or IP. You can use the binary in sketch directory.

@tulpenwase
Copy link
Author

Good evening,

I uploaded the binary today and it works beautifully. Immediately, after changing the NTP address detected my router and displayed the correct time. Thank you very much for the effort.

I hereby close the ticket.

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

No branches or pull requests

2 participants