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
-
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/
-
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.
-
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?
-
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.
-
I already tried that, but then it won't let me enter an ip address, the controllers are on my local lan.
-
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.
-
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.
-
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.
-
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.
-
I was able to log into the ke2 controller and enable Http access, everything works great now. Thanks for the help.