Dear All

I wrote a python script, executing each day at midnight to grab the SolCast PV power forecast for the next two days and publishing it to emonpi with MQTT.

Solcast gives this forecast format in JSON for the next two days each 30 minutes.

Of course the timestamp of the SolCast JSON is in UTC, with the Z at the end.

Actually with the summer time, these forecasts are shifted 2 hours viewing them in Emoncms runnign locally on the Raspberry.

On this graph the time is clearly Local Time, i.e. CET when observing the PV production.

I do not understand why the forecast is shifted + 2 hours, because if the JSON timestamp is taken as CET rather than UTC, it should be 2 hours ahead no ?

As I parse the Solcast JSON already because SolCast allows only two roofs and I have three so I compute the three roofs forecast from one with sine/cosine equations, I can also modify the timestamp to align the forecast to the production.

But before doing this kind of patch it is always better to understand the root cause, no ?

Thanks for your support !

Regards

Christophe

For info the raw Solcast JSON is like this (for now 19h28 CET)

{â€śforecastsâ€ť:[{â€śpv_estimateâ€ť:0.1323,â€śpv_estimate10â€ť:0.0831,â€śpv_estimate90â€ť:0.1723,â€śperiod_endâ€ť:â€ś2024-07-31T17:30:00.0000000Zâ€ť,â€śperiodâ€ť:â€śPT30Mâ€ť},{â€śpv_estimateâ€ť:0.1062,â€śpv_estimate10â€ť:0.0735,â€śpv_estimate90â€ť:0.1212,â€śperiod_endâ€ť:â€ś2024-07-31T18:00:00.0000000Zâ€ť,â€śperiodâ€ť:â€śPT30Mâ€ť},{â€śpv_estimateâ€ť:0.03,â€śpv_estimate10â€ť:0.0172,â€śpv_estimate90â€ť:0.0486,â€śperiod_endâ€ť:â€ś2024-07-31T18:30:00.0000000Zâ€ť,â€śperiodâ€ť:â€śPT30Mâ€ť},{â€śpv_estimateâ€ť:0.0089,â€śpv_estimate10â€ť:0.0045,â€śpv_estimate90â€ť:0.0118,â€śperiod_endâ€ť:â€ś2024-07-31T19:00:00.0000000Zâ€ť,â€śperiodâ€ť:â€śPT30Mâ€ť}, â€¦

And before publishing to mqtt I already remove the â€śperiodâ€ť:â€śPT30Mâ€ť as well as some zeroes on the time stamp, and rename the â€śperiod_endâ€ť as â€śtimeâ€ť

And the emonpi datetime is

Correct to the local time here.