Host Engineering Forum
General Category => Do-more CPUs and Do-more Designer Software => Topic started by: PLCwannabe on December 29, 2022, 09:27:46 PM
-
I'm looking for info on how to poll a Davis weather station registers for weather info. Does the link below look like a BRX could do that, or is there a better way?
https://weatherlink.github.io/v2-api/tutorial
-
BRX can easily poll your weather station on REST API.
Check out AutomationDirect's Youtube channel:
https://www.youtube.com/watch?v=ZqNt6fPBwwU (https://www.youtube.com/watch?v=ZqNt6fPBwwU)
-
Been trying to get this to work now for a couple days, with no success.Before I even try with the plc, I've been trying to retrieve the data with Talented API Tester, a google chrome extension. I'm following the above attached instructions to the letter , i think, with no success. I keep getting a "message": "Invalid authentication credentials". Any ideas what I'm doing wrong? attached screen shot of GET attempt. I did insert the correct key and secret.
-
Not that it helps a whole lot but I use Postman for testing APIs. This is a client application. Postman shows you how the actual request looks and it might have some helpful troubleshooting tools for you.
-
I'm using postman as well. How can I display what the actual request looks like?
-
Look for the angle brackets at the right edge of the Postman application, see attached screenshot.
You may already have seen that API data access is very different between systems. Both in terms of syntax and authentication. Some don't require any authentication while others do. And the authentication methods are different. I found a case where the BRX couldn't handle the authentication because the JSON Web Token was too big for the BRX to handle.
-
Thanks for the guidance, I finally got everything to work as it should with the postman app. Now I can't get it to work with the BRX plc. I've attached screenshots of the successful GET with postman, and also the gibberish that is returned with the plc. Any suggestions what I need to change in the domore instruction?
-
This is an HTTPS request.
In the HTTPCMD, under TCP Connection, select Use SSL/TLS. This will change the TCP port number to 443.
Now cross your fingers and try again.
-
That was indeed the issue. Now it's working great. Thanks again for the help.