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

Title: BRX to Davis Weather Station Comms
Post 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
Title: Re: BRX to Davis Weather Station Comms
Post by: Kristjan on December 30, 2022, 04:11:37 AM
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)
Title: Re: BRX to Davis Weather Station Comms
Post by: PLCwannabe on February 05, 2025, 02:50:15 PM
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.
Title: Re: BRX to Davis Weather Station Comms
Post by: Kristjan on February 06, 2025, 06:11:33 AM
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.
Title: Re: BRX to Davis Weather Station Comms
Post by: PLCwannabe on February 06, 2025, 09:36:14 AM
I'm using postman as well. How can I display what the actual request looks like?
Title: Re: BRX to Davis Weather Station Comms
Post by: Kristjan on February 08, 2025, 06:04:28 PM
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.
Title: Re: BRX to Davis Weather Station Comms
Post by: PLCwannabe on February 11, 2025, 02:31:24 PM
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?
Title: Re: BRX to Davis Weather Station Comms
Post by: Kristjan on February 12, 2025, 04:56:33 PM
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.
Title: Re: BRX to Davis Weather Station Comms
Post by: PLCwannabe on February 13, 2025, 05:18:02 PM
That was indeed the issue. Now it's working great. Thanks again for the help.