Hi Stefan,
The idea is the NTP server sets the time so you should in theory never need to manually set the time. This is why I haven't included the set macros instead the QueryTimeServer macro gets the current time from the NTP server. I also haven't included a manual setting because of the known drift in the default ESP32 clock and any user setting would quickly become more and more inaccurate, of course the 32.768KHz clock option will help a lot with this problem.
Should you need to apply an offset to the time server time e.g. UTC +2 hours then you can either set the UTC Offset property for a fixed offset or you can use the SetUTCOffset macro for a variable offset. Each apply an offset in seconds so for +2 hours the offset would be 7200.
Do you still need the manual time and date setting do you think? Probably not too bad to add if you do need it e.g. you don't have a WIFI connection.
ESP32 User Configurable Network Details
-
- Matrix Staff
- Posts: 1926
- http://meble-kuchenne.info.pl
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ESP32 User Configurable Network Details
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Valued Contributor
- Posts: 1002
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 191 times
- Been thanked: 217 times
Re: ESP32 User Configurable Network Details
Hi Ben
This with the Offset it's working fine. I take the printscreen before a was swimming in the lake and post it after.....
it's great the to set the time in a privat network with the NTP server.
But in our LAB we can just use wlan if we register the computer or phone. I suspect many companies have strict security regulations.
Yes it will help. And I like to use the AppDevelopper for it
regards
Stefan
This with the Offset it's working fine. I take the printscreen before a was swimming in the lake and post it after.....
it's great the to set the time in a privat network with the NTP server.
But in our LAB we can just use wlan if we register the computer or phone. I suspect many companies have strict security regulations.
Do you still need the manual time and date setting do you think?
Yes it will help. And I like to use the AppDevelopper for it
regards
Stefan
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ESP32 User Configurable Network Details
Hi Stefan,
I've pushed an update with two new functions to allow you to manually set the time and date. I've tested it compiles but not done any more then that so I'll keep my fingers crossed
I've pushed an update with two new functions to allow you to manually set the time and date. I've tested it compiles but not done any more then that so I'll keep my fingers crossed

Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Valued Contributor
- Posts: 1002
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 191 times
- Been thanked: 217 times
Re: ESP32 User Configurable Network Details
Hi Ben
Setdate is perfect
Settime is a little wrong
- if I set time to 0h 0m 0s it's like 4hours 19 minutes 27 sec
- if I set time to 10h 10m 10s it's like 14hours 29 minutes 37 sec
regards
Stefan
Setdate is perfect
Settime is a little wrong
- if I set time to 0h 0m 0s it's like 4hours 19 minutes 27 sec
- if I set time to 10h 10m 10s it's like 14hours 29 minutes 37 sec
regards
Stefan
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ESP32 User Configurable Network Details
Hi Stefan,
Many thanks for letting me know.
I wonder if the UTC offset is that's causing the issue, I've now taken this into account when setting the time so hopefully the latest component on the update system will be better for you.
Many thanks for letting me know.
I wonder if the UTC offset is that's causing the issue, I've now taken this into account when setting the time so hopefully the latest component on the update system will be better for you.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Valued Contributor
- Posts: 1002
- Joined: Wed Dec 02, 2020 10:53 am
- Has thanked: 191 times
- Been thanked: 217 times
Re: ESP32 User Configurable Network Details
Hi Ben
Perfect! Its working.
If the UTC offset is not set or set to 0 the SetTime is working fine
but
If the UTC offset is set to 3600 or 7200 before I set the time
the SetTime set a strange time (not a correct offset)
regards
Stefan
Perfect! Its working.
If the UTC offset is not set or set to 0 the SetTime is working fine
but
If the UTC offset is set to 3600 or 7200 before I set the time
the SetTime set a strange time (not a correct offset)
regards
Stefan
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ESP32 User Configurable Network Details
Hello,
That address 192.168.4.1 is the default address of the ESP device when hosting its own network. I'm not sure if it's editable at the moment. Anything connecting to that network will be assigned a dynamic IP such as 192.168.4.2 etc.
That address 192.168.4.1 is the default address of the ESP device when hosting its own network. I'm not sure if it's editable at the moment. Anything connecting to that network will be assigned a dynamic IP such as 192.168.4.2 etc.
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
-
- Posts: 206
- Joined: Thu Sep 23, 2021 3:44 pm
- Location: France
- Has thanked: 34 times
- Been thanked: 25 times
Re: ESP32 User Configurable Network Details
Hi Ben it's look like that need to use SOFTAPCONFIG
Please check this link.
https://docs.espressif.com/projects/ard ... ftapconfig
Could you help me to make this in C-Code or with another way .
Thx a lot
seb
Please check this link.
https://docs.espressif.com/projects/ard ... ftapconfig
Could you help me to make this in C-Code or with another way .
Thx a lot
seb
Seb
-
- Matrix Staff
- Posts: 1926
- Joined: Mon Dec 07, 2020 10:06 am
- Has thanked: 503 times
- Been thanked: 686 times
Re: ESP32 User Configurable Network Details
Hi Seb,
Looks like you should just be able to call that function using a C code icon. What happens if you try this?
Looks like you should just be able to call that function using a C code icon. What happens if you try this?
Regards Ben Rowland - MatrixTSL
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel
Flowcode Online Code Viewer (Beta) - Flowcode Product Page - Flowcode Help Wiki - My YouTube Channel