-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Link broken? #2
Comments
Yep, I have the same issue. The error log in the browser console shows the module is getting a 301 status on the response, so I thought it may be something to do with that? Indeed, in node_helper.js, line 45, there's an if statement checking for a 200. That's all I've had time to look at so far. |
I think the feed has changed from the met office but I have no knowledge of what to look for to change. |
The feed path looks the same, but it's being redirected (in a browser, at least) from http to https, giving the 301 (permanent redirection). The module won't use a https URL at the moment, by the looks of things. |
Module is not working. I think that is because of https. If you copy content from web to local file and use test url to that file module is showing data so met Office did not change any structure, so in my opinion https is a problem. |
Did anyone managed to get it working? |
Met office have changed to HTTPS. I got it working:
node.js won't honour 301 redirect from http to https - need to stick with HTTPS throughout. |
Thanks those changes partially resolved my issue but unfortunately it looks like the feed schema has changed |
Yes, they've moved from JSON to XML-based RSS. I'll have a look and see if there's a RSS reader module that could donate some code... not a JS coder though. |
Ok so looks like that isn't the issue. The parser (FeedMe) does support XML based RSS. |
Thanks. The testing/createDummyWarnings.js script shows how those are created... they should be parsable (regex?) from the XML item/description contents. Yellow warning of ice affecting Grampian: Aberdeenshire, Moray valid from 1600 Wed 01 Jan to 1000 Thu 02 Jan "metadata:warningkind": "WARNING", |
Unfortunately the meta data is not listed in the feed from the met office any more (see example of link below). I created a "hacky" version last night which I did get work but encountered other issues with the plugin so wondering about getting the warnings from a "proper api" somewhere and writing a new version.
|
API due to retire in September 2025 and needs a key too... https://www.metoffice.gov.uk/services/data/datapoint I hardcoded the values as below in warningitemobject.js and it's picking up a live XML feed. Mirror GUI updated from Ice to Icy (mixed case) when I Changed ICE to ICY below. If it can be extracted from the item.description there may not need to do much else. Will see if I get a regex working in JS. What other issues did you see in the module? |
Yes I saw that, unfortunate that they are stopping their API. The hacky version I had last night was extracting from the Title and was working well. The issues I was encountering were strange and I wasn't able to reliably get them to repeat. Things worked until I restarted the mirror then would get intermittent socket errors. Need to spend some more time on it when I get a chance. |
Thanks! Works great for me (had to install node-fetch 2.6.7 but that's a local thing) and mirror correctly showing the two warnings for my region per https://weather.metoffice.gov.uk/warnings-and-advice/uk-warnings Only thing I'm not getting is the title banner, expect I need to change the config.js - will add a note over over your repro, no value continuing here. |
Pleased it's working for you! For anyone else that comes across it, feel free to give it a go. I will look at giving it a bit of a tidy and add a screenshot etc over in my Repo |
Hi is anyone having issues with the data suddenly stopping loading?
The text was updated successfully, but these errors were encountered: