Date & Time wrong / NTP not working

432 views
Skip to first unread message

Karl

unread,
Mar 8, 2021, 1:08:59 AM3/8/21
to TasmotaUsers
I'm having NTP trouble with a specific device and am wondering if it's possible there's somehow a bug with NTP in devices of this model, or if I've overlooked something else.

The device in question is the Amysen YX-WS01 Plug.

Of note, all other tasmota devices on the network are getting date & time fine via NTP so it doesn't seem like there's any generic firewall rules that should be universally breaking NTP.  

I also checked and the problematic device has identical default gateway, DNS & NTP settings as working devices so it doesn't seem like it should be a device config issue. (I'm open to triple-checking if someone thinks something might have been overlooked.) 

Additionally, I tried setting up a second identical model device and that device ALSO exhibited the exact same behavior! So even though all the other Tasmota devices on the network are working fine, both of the Amysen YX-WS01 Plugs I have tried exhibit the exact same problematic behavior! 

To really throw a monkey wrench into the diagnosis though, I did try connecting one of the problematic devices to a different wireless network and on that network the device managed to get the date & time successfully!? This sent me back to the original network to triple-check the router firewall rules but there's nothing in there that should prevent NTP from working. And again, ALL other Tasmota devices on that network seem to be working fine! So I double-checked the problematic device config and as mentioned previously, it's default gateway, DNS & NTP server settings all appear correct & match the working devices...

I'm out of ideas! Is it possible NTP is somehow broken for the  Amysen YX-WS01 Plug on some networks but not others? Since I believe I've ruled out network problems (triple-checked firewall config & manually assigned problematic devices different IPs) and tried to rule out a device config issue (tried 2 different devices of the same model & verified device's default gateway, DNS & NTP server settings all match working devices.) I really don't know what else to check. Feel like I'm banging my head against a wall.

I've also tried 2 different firmware versions: 8.5 & 9.3.1. Any other ideas welcome.

Thanks.

Philip Knowles

unread,
Mar 8, 2021, 1:32:41 AM3/8/21
to TasmotaUsers, Karl
What is your NTPServer1 setting and Timezone (plus TimeDST and TimeSTD).
Regards

Phil K


From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Karl <ka...@kbrownconsulting.com>
Sent: Monday, March 8, 2021 6:08:59 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Date & Time wrong / NTP not working
 
--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/462700d7-73dd-42f9-9ae6-c412545bfa05n%40googlegroups.com.

Karl

unread,
Mar 8, 2021, 2:16:59 AM3/8/21
to TasmotaUsers
ntpserver1 = stat/sonoff/RESULT = {"NtpServer1":"pool.ntp.org"}

But I've also tried setting ntpserver1 to a bunch of other NTP servers with no improvement.

timezone = stat/sonoff/RESULT = {"Timezone":"-10:00"}

I don't use TimeDST and TimeSTD as the time never changes where I live. 

Philip Knowles

unread,
Mar 8, 2021, 2:46:11 AM3/8/21
to TasmotaUsers, Karl
Try setting ntpserver1 to your router ip and timezone to 0.

Not saying will work but interested to what the result is.

Regards

Phil K


Sent: Monday, March 8, 2021 7:16:59 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Date & Time wrong / NTP not working
 

Karl

unread,
Mar 8, 2021, 8:03:25 AM3/8/21
to TasmotaUsers
First, thanks for taking the time to respond Phil.

Good news is I got it working! In the end the problem was DNS/firewall related. 

Your suggestion of trying to set ntpserver1 to the IP of my router didn't work but it made me realize I had only tested NTP servers by host name so I tried a public NTP server by IP address and low & behold it worked! That sent me to digging into DNS & in the end I found the problem related to firewall rules related to DNS.  How all the other devices were working is still a little bit of a mystery since they all use the same DNS server & the misconfiguration should have broken DNS for ALL my tasmota devices!? (But my best guess is that since the problematic device was the last device added to the network, maybe the DNS configuration problem was made after all the other devices were connected to the network and since the working devices have all been online without being rebooted in months maybe they were able to successfully resolve the NTP server hostname & lookup the time back before the bad DNS config change was made & they have simply maintained their clock from when they were first booted & things were working? That's the only thing that could explain the "different" behavior that I can think of!)

So new troubleshooting lesson learned: When troubleshooting mysterious problems that affect some devices & not others even though their configuration is identical, try rebooting the "working" device & see if it develops the problem as well! (I must have rebooted the problematic device dozens of times while troubleshooting, but never thought to reboot any of the working devices, because, well... they were working! haha)

Anyway. Problem solved. No bugs. Just the user making stupid configuration mistakes.

Thanks again Phil!

Philip Knowles

unread,
Mar 8, 2021, 8:11:25 AM3/8/21
to Karl, TasmotaUsers

Easy done. I had a similar problem but resolved it by pointing to the NTP server in my NAS. In my case it was changing the ISP which caused the issue and the old devices installed from the previous but one ISP were the ones causing the problem with dates back to 1970.

 

