Thank you. Many errors from cutting and pasting over and over and over. Anyways…
This is what the finished custom panel for tides looks like after many trials and tribulation:
I stuck it in Secondary Panel position 5, so I duplicated the Time and Date from the Rainfall Primary Panel. It works by querying info from the the Tide Predictions - NOAA Tides & Currents page. Use that page to find the closest Tide station to you. What you need is the 7-digit station ID of that Tidal station. Then in customPanels.py, and within the ``def update_tides(self, *args):
edit the line that specifies the URL in which to steal the data from hourly:
url = "https://api.tidesandcurrents.noaa.gov/api/prod/datagetter?date=today&range=48&station=8466791&product=predictions&datum=MLLW&time_zone=lst_ldt&interval=hilo&units=english&application=DataAPI_Sample&format=xml"
Substitute your own 7-digit tide station ID where mine says 8466791
.
Here are the files that go into the user
folder within the wfpiconsole
folder, obviously, strip.the .txt extension:
customPanels.kv.txt (2.0 KB)
customPanels.py.txt (3.5 KB)
It works by querying the NOAA API, and then creating a local file based on the API response. I tried numerous times to parse the response directly from the API, but was unable. Once the response file has been created, it is parsed and displayed. A new query and file is created hourly to keep the info current. I’m not responsible if you run aground or drown.
Thank you, Peter!