Scrape temperature data from website

I worked with someone a while back and this is what I arrived at that worked, I had since then removed influxdb so I can’t test it anymore. I did save the piston though, it does look like it’s missing something in the payload.

image

Thanks. I’ve tried quite a few options, but unable to get past a log error of “Error executing external web request: groovyx.net.http.HttpResponseException: Internal Server Error”. Please could you share the settings within the pistons ‘post request’ window that don’t show up above. For example I am using Auth header with a base64 encoded username and password. Do you recall the structure of the {data} variable at all? Thanks for the pointers!

Thanks for the earlier pointers in this thread.

After a lot of trial and error I now have working pistons. The logs still show an unexpected error (Error executing external web request: java.lang.IllegalArgumentException: Response does not contain data), but the data is being stored in the hosted InfluxDB instance.

Here are two pistons in case they are useful for anyone. The first is more straightforward, with the second converting open/closed contact states to binary which is easier to work with in Grafana. It also shows how to generate the newline formatting needed to upload multiple data points in one json post.

The AuthHeader consists of a base64 encoded username and password string which you can generate online.

So, I now have a Grafana dashboard reading data from InfluxDB, covering lighting, temperatures, heating state, electric use, UK Carbon intensity, etc…