Host Engineering Forum

General Category => Do-more CPUs and Do-more Designer Software => Topic started by: PLCwannabe on May 05, 2024, 11:57:39 PM

Title: Retrieve weather station data from weatherlink.com
Post by: PLCwannabe on May 05, 2024, 11:57:39 PM
  I'd like to access weather station data on weatherlink.com with a brx with onboard ethernet. Attached is a screenshot of the API token that I think I will need to communicate. Just looking for general direction on how to get started, maybe a link to a domore help topic.

Api Weatherlink data:  https://weatherlink.github.io/v2-api/
Title: Re: Retrieve weather station data from weatherlink.com
Post by: Greg on May 08, 2024, 12:18:08 PM
  I'd like to access weather station data on weatherlink.com with a brx with onboard ethernet. Attached is a screenshot of the API token that I think I will need to communicate. Just looking for general direction on how to get started, maybe a link to a domore help topic.

Api Weatherlink data:  https://weatherlink.github.io/v2-api/

You would most likely use the HTTPCMD instruction in the BRX and in the http Server box, set the by Name to "weatherlink.github.io". Then in the HTTP Request box, use a Request Method of GET, and set the Request string to "/v2/..." where the ... would include your weather station's id and your api-key. But you'd have to consult WeatherLink's documentation to find out the syntax of that request.
Title: Re: Retrieve weather station data from weatherlink.com
Post by: PLCwannabe on September 29, 2025, 05:26:41 PM
Doing another api project to a refrigeration KE2 controller, but keep getting the following error message:  Client sent an HTTP request to an HTTPS server. How can i make the request a https request?
Title: Re: Retrieve weather station data from weatherlink.com
Post by: BobO on September 30, 2025, 10:22:51 PM
Doing another api project to a refrigeration KE2 controller, but keep getting the following error message:  Client sent an HTTP request to an HTTPS server. How can i make the request a https request?

Check "Use SSL/TLS" in the HTTPCMD editor.
Title: Re: Retrieve weather station data from weatherlink.com
Post by: PLCwannabe on October 01, 2025, 12:14:40 AM
I already tried that, but then it won't let me enter an ip address, the controllers are on my local lan.
Title: Re: Retrieve weather station data from weatherlink.com
Post by: BobO on October 01, 2025, 01:07:46 AM
I already tried that, but then it won't let me enter an ip address, the controllers are on my local lan.

TLS requires a DNS name, or at least the stack we use does.
Title: Re: Retrieve weather station data from weatherlink.com
Post by: PLCwannabe on October 02, 2025, 12:21:12 AM
  So is there no way to send a get  " https://192.168.1.207/api/status" to a device on my local network with a brx plc?  The same request works everytime on my chrome browser address bar.
Title: Re: Retrieve weather station data from weatherlink.com
Post by: BobO on October 02, 2025, 10:05:42 AM
  So is there no way to send a get  " https://192.168.1.207/api/status" to a device on my local network with a brx plc?  The same request works everytime on my chrome browser address bar.

There is not. For whatever reason, the TLS stack we use insists on a DNS name.
Title: Re: Retrieve weather station data from weatherlink.com
Post by: Bolt on October 02, 2025, 10:46:00 AM
  So is there no way to send a get  " https://192.168.1.207/api/status" to a device on my local network with a brx plc?  The same request works everytime on my chrome browser address bar.
It's a huge rabbit hole, but perhaps you could have a DNS server on your network, and then have a DNS name to go to that IP address? I'm not entirely sure what it would  involve, perhaps your router can handle it. Or a pi running pihole.
Title: Re: Retrieve weather station data from weatherlink.com
Post by: PLCwannabe on October 02, 2025, 12:46:18 PM
I was able to log into the ke2 controller and enable  Http access, everything works great now. Thanks for the help.