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:
I should mention this works in the browser, but the syntax won’t work in my Crestron app.
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.
Syntax hasn’t changed on my side, but it no longer works. HTTP GET is slightly different than just an HTTP request.
Looks like the format of HTTP GET needs to be more precise:
GET /swd/rest/observations/station/[station]?token=[token] HTTP/1.0\nHost: swd.weatherflow.com\n\n
All was good yesterday, now getting a new error.
Here’s what I get back from:
“GET /swd/rest/observations/station/[station]?token=[token] HTTP/1.0\nHost: swd.weatherflow.com\n\n”
HTTP/1.1 301 Moved Permanently\x0D\x0AServer: awselb/2.0\x0D\x0ADate: Tue, 23 May 2023 11:33:06 GMT\x0D\x0AContent-Type: text/html\x0D\x0AContent-Length: 134\x0D\x0AConnection: close\x0D\x0ALocation: https://swd.weatherflow.com:443/swd/rest/observations(…)"
5-4764-a7f5-8c630f855d1c\x0D\x0A\x0D\x0A\x0D\x0A301 Moved Permanently\x0D\x0A\x0D\x0A
301 Moved Permanently
exactly my thoughts. Isn’t that what the permanently moved message is telling you? it moved to the given address.
have you made progress?
I have the same error on my Crestron module but also on a program for ESP32 which worked perfectly until now
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 ;).
So, unfortunately I’m pretty stuck without HTTP.
Let’s hope that HTTP will be activated otherwise it will be complicated!
Thanks for the info!
this response from Lance, WeatherFlow Staff -
I am just reaching out on that thread you had.
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.
and my response -
Appreciate the response.
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.