I would like to read in the values from the forecast.solar website in order to determine the sun’s strongest hours of the day.
The JSON looks something like this:
{
"result":{
"watts":{
"2022-02-21 07:18:00":0,
"2022-02-21 07:39:00":57,
"2022-02-21 08:00:00":281,
"2022-02-21 09:00:00":533,
"2022-02-21 10:00:00":655,
"2022-02-21 11:00:00":747,
"2022-02-21 12:00:00":776,
"2022-02-21 13:00:00":485,
"2022-02-21 14:00:00":273,
"2022-02-21 15:00:00":252,
"2022-02-21 16:00:00":215,
"2022-02-21 17:00:00":108,
"2022-02-21 17:30:00":21,
"2022-02-21 18:00:00":0,
"2022-02-22 07:16:00":0,
"2022-02-22 07:38:00":32,
"2022-02-22 08:00:00":154,
"2022-02-22 09:00:00":230,
"2022-02-22 10:00:00":270,
"2022-02-22 11:00:00":323,
"2022-02-22 12:00:00":355,
"2022-02-22 13:00:00":342,
"2022-02-22 14:00:00":298,
"2022-02-22 15:00:00":235,
"2022-02-22 16:00:00":171,
"2022-02-22 17:00:00":95,
"2022-02-22 17:31:00":20,
"2022-02-22 18:01:00":0
},
"watt_hours":{
"2022-02-21 07:18:00":0,
"2022-02-21 07:39:00":20,
"2022-02-21 08:00:00":118,
"2022-02-21 09:00:00":651,
"2022-02-21 10:00:00":1306,
"2022-02-21 11:00:00":2053,
"2022-02-21 12:00:00":2829,
"2022-02-21 13:00:00":3314,
"2022-02-21 14:00:00":3587,
"2022-02-21 15:00:00":3839,
"2022-02-21 16:00:00":4054,
"2022-02-21 17:00:00":4162,
"2022-02-21 17:30:00":4173,
"2022-02-21 18:00:00":4173,
"2022-02-22 07:16:00":0,
"2022-02-22 07:38:00":12,
"2022-02-22 08:00:00":68,
"2022-02-22 09:00:00":298,
"2022-02-22 10:00:00":568,
"2022-02-22 11:00:00":891,
"2022-02-22 12:00:00":1246,
"2022-02-22 13:00:00":1588,
"2022-02-22 14:00:00":1886,
"2022-02-22 15:00:00":2121,
"2022-02-22 16:00:00":2292,
"2022-02-22 17:00:00":2387,
"2022-02-22 17:31:00":2398,
"2022-02-22 18:01:00":2398
},
"watt_hours_day":{
"2022-02-21":4173,
"2022-02-22":2398
}
},
"message":{
"code":0,
"type":"success",
"text":"",
"info":{
"latitude":11.1111,
"longitude":12.222,
"place":"PLZ Stadt, DE",
"timezone":"Europe/Berlin"
},
"ratelimit":{
"period":3600,
"limit":12,
"remaining":0
}
}
}
What I need is the time of the two to three sun strongest hours a day. In these hours I want to control different processes via Openhab. I have now tried a few things with JSONPATH, but do not really get anywhere. What is the best way to approach the problem?
Christian