Reading data from a webpage

I’m in the learning phase and not sure of the right terms to use, so please be gentle! My weather station creates a webpage (local on my LAN, not on the Internet) that reports all the data it has. It refreshes the data every few seconds.

Wouldn’t it be easy for ignition to read values from this webpage? What is this process called? Where do I learn more about how to do that?

Use system net httpGet to get the page as a string and then parse it.
Both 7.9 and 8.x have examples in the docs

https://docs.inductiveautomation.com/display/DOC79/system.net.httpGet

https://docs.inductiveautomation.com/display/DOC80/system.net.httpGet

1 Like

It is called web scraping, if you are looking for further help.

1 Like

This weather station of yours that creates a webpage - did you create it or is it some auto generated page that came prepackaged?

If it’s your creation and you’re able to edit the server side, I would create an API endpoint that sends you the data in a JSON format when you request from it.

It’s a prepacked page. There’s a webserver in the observerIP box.

This guy redirected his traffic going to WxUnderground. He originally web scraped, but that link is dead, and the Wayback Machine is slow today.

1 Like

the weather station webpage that I posted a picture of is autogenerated

the weather station also has an API available

I’m just poking around trying to learn, not sure of the best way to do things.