Describe the bug
Some of Tasmota Pow R2 does not get time from time server.
00:21:23 MQT: tele/sonoff/STATE = {"Time":"1970-01-01T00:21:23","Uptime":"0T00:20:24","Vcc":3.418,"SleepMode....
I tried timezone 99
I tried to setup the ntpserver to internal or external ntp server. I use ip or dns lookup.
I reseted the sonoff (reset 4) and reconfigured the device.
Firmware: Sonoff-Tasmota 6.4.1
_Also, make sure these boxes are checked [x] before submitting your issue - Thank you!_
status 0 :
00:33:14 MQT: stat/sonoff/RESULT = {"Time":"1970-01-01T00:33:14","Uptime":"0T00:32:15","Vcc":3.418,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":19,"POWER":"ON","Wifi":{"AP":1,"SSId":"XXX","BSSId":"34:81:C4:F8:99:F2","Channel":6,"RSSI":86}}(Please, remember to close the issue when the problem has been addressed)
Hi,
Sorry, can't reproduce your issue. My pows are working fine.
Please, check your network. This issue had happened before (as you saw when you have searched in issues) and most of the time is just a misconfiguration on the router or firewall. Just once was that public ntp servers were down for a couple of hours.
Also, you can upgrade your device to latest Tasmota version from development branch 6.4.1.17
If you are super sure that your network is fine, may be you have a router that is not 100% compatible with esp8266 arduino core 2.4.2. You can try either latest Tasmota 6.4.1.17 with core 2.3.0 or with core 2.5.0. Thehackbox.org/tasmota/020300 or thehackbox.org/tasmota/020500
@Gwenselah make sure your DHCP server sends correct NTP option as well. Tasmota is based on Arduino core, which takes this info and makes it primary (which causes problem with DHCP servers sending bad or empty options for NTP)
Hello,
thank you for your replies.
At the moment i have 4 Sonof Pow R2 in the same wlan. All have the 6.4.1 firmware. 2 of them get the correct time, the other 2 not.
Now I upgraded one to version 6.4.1.17 with core 2.5.0. this didn't solved the issue.
Are there some debugging commands to trace the getting time process?
Kind regards.
Come and join us at our discord. There were users with this problem. Might provide more help.
https://discord.gg/Crj7tCJ
Hi,
Any news on this issue?
No, I setup a ntp server on my raspberry pi, but nothing changed. I increased the debug log, but there is nothing in it, which would help.
I will go over to discord now
Now I think i got it.
If you use DHCP on the sonoff and your DHCP server sends no or incorrect ntp option, then you can not use "ntpserver1
Version 6.4.1.17
Very interesting! Thanks for sharing this.
That explains why I couldn鈥檛 reproduce the issue.
Thanks, now we have a workaround for people with this NTP issue for the DHCP in their router until something can be done in the code.
Its a SDK issue - if NTP server exists (configured correctly or not) on the same IP as the DHCP server (no setting for NTP server necessary on DHCP settings) then the SDK automatically uses the NTP service it assumes to be good on the same IP of the DHCP server... or at least this has been my observation.
So as it is SDK related you will have to use a workaround by adding one or two additional NTP servers using command ntpserver2 and ntpserver3.
@arendst it doesn't change anything. We've tried it with some discord users some time ago. The solution is to use DHCP server with proper NTP option configured in the lease.
@Gwenselah you've discovered what I basically told you in my first response.
@jziolkowski
Please consider that many people only have dhpc "server" running on routers like Fritzbox and yes, may be I missunderstood you.
For those people my workaround it is easier then setup an run a real DHCP Server.
So, please stay polite.
Closing this issue as it is has been answered. https://github.com/arendst/Sonoff-Tasmota/issues/5283#issuecomment-465630518
Most helpful comment
Now I think i got it." to set an internal ntp server. You can set it, but it will not work. You have to set a static ip on the sonoff additionally.
If you use DHCP on the sonoff and your DHCP server sends no or incorrect ntp option, then you can not use "ntpserver1
Version 6.4.1.17