n0bel / PiClock

A Fancy Clock built around a monitor and a Raspberry Pi
MIT License
566 stars 182 forks source link

Add rough tide integration #166

Closed vanosg closed 1 year ago

vanosg commented 5 years ago

To answer #165 , this is just a rough concept of how tides could work... I didn't go through your code thoroughly (nor even really review my own), so I just conveniently overwrote the sunrise/set times for now :) Maybe just another if statement above so that if it is available, it writes it above the sunset times. It uses current time and hour to poll the next 2 high/low times and formats the text.

Oh, it would still need to read in the station ID from the config file as well, I have it hardcoded in the API call for the moment.

One thing I'm also not sure- how often does PiClock poll for updates? From the docs, it sounds like maybe its only polling at startup, which would be troublesome if the clock isn't rebooted regularly- but I don't know that for sure. Anyway, just a concept, please feel free to hack away as you see fit using this as a starting point if you like! I'd love to see it merged in if you think it could work. Thanks!

togatown commented 5 years ago

@vanosg The config should have options for:


units - english or metric
time_zone - gmt, lst or lst_ldt
station - id of station