Idea: tide time watch for BangleJS2 #7854
-
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 2 replies
-
I'd love to do this - what put me off was getting a source for the data. In the UK we have https://easytide.admiralty.co.uk/ which can give data like this: And you can query by accessing https://easytide.admiralty.co.uk/Home/GetPredictionData?stationId=0102A The problem is that the website does set any CORS headers so a web browser running the App Loader will refuse to load the page, and we can't easily load it via Gadgetbridge as the response is pretty large. So either I have to host a proxy that returns the correct CORS headers or we need to find something else (and all the worldwide APIs I saw seem to be paid or heavily rate limited - unless someone can find a free one). I believe you can also not just get a forecast but can do it yourself - I think each location has a set of coefficients for basically how much of the moon/sun/etc effect the tide and when - but again getting that info is a paid service I believe - although you could probably infer enough based on a 7 day forecast to work ok for the next few months. As you say we could have an app that simply assumes a set tide interval, and then you set high/low tide up manually. That could be nice and easy. I'd be happy to help with such a thing (it'd make a great ClockInfo so you could add it to whatever clock you currently had) |
Beta Was this translation helpful? Give feedback.
-
I've just added this as an app for you. It's on the development app loader at https://espruino.github.io/BangleApps/?id=tidetimes |
Beta Was this translation helpful? Give feedback.
-
For the sake of completeness there is also https://github.com/neaps/tide-predictor which can predict the times pretty good without external data but I never got it running on a Bangle |
Beta Was this translation helpful? Give feedback.
I've just added this as an app for you. It's on the development app loader at https://espruino.github.io/BangleApps/?id=tidetimes