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

NTP timeserver not syncing right, and can't select 12/24 hour time #4

Closed devicemodder closed 2 years ago

devicemodder commented 2 years ago

I select NTP timeserver and it always syncs to show 20:00:59, regardless of location. I have to manually set the time every time i power up the ESP32.

Also, how can i get it to show the time in 12 hour format?

marciot commented 2 years ago

@devicemodder: You may want to check the serial console for any errors. I'm guessing it is failing to contact the NTP server.

Currently, the 12-hour format isn't supported. Mostly this is because the original Dali clock doesn't have any sort of PM/AM indicator. It would not be hard to allow a 12-hour format without a PM/AM indicator, although that might be a bit confusing.

devicemodder commented 2 years ago

Thanks for getting back to me, I'll check the console and see what's happened. As for the am/pm in 12 hour, that isn't really of much concern. Just as long as I can display the time in 12 hour. Doesn't need to say AM or PM. What line do I have to modify to achieve this?

On Thu., Dec. 23, 2021, 3:40 p.m. Marcio T., @.***> wrote:

@devicemodder https://github.com/devicemodder: You may want to check the serial console for any errors. I'm guessing it is failing to contact the NTP server.

Currently, the 12-hour format isn't supported. Mostly this is because the original Dali clock doesn't have any sort of PM/AM indicator. It would not be hard to allow a 12-hour format without a PM/AM indicator, although that might be a bit confusing.

— Reply to this email directly, view it on GitHub https://github.com/marciot/esp32-dali-clock/issues/4#issuecomment-1000514791, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANOW4K3JC27XTXUPPNK6CKDUSOCKRANCNFSM5KVN27WA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>

marciot commented 2 years ago

You would have to modify this function:

https://github.com/marciot/esp32-dali-clock/blob/876abec22265002d74716d47f93a33285a5ca049/esp32-dali-clock/src/dali_clock.cpp#L94

If you consider supporting me on GitHub or Patreon, I would consider making a new release with this feature as a configurable option.

devicemodder commented 2 years ago

Thanks, i'll modify that string. it seems like with the NTP location sync, that it isnt actually picking up the location, although i see no errors in the serial console.

marciot commented 2 years ago

@devicemodder: I made a new release of the code. I figured out what was wrong with the location code and also added a new checkbox to toggle between 12 and 24 hour mode. Thank you for your feedback and bug report!

marciot commented 2 years ago

@devicemodder: If this new release does what you need, please close this ticket 😄

devicemodder commented 2 years ago

Thanks. I appreciate it.

On Sun., Dec. 26, 2021, 4:14 p.m. Marcio T., @.***> wrote:

@devicemodder https://github.com/devicemodder: I made a new release of the code. I figured out what was wrong with the location code and also added a new checkbox to toggle between 12 and 24 hour mode. Thank you for your feedback and bug report!

— Reply to this email directly, view it on GitHub https://github.com/marciot/esp32-dali-clock/issues/4#issuecomment-1001242771, or unsubscribe https://github.com/notifications/unsubscribe-auth/ANOW4K45MB6SB5AVIM6P4UDUS6ATLANCNFSM5KVN27WA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

You are receiving this because you were mentioned.Message ID: @.***>