marciot / esp32-dali-clock

An NTSC/PAL version of the 80s Dali Clock for the ESP32
GNU General Public License v3.0
117 stars 10 forks source link

Daylight saving time tickbox doesn't work. #3

Closed richms closed 2 years ago

richms commented 2 years ago

I tick it and choose NST timezone, the URL has

&ntp_addr=pool.ntp.org&timezone=12.00&time_dst=on

on the end of it, but it is ignored, its showing the time for UTC + 12, not + 13 like it should be.

I can change the timezone to =13.00 myself and resubmit it and it gets it showing the correct time for me.

I'm fairly sure this was working in the past however? I would have noticed it on my last play with it if it was an hour out I would have thought. Perhaps not tho.

Also, why is the network name and the time selection in the same form? If I change the timezone and dont re-paste the SSID and key, it leaves it not connected to the LAN and I have to get the phone out and connect to its hotspot and reconfigure the wifi again.

marciot commented 2 years ago

I feel like this was broken a while back, but I put in a fix for it a while ago. Are you trying with the latest code?

marciot commented 2 years ago

@richms: It looks like most of the examples on how to set the time zone on the ESP32 are broken, but I found a better explanation on how to do it and implemented it in the code. One advantage of the new method is that now you can select your location and the daylight savings will automatically be applied based on the calendar date.

richms commented 2 years ago

Different problem now, the form doesn't fully load for me on both my phone and a laptop - sometime sit gets about 10 country options that have africa/something in them (last one is africa/Bujumbura on this load) and there is no submit button.

Other times the page doesnt load at all, or I get just the wifi fields and nothing below it. Reloading it on the laptop and it cant find the IP for www.msftconnecttest.com which is what it seems it tries to load to bring up the captive portal.

Putting the wifi network and key in and pressing enter tries to submit it but its like the wifi on the clock is dead at that point because it soon disconnects from it and no device can reconnect to the dali clock ssid until I reboot the ESP.

At all times the clock was still displaying on the composite screen attached so the whole thing hadn't crashed.

richms commented 2 years ago

That time got a bit further, the list went to america/whitehorse, still no button on it. I guess the wifi manager cant deal with a form that long or something

marciot commented 2 years ago

@richms: It looks like the only way to fix this was to use JavaScript. Now the user first selects their general location, and then the web page sends a request to the ESP32 to populate the more specific locations.

marciot commented 2 years ago

@richms: Were you able to test this? If I don't hear back I will close this as resolved.

richms commented 2 years ago

Im on holiday so cant get to the new hardware till the 12th of Jan, Its been crashing a lot with this so I want to get some more ESP32 boards. All my others except the 2 I have been trying have the older chip revision that doesnt work with the composite out library so I cant use them to test it.

Basically it would be crashing and rebooting as soon as I tried to connect to the wifi it broadcasts, so no chance to configure it and I want to rule out hardware before I test more. Will not be able to collect my aliexpress order till later to try it on new hardware.

marciot commented 2 years ago

@richms: Crashes during WiFi connect are commonly caused by a power dip on the supply rail. You can google it and see that it is a common problem. I recommend using a beefy power supply and thick gauge wires. This solved rebooting problems for me.