Regards

 

Phil K

 

Sent from Mail for Windows 10

 

From: Karl
Sent: 08 March 2021 13:03
To: TasmotaUsers
Subject: Re: Date & Time wrong / NTP not working

 

First, thanks for taking the time to respond Phil.

 

Good news is I got it working! In the end the problem was DNS/firewall related. 

 

Your suggestion of trying to set ntpserver1 to the IP of my router didn't work but it made me realize I had only tested NTP servers by host name so I tried a public NTP server by IP address and low & behold it worked! That sent me to digging into DNS & in the end I found the problem related to firewall rules related to DNS.  How all the other devices were working is still a little bit of a mystery since they all use the same DNS server & the misconfiguration should have broken DNS for ALL my tasmota devices!? (But my best guess is that since the problematic device was the last device added to the network, maybe the DNS configuration problem was made after all the other devices were connected to the network and since the working devices have all been online without being rebooted in months maybe they were able to successfully resolve the NTP server hostname & lookup the time back before the bad DNS config change was made & they have simply maintained their clock from when they were first booted & things were working? That's the only thing that could explain the "different" behavior that I can think of!)

 

So new troubleshooting lesson learned: When troubleshooting mysterious problems that affect some devices & not others even though their configuration is identical, try rebooting the "working" device & see if it develops the problem as well! (I must have rebooted the problematic device dozens of times while troubleshooting, but never thought to reboot any of the working devices, because, well... they were working! haha)

 

Anyway. Problem solved. No bugs. Just the user making stupid configuration mistakes.

 

Thanks again Phil!

 

 

 

On Sunday, March 7, 2021 at 9:46:11 PM UTC-10 knowles...@gmail.com wrote:

Try setting ntpserver1 to your router ip and timezone to 0.

Not saying will work but interested to what the result is.

Regards

Phil K

Sent: Monday, March 8, 2021 7:16:59 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Re: Date & Time wrong / NTP not working

 

ntpserver1 = stat/sonoff/RESULT = {"NtpServer1":"pool.ntp.org"}

 

But I've also tried setting ntpserver1 to a bunch of other NTP servers with no improvement.

 

timezone = stat/sonoff/RESULT = {"Timezone":"-10:00"}

 

I don't use TimeDST and TimeSTD as the time never changes where I live. 

 

 

On Sunday, March 7, 2021 at 8:32:41 PM UTC-10 knowles...@gmail.com wrote:

What is your NTPServer1 setting and Timezone (plus TimeDST and TimeSTD).

Regards

Phil K

From: sonof...@googlegroups.com <sonof...@googlegroups.com> on behalf of Karl <ka...@kbrownconsulting.com>
Sent: Monday, March 8, 2021 6:08:59 AM
To: TasmotaUsers <sonof...@googlegroups.com>
Subject: Date & Time wrong / NTP not working

 

I'm having NTP trouble with a specific device and am wondering if it's possible there's somehow a bug with NTP in devices of this model, or if I've overlooked something else.

 

The device in question is the Amysen YX-WS01 Plug.

 

Of note, all other tasmota devices on the network are getting date & time fine via NTP so it doesn't seem like there's any generic firewall rules that should be universally breaking NTP.  

 

I also checked and the problematic device has identical default gateway, DNS & NTP settings as working devices so it doesn't seem like it should be a device config issue. (I'm open to triple-checking if someone thinks something might have been overlooked.) 

 

Additionally, I tried setting up a second identical model device and that device ALSO exhibited the exact same behavior! So even though all the other Tasmota devices on the network are working fine, both of the Amysen YX-WS01 Plugs I have tried exhibit the exact same problematic behavior! 

 

To really throw a monkey wrench into the diagnosis though, I did try connecting one of the problematic devices to a different wireless network and on that network the device managed to get the date & time successfully!? This sent me back to the original network to triple-check the router firewall rules but there's nothing in there that should prevent NTP from working. And again, ALL other Tasmota devices on that network seem to be working fine! So I double-checked the problematic device config and as mentioned previously, it's default gateway, DNS & NTP server settings all appear correct & match the working devices...

 

I'm out of ideas! Is it possible NTP is somehow broken for the  Amysen YX-WS01 Plug on some networks but not others? Since I believe I've ruled out network problems (triple-checked firewall config & manually assigned problematic devices different IPs) and tried to rule out a device config issue (tried 2 different devices of the same model & verified device's default gateway, DNS & NTP server settings all match working devices.) I really don't know what else to check. Feel like I'm banging my head against a wall.


I've also tried 2 different firmware versions: 8.5 & 9.3.1. Any other ideas welcome.

 

Thanks.

 

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/sonoffusers/462700d7-73dd-42f9-9ae6-c412545bfa05n%40googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.

--
You received this message because you are subscribed to the Google Groups "TasmotaUsers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to sonoffusers...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages