# Use custom NTP server on the WiFi relay

**URL:** <https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097>\
**Category:** WiFi Relay\
**Created:** [4 October 2019 18:20 UTC](https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097 "2019-10-04T18:20:04Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![Martin\_Harizanov](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/martin_harizanov/32/11408_2.png) [@Martin\_Harizanov](https://community.openenergymonitor.org/u/Martin_Harizanov)\
**Post date:** [14 October 2019 18:32 UTC](https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097/21 "2019-10-14T18:32:26Z")

</div>

Try this version, has the password field extended to 64 chars.  
You need to erase the whole flash before flashing this new version (use the first esptool sequence in my first post)

[v3361.oem.bin](https://community.openenergymonitor.org/uploads/short-url/mKoYJTakbWWajZ9NtwSBacNHM7Q.bin) (389.6 KB)

---

<div class="post-metadata">

**Author:** ![Robi](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Robi](https://community.openenergymonitor.org/u/Robi)\
**Post date:** [14 October 2019 18:32 UTC](https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097/22 "2019-10-14T18:32:53Z")

</div>

OK, trying just now, hold on

---

<div class="post-metadata">

**Author:** ![Robi](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Robi](https://community.openenergymonitor.org/u/Robi)\
**Post date:** [14 October 2019 18:47 UTC](https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097/23 "2019-10-14T18:47:01Z")

</div>

Works perfect, thank you!  
Using my 63-character long WPA2 key.  
And using my internal IP address of the NTP server, time syncs well.

May I suggest to update the [WiFi MQTT Control Relay Thermostat - Guide | OpenEnergyMonitor](https://guide.openenergymonitor.org/integrations/mqtt-relay/) with the new firmware and especially the programming section with the correct command to erase & update the board.

---

<div class="post-metadata">

**Author:** ![Robi](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Robi](https://community.openenergymonitor.org/u/Robi)\
**Post date:** [14 October 2019 18:53 UTC](https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097/24 "2019-10-14T18:53:51Z")

</div>

I just read your findings on NTP in your article you linked above, I totally agree. You have this sentence in your article:

> Rather, I’d dedicate that function to a gateway, which can act as a time master.

That’s exactly what I’m doing in my installations. I always deploy a local NTP server for the multitude of the devices in a local site. It’s by far safer, and more environment-friendly.  
This is why I needed a way to enter my local NTP server in your excellent thermostat.

---

<div class="post-metadata">

**Author:** ![glyn.hudson](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/glyn.hudson/32/35003_2.png) [@glyn.hudson](https://community.openenergymonitor.org/u/glyn.hudson)\
**Post date:** [16 October 2019 19:09 UTC](https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097/25 "2019-10-16T19:09:58Z")

</div>

Great to hear.

I’ve updated the WiFi relay repo with the new FW and change log:

> **[mqtt-wifi-mqtt-single-channel-relay/firmware at master ·...](https://github.com/openenergymonitor/mqtt-wifi-mqtt-single-channel-relay/tree/master/firmware)**
>
> master/firmware

I will update the user guide FW section to point to the readme in the firmware section of the repo.

---

<div class="post-metadata">

**Author:** ![Robi](https://community.openenergymonitor.org/letter_avatar_proxy/v4/letter/r/958977/32.png) [@Robi](https://community.openenergymonitor.org/u/Robi)\
**Post date:** [19 October 2019 10:27 UTC](https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097/26 "2019-10-19T10:27:39Z")

</div>

Thank you.

I’d also suggest in the guide to change the date (from 2017) or remove it, and there are outdated flashing instructions at the end of the guide, which don’t work anymore (not even for the previous firmware release) they should be deleted to avoid confusion and bricking of the unit.

---

<div class="post-metadata">

**Author:** ![Josunamo](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/josunamo/32/16135_2.png) [@Josunamo](https://community.openenergymonitor.org/u/Josunamo)\
**Post date:** [3 December 2020 23:11 UTC](https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097/27 "2020-12-03T23:11:23Z")

</div>

Hi.  
I am trying to load firmware oem.v3361.bin on a wemos D1 mini but it doesn’t work.  
I think the problem is the memory address indicated in the flashing command 0x001000.  
esptool.py --port COM5 --baud 230400 write\_flash --flash\_freq 80m --flash\_mode dio  
–flash\_size detect 0x1000 oem.v3361.bin  
Any suggestions?  
Thank you

---

<div class="post-metadata">

**Author:** ![Josunamo](https://community.openenergymonitor.org/user_avatar/community.openenergymonitor.org/josunamo/32/16135_2.png) [@Josunamo](https://community.openenergymonitor.org/u/Josunamo)\
**Post date:** [4 December 2020 01:06 UTC](https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097/28 "2020-12-04T01:06:46Z")

</div>

Solved.  
For wemos D1 mini the flashing command is:  
esptool.py --port COM5 --baud 115200 write\_flash --flash\_freq 80m --flash\_mode  
qio --flash\_size detect 0x0000 boot\_v1.7.bin 0x1000 oem.v3361.bin 0x3FC000 esp\_init\_data\_default.bin 0x3FE000 blank.bin

[Previous page](https://community.openenergymonitor.org/t/use-custom-ntp-server-on-the-wifi-relay/12097.md?page=1)
