DusanH
January 22, 2024, 12:53pm
1
Hello,
Please help a newbie without much programing knowledge
I’d like to show some data from PV - SolarEdge API.
I figured out this URL which has all the the data.
https://monitoringapi.solaredge.com/site/2948632/overview?api_key={MY_API_KEY}
How to show one or two numbers in a tile?
Regards,
Dusan
josh
January 22, 2024, 4:08pm
3
Hi @DusanH welcome to the community and thanks for posting. I’ve edited your post to redact your API Key.
It looks like the Solar Edge API supports requesting JSON format by appending .json to the path. So in your case, the URL would look like
https://monitoringapi.solaredge.com/site/2948632/overview.json?api_key={MY_API_KEY}
You can use that along with an HTTP Action within a rule to retrieve the data from the API:
In this case, it looks like the API returns a response like:
{
"overview": {
"lastUpdateTime": "2024-01-22 17:00:22",
"lifeTimeData": {
"energy": 19257584
},
"lastYearData": {
"energy": 344912
},
"lastMonthData": {
"energy": 344912
},
"lastDayData": {
"energy": 23951
},
"currentPower": {
"power": 0
},
"measuredBy": "INVERTER"
}
}
So you could retrieve the lastDayData
, for example, with the following variable (where you would select Context Variable → Response → HTTP and enter just the path: overview.lastDayData.energy
)
$context.response.data.overview.lastDayData.energy
DusanH
January 23, 2024, 1:46pm
4
Thank you !!!
Made it work and i’ll write this solution with screenshots in one old SolarEdge topic in Smartthings these days
1 Like