Temperature - can it be set in the UK?

I see that wunderground is no longer supporting our setup.

can anyone point me to a simple writeup of how to edit which settings to get the UK temperature please?

“Temperature” appears as a legend on the live data, yet there is no line on the picture to show it.

If you know a bit of python scripting you could use DarkSky data?

Below is the script I use to fire data up to PVO.
https://forum.pvoutput.org/t/emoncms-pvoutput-python-script/1509/2

Thank you - I haven’t really progressed beyond C though I’m sure I can eventually find my way around it. Just seems a bit of a sledgehammer to record one field (temperature) from some public website every few minutes.

Hi,

It appears as though the Met Office provide access to their data via an API https://www.metoffice.gov.uk/datapoint/getting-started

It should be simple enough to extract the current temperature for a given location and then push that data to PVOutput via v5.

You will need to register though to obtain an API Key. I guess this allows them to keep an eye on users.

To amuse myself I’ve written a script to extract the ‘current’ temperature from Met Office’s data using their API. I want to run it for a couple of days to make sure that there are no ‘bugs’ before I make it available - something went strange at midnight UTC which I am still trying to unravel. I will need to wait until at least midnight [ UTC ] tonight to ensure I have fixed the problem.

The blue coloured line is the temperature in Hereford. The date and time are my local [ +08:00 ] time and not UTC. The Met Office data is updated hourly hence the “stepped” nature of the curve. I am logging the Met Office data to v11 so as not to upset my actual recorded temperature. Hereford was just a random choice!

The PHP script will need to be run periodically [ every 5 minutes ] from a computer than runs 24 x 7 and that supports PHP script processing. The script could be modified to produce a ‘smooth’ or interpolated curve however the values could only be updated after the hour was complete - I’m not sure if this would achieve anything.

It is easy enough to register and obtain an API key. The only minor issue is that the Met Office API calls relies upon http rather than https so it is possible, although unlikely, that someone to ‘harvest’ your API key and misuse it.

N.B. The dates and times shown on the chart are my local time so 00:00 UTC corresponds to 08:00WST. I haven’t built a time machine.

1 Like

Will certainly look forward to seeing the script when you are happy with it. thank you!

All.

The script appears to be working correctly.

I placed a copy of the PHP script on at https://github.com/grann0s/getMetOfficeTemperature

Please read the README carefully - Changes will need to be made to the script if your aren’t a PVOutput Donor [ https://pvoutput.org/help.html#donations ]

The script also needs to be populated with YOUR particulars. API keys, timezone et cetera.

Good luck

2 Likes