Yeah I kind of thought it would be as easy as the code I had - that was from an example I saw when I started reading up on JSON earlier.
I'm not that bothered about getting it into Saratoga for now - just a formatted (xml, csv) type of file would be fine. Getting it into SQL/MariaDB would be great!
Point for trying!
Ok. Lets see where we can start.
On your server, 192.168.1.100, in home root, make a folder called "weatherstation" and place "updateweatherstation.php" in that folder, so this is a valid path:
192.168.1.100/weatherstation/updateweatherstation.php
updateweatherstation.php shall contain this:
<?php
$queryString = $_SERVER['QUERY_STRING'];
parse_str($queryString, $output);
$jsonformat = json_encode($output);
$jsonFile = fopen("data.json", "w") or die("Unable to open file!");
fwrite($jsonFile, $jsonformat);
fclose($jsonFile);
http_response_code(200);
?>
Please note, above is just for testing, script should be protected against attacks but you should be fine since its on your own server not exposed to the world, yes?
In WS View, select "Wunderground" as protocol and type in 192.168.1.100 as hostname, port 80. Click save and finish.
Above should generate a JSON-file in 192.168.1.100/weatherstation with latest data.
Regards