lmirel / MorphingClockRemix

a remix on the work of HarryFun's MorphingClock
https://www.instructables.com/id/Morphing-Digital-Clock/
78 stars 30 forks source link

Timezone always "0" #8

Closed gadrecs closed 5 years ago

gadrecs commented 6 years ago

Hi, i managed to get your version running. But whatever i do i cannot set the Timezone in the Webserver. the value always stays at "0" I tried setting the value in the webserver with a "2" and a "+2" with no difference .. Can you provide a hint what i am doing wrong ?

I wanted to set the timezone to Europe (Berlin) ....

Kind regards and many thanks !

lmirel commented 6 years ago

I use it with +2 so I know this works. Your flash might need formatting. Can you check?

gadrecs commented 6 years ago

Hi,

yes i checked and formatted.

After reloading the code it worked for 2 powerups

Plugging it all in the 3rd time the time was again set to 6 hrs ahead …

Really strange.

Many thanks in advance

Von: lmirel [mailto:notifications@github.com] Gesendet: Mittwoch, 24. Oktober 2018 10:12 An: lmirel/MorphingClockRemix MorphingClockRemix@noreply.github.com Cc: Markus Pöschl markus@poeschl.info; Author author@noreply.github.com Betreff: Re: [lmirel/MorphingClockRemix] Timezone always "0" (#8)

I use it with +1 so I know this works. Your flash might need formatting. Can you check?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lmirel/MorphingClockRemix/issues/8#issuecomment-432556760 , or mute the thread https://github.com/notifications/unsubscribe-auth/AXO1NexVTvG6UoVAnFr85NzBi0bIDZNVks5uoCC_gaJpZM4X21xp . https://github.com/notifications/beacon/AXO1NaXY-cnTm0anM9SiDtcPJaxpklKVks5uoCC_gaJpZM4X21xp.gif

evilsperm commented 5 years ago

I am also have this exact issue for a while now. I am -4 and no matter what zone I change it to I'm always 1 hour ahead of my current time. I notice this happen after daylight savings and its SUPER frustrating. I have formatted the board completely and still having this issue.

evilsperm commented 5 years ago

Is there a way to just hard code the time? Having it always connect to an ntp server is not ideal at all especially if you lose wifi connection.

gadrecs commented 5 years ago

You would need a rtc-chip. The arduino board has no built in real time clock module...

Am Mi., 19. Dez. 2018, 20:42 hat evilsperm notifications@github.com geschrieben:

Is there a way to just hard code the time? Having it always connect to an ntp server is not ideal at all especially if you lose wifi connection.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/lmirel/MorphingClockRemix/issues/8#issuecomment-448719992, or mute the thread https://github.com/notifications/unsubscribe-auth/AXO1NSHKDqoGc_9kdtOzejN4MTDuJttoks5u6pa6gaJpZM4X21xp .

evilsperm commented 5 years ago

ahh makes sense ;) Still something is wrong, I have tried to change it to ever time zone there is and it's always 1 hour ahead of my current time.

evilsperm commented 5 years ago

I finally got it to work, I had to set my time to -5 instead of -4 also need to use All Flash Contents. It took me about 50+ flashes before it worked, not to unplug it a few times and see if it actually sticks. Its very strange that ntp server cant even determine daylight saving... Guess I will manually need to flash the device every time we change times ;(

lmirel commented 5 years ago

can you check your console output? look for the following (in my case): timezone=1

then look for the message: Got NTP time: 09:47:21 12/12/2018

and see how it adapts.

you could copy/paste your whole output and I'll take a look.

lmirel commented 5 years ago

I experienced quite a few issues today on one setup due to flash issues. I couldn't init the SPIFFS and all data configuration data was lost. I couldn't get the WiFi portal (WiFiManager) to work to set it up so I had to hardcode the settings just to get them saved properly. weird stuff.. I think I'll give up the WiFi Manager in a future release and use predefined settings instead.

lmirel commented 5 years ago

If you don’t care about dynamic configuration via WiFi manager and the flash file system, checkout my ‘no-wm’ branch and configure your parameters statically as explained in the code. HTH