incorrect date/time in Mega version
Moderators: grovkillen, Stuntteam, TD-er
incorrect date/time in Mega version
I am using ESPEasy Mega build mega-20180710.
Switched on the "use NTP" field, left the host name field empty (as suggested).
After a while I notice the date/time is 2036-02-07 07:12:37....
Did I configure it wrong, or have we invented a time machine?
Switched on the "use NTP" field, left the host name field empty (as suggested).
After a while I notice the date/time is 2036-02-07 07:12:37....
Did I configure it wrong, or have we invented a time machine?
Re: incorrect date/time in Mega version
Does it work if you enter the IP address of the NTP server you use?
If not there is a problem with Mega.
Does your device use DHCP (no IP for the device set within the config)?
If so, check that your DHCP server gives a valid address for NTP.
If not there is a problem with Mega.
Does your device use DHCP (no IP for the device set within the config)?
If so, check that your DHCP server gives a valid address for NTP.
Regards
Shardan
Shardan
Re: incorrect date/time in Mega version
I use a static IP address, with 20+ ESP units there is no way around this.
As for the NTP server, I can enter a value there but since the recommendation is to leave it blank...
But OK I will try.
- grovkillen
- Core team member
- Posts: 3621
- Joined: 19 Jan 2017, 12:56
- Location: Hudiksvall, Sweden
- Contact:
Re: incorrect date/time in Mega version
ESP Easy Flasher [flash tool and wifi setup at flash time]
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
ESP Easy Webdumper [easy screendumping of your units]
ESP Easy Netscan [find units]
Official shop: https://firstbyte.shop/
Sponsor ESP Easy, we need you
Re: incorrect date/time in Mega version
I'm not sure if this is still an issue.
If you use a static IP address ESPEasy does not use the DHCP.
So if the NTP server field is left blank and DHCP is not used,
the NTP server field just won't get any valid address or name
BTW: You can use DHCP and fixed address. It's what I'm doing here.
I've reserved specific IP adresses for all devices with my DHCP server.
Regards
Shardan
Regards
Shardan
Shardan
Re: incorrect date/time in Mega version
I've entered the URL 0.pool.ntp.org, but that does not help.Shardan wrote: ↑21 Jul 2018, 23:45I'm not sure if this is still an issue.
If you use a static IP address ESPEasy does not use the DHCP.
So if the NTP server field is left blank and DHCP is not used,
the NTP server field just won't get any valid address or name
BTW: You can use DHCP and fixed address. It's what I'm doing here.
I've reserved specific IP adresses for all devices with my DHCP server.
Regards
Shardan
As for static versus dynamic: I am aware that I can limit the address range, but that does not make it 100% sure that an ESP unit gets the same IP address every time. Since I want to be able to log on via a browser, and also because I send http commands , I need to be sure if the IP.
Re: incorrect date/time in Mega version
Please try to enter an IP address so we can see if the ntp or the DNS resolving is the point.
Make sure that your router passes NTP requests to the internet.
You can find valid ntp addresses with nslookup:
- open a shell (Linux) or a CMD windows (Windows).
- enter
You'll get some IP addresses from the ntp pool in Germany. May swap to other countries by
changing "de" to "nl" for example.
For the DHCP Range:
The range is more or less useless, right.
Very most routers are able to define a list of MAC addresses and assign a specific IP to every MAC.
This drives the DHCP server to assign the given IP to the device. The MAC address of a device is fixed
and does not change (Usually burned into the network chip).
You can obtain the MAC adress from a device as follows:
- Open a CMD windows
- ping the device with
- immediately after the ping type
This will show the MAC address of the device.
Now go to your router and define a fixed DHCP address.
As i don't know your router i can't say how this works, but even my stoneage old router (spare part in the shelf)
is able to handle that.
Make sure that your router passes NTP requests to the internet.
You can find valid ntp addresses with nslookup:
- open a shell (Linux) or a CMD windows (Windows).
- enter
Code: Select all
nslookup de.pool.ntp.org
changing "de" to "nl" for example.
For the DHCP Range:
The range is more or less useless, right.
Very most routers are able to define a list of MAC addresses and assign a specific IP to every MAC.
This drives the DHCP server to assign the given IP to the device. The MAC address of a device is fixed
and does not change (Usually burned into the network chip).
You can obtain the MAC adress from a device as follows:
- Open a CMD windows
- ping the device with
Code: Select all
ping <IP Address>
Code: Select all
arp -a <IP Address>
Now go to your router and define a fixed DHCP address.
As i don't know your router i can't say how this works, but even my stoneage old router (spare part in the shelf)
is able to handle that.
Regards
Shardan
Shardan
Re: incorrect date/time in Mega version
OK, I entered an actual IP addres (85.255.214.66), and now it gets me the correct date/time.
So that means that working with a URL (nslookup nl.pool.ntp.org) does not work, but a resolved IP does.
As for your suggestion to use a MAC address: I understand, but I would prefer not to put too much dependency into the router.
Putting the unit number along with the IP address into the ESP is very convenient.
So that means that working with a URL (nslookup nl.pool.ntp.org) does not work, but a resolved IP does.
As for your suggestion to use a MAC address: I understand, but I would prefer not to put too much dependency into the router.
Putting the unit number along with the IP address into the ESP is very convenient.
Re: incorrect date/time in Mega version
Now that I get time/date from the server, I notice that I still have to tick the DST box. Is this not done automatically?
In other words, does ESPEasy not "see" the beginning and end date of DST?
In other words, does ESPEasy not "see" the beginning and end date of DST?
Re: incorrect date/time in Mega version
Hah.... I have one ESP running ESP Mega 20000, and that one works just fine with the unresolved URL!
Re: incorrect date/time in Mega version
Are you using static IP on the ESP node?
Then make sure you have set the gateway and DNS too.
Currently you have to set DST yourself, but I guess we may change the default to checked.
My idea was to leave it unchecked so people see they also can set other parameters too.
DST has quite some country-specific settings, most people are unaware of.
Then make sure you have set the gateway and DNS too.
Currently you have to set DST yourself, but I guess we may change the default to checked.
My idea was to leave it unchecked so people see they also can set other parameters too.
DST has quite some country-specific settings, most people are unaware of.
Re: incorrect date/time in Mega version
GW and DNS are set.TD-er wrote: ↑23 Jul 2018, 21:40 Are you using static IP on the ESP node?
Then make sure you have set the gateway and DNS too.
Currently you have to set DST yourself, but I guess we may change the default to checked.
My idea was to leave it unchecked so people see they also can set other parameters too.
DST has quite some country-specific settings, most people are unaware of.
As for DST: I notice all the parameters for the automatic DST mechanism are already there.... so when I tick the DST box, will it then switch over automatically?
Re: incorrect date/time in Mega version
Those parameters are the rules for most countries on the northern hemisphere.manjh wrote: ↑24 Jul 2018, 00:20GW and DNS are set.TD-er wrote: ↑23 Jul 2018, 21:40 Are you using static IP on the ESP node?
Then make sure you have set the gateway and DNS too.
Currently you have to set DST yourself, but I guess we may change the default to checked.
My idea was to leave it unchecked so people see they also can set other parameters too.
DST has quite some country-specific settings, most people are unaware of.
As for DST: I notice all the parameters for the automatic DST mechanism are already there.... so when I tick the DST box, will it then switch over automatically?
For me, in Holland, I just have to tick DST and set the timezone to +60 minutes. (GMT + 1 in winter, GMT + 2 during DST)
Re: incorrect date/time in Mega version
OK, very good, that is exactly what I hoped for.TD-er wrote: ↑25 Jul 2018, 00:08Those parameters are the rules for most countries on the northern hemisphere.manjh wrote: ↑24 Jul 2018, 00:20GW and DNS are set.TD-er wrote: ↑23 Jul 2018, 21:40 Are you using static IP on the ESP node?
Then make sure you have set the gateway and DNS too.
Currently you have to set DST yourself, but I guess we may change the default to checked.
My idea was to leave it unchecked so people see they also can set other parameters too.
DST has quite some country-specific settings, most people are unaware of.
As for DST: I notice all the parameters for the automatic DST mechanism are already there.... so when I tick the DST box, will it then switch over automatically?
For me, in Holland, I just have to tick DST and set the timezone to +60 minutes. (GMT + 1 in winter, GMT + 2 during DST)
Who is online
Users browsing this forum: Google [Bot] and 131 guests