I’ve been using the personal-use token and HTTP GET to query the API. All has been working well for over a year. Now I am getting a ‘Service Temporarily Unavailable’ error message. Is it me or is it WeatherFlow.
Here’s my syntax that I send to swd.weatherflow.com:
“GET /swd/rest/observations/station/[station]?token=[token]\x0D\x0A\x0D\x0A”
well, if it works in the browser then the same thing should work in your app as long as you use the exact same syntax. At least that would be my assumption.
Speaking with William in support. He’s speaking with the development team to see if there’s a way to re-enable HTTP support.
I did some more digging just to confirm, and it would require rewriting the whole app in Simpl# - which I’m not familiar with and also doesn’t run on my processor. It’s currently Simpl+, and a nice piece of code if I do say so myself ;).
William sent that over and yes HTTP is being phased out (pretty much everywhere) for numerous reasons and we are following suit to stay in compliance for both Internet standards as well as Insurance and auditing. The 301 is simply just a redirect the HTTPS connection and I am sorry to hear your application doens’t support that protocol.
I am not sure how long it will take you to re-write or update that code, but I would suggest looking into that regardless as you mentioned why, the data is public, I would say the same holds true for almost any mainstream website, even google? If you force HTTP://google.com it will redirect to HTTPS, why, it’s just your search? The reasoning is more what the server(s) will and will not accept for numerous reasons, so it’s not a matter of what the content is vs management time and security.
I would say to take a look at what is involved, and get a timeline and I will see what we can do as a temporary allow, but it won’t be for that long for numerous reasons.
The challenge is larger than it appears on the Crestron platform. Older processors do not support HTTPS and newer processors needing HTTPS require writing apps in SIMPL# (a variation of C#), as contrasted with SIMPL/SIMPL+ which the majority of apps are written in. I also have no familiarity with C#.
So unfortunately, it is a total rewrite or likely obsolete the app completely.
Appreciate the temporary allow, but as you say that just delays the inevitable pain. Not sure if there are any other options.
Are you aware if anyone has written a Crestron app in SIMPL# that works with HTTPS?
As a intermediate solution, I had a Crestron RMC3 laying around and migrated to jbasen Crestron-WeatherFlow module which uses simpl#. I sent the same signals back to my older AV2 processor using intersystems communications. Other than some minor scale changes, works perfectly.
So, onward from HTTP - except for my WorldTides module which also relies on HTTP/simpl+ - a project for a future day.