Tide Times

I got it working now. I have to seperate every platform into individual .yaml file.
Thank you very much Mr.exxamalte ^^

1 Like

Hiya,

All of a sudden I am seeing “unknown” as the next high tide. I have chjecked my API and it is still triggering counts at worldtides side.

Any ideas?

Thanks

We have reached the limit of usage ^^

doubt this, I am only at 200 requests out of 1000 for the month

mine also unknown soon after that you will receive email say out of credit.

Works great.

Does anyone know the interval of this component? I set this up for 1 location about a week ago and it has already exhausted the 200 monthly credits. I know that each rest GET is 1 credit and thats fine but this component should really only be making requests at most twice a day. I’m doing a test now to see how often it makes request but if this is making requests all day, that doesn’t sound right. Unless I am missing something.

The default update interval is 1 hour.
It should be possible to override this with the scan_interval parameter.

Awesome thanks! I wasn’t aware you could change the parameter for any component. Very nice!

According to my worldtides log for May, there are around 24 calls a day meaning one an hour. I’ve added a scan_interval: 14400 to scan every fours hours so see if that helps. According to my account, I’ve only used 254 credits but the system has me locked out.

image

image

I got my first email yesterday
Warning: Only 101 credits left on www.worldtides.info did something change?

Yes it has changed.

When you register, you get one month of 100 free credits to make API calls.

So 3 times a day or every eight hours should be possible.

My guess is that the info is rather static so you need at least 1 per day.

Or is this 100 credits just once?

Sorry my response was short, it was from my phone.

This is the email I got back from worldtides after enquiring:

Hi Nick,

Thank you for contacting me. I took a look at your account. It was created back in Feb 2017. At that time we gave new users 1000 free credits per month. However, we no longer do this. Instead we give 100 free credits total and give users 1 month to use them.

I haven’t canceled the previous 1000 credits per month offer. But, it is on my list of things to do. Your email to me won’t shorten my timeline on carrying out this change, so don’t worry. My plan is to simply expire the offer by the end of the year (or something like that).

In your case, you have used 1000 credits since 5/17 and today. 5/17 is your subscription renewal date. It doesn’t line up with the beginning of the month.

Subscriptions are very inexpensive. And it appears that this service is useful for you. So, I recommend that you purchase one that fits usage without assuming that you get an extra 1000 credits per month (because that’s going away).

Suggestions / comments always welcome.

Apologies again, checking here WorldTides - Apidocs reveals

Retrieval of heights, extremes, datums and corrected constituents can be done in one API call, but it will be calculated as separate calls for billing purposes.

My graphs on their site show usually 24 credits used per day, sometimes more. For quite a while in April it was using 48 credits per day.

Frustrating that they are limiting it, but it isn’t as bad as WUnderground making their cheapest monthly subscription to access your own data $850 per month.

PS Line 24 of worldtides.py sets SCAN_INTERVAL to hourly.

SCAN_INTERVAL = timedelta(seconds=3600)

I didn’t want to pay for worldtides, and it was getting complicated to write a script to take a tide table, match it to the time now and return a value.

I live on the water and really just need to know if the tide is rising or falling and for how long, so I used this site www.tides4fishing.com and created a scrape sensor to pull their tide summary tag.

This sensor:

sensor 15:
  - platform: scrape
    resource: http://www.tides4fishing.com/ca/british-columbia/point-atkinson#_tides
    name: Tide
    select: "#brujula_mareas_texto_movil"
    scan_interval: 120

returns “The water level is rising. There are 1 hour and 34 minutes until high tide.” which I can get through Google Assistant with this script:

tide:
  alias: Return the current tide to Google Assistant
  sequence:
  - service: tts.google_say
    entity_id: media_player.living_room_speaker
    data_template:
      message: Tide Status {{states('sensor.tide')}}
      cache: false

Change the resource to whatever the URL for your particular location is. You don’t get the height of the tide, but it’s a good enough summary for me.

PS: I haven’t confirmed if increasing the scan_interval works on the scrape sensor, but if you do implement this be polite and don’t slam their site with excessive requests.

4 Likes

Great, I think that info is far more interesting than what I am currently getting from worldtides.

For some reason, WorldTides seems to be using way more credit than described in the API doc. This would make any WorldTides component almost useless.
I had put a feature request for more data for this component here: https://community.home-assistant.io/t/more-sensors-for-worldtides-component/61583
There is some development on a Magic Seaweed component on GitHub here: https://github.com/home-assistant/home-assistant.io/pull/5598#pullrequestreview-131544698
Development seems to be on hold, but this could be a solution for seafaring automators. Magic Seaweed has data on tides, surf and swell…
Likewise, there is a pull request for NOAA tides data, that could be useful here: https://github.com/home-assistant/home-assistant/pull/15664#pullrequestreview-140402822
Development is also slow. Maybe those with programing skills could help!
Back a few years ago, I had a JS and PHP code running on a website that returned all chart data by scraping the UK Hydrographic Office’s Easytide server.
It also rendered charts as follows:5379_Chart
I still have the code lying around. Let me know if this could be relevant to some developers as I’m happy to share the code by email (800KB)…
I’d really like some proper way to display tides in Home Assistant, but my programing skills are lagging.

1 Like

You are aware that each call to worldtides uses more than one ‘credit’?

Yup, API doc is clear on this.
1 call for 7 days of Extremes and 1 call for 7 days of Heights. I use scan interval with a value of 1080 and have reached 24% of allowed credits in 3 days…
In any case, what would be really useful is a proper tide table implementation for the next few days.