Hi,
I hope you can help, I’m trying to get data from my Solar Inverter via the Solarman API. I can see the data when I run a curl command online but I’ve no idea how to get this into Home Assistant.
I have tried playing around with RESTful, command sensor etc but I think I’m doing it all wrong.
This is the curl request I send
curl --request POST \
--url 'https://api.solarmanpv.com/device/v1.0/currentData?appId=<SECRETID>&language=en&=' \
--header 'Authorization: bearer <SECRET AUTH>' \
--header 'Content-Type: application/json' \
--data '{
"deviceSn": "<SECRET SN>"
}'
When running this I get a huge list of results that look like this;
{
"code": null,
"msg": null,
"success": true,
"requestId": "secret",
"deviceSn": "secret",
"deviceId": secret,
"deviceType": "INVERTER",
"deviceState": 1,
"dataList": [{
"key": "SN1",
"value": "secret",
"unit": null,
"name": "SN"
}, {
"key": "SS_CY1",
"value": "16",
"unit": null,
"name": "Production Compliance Country"
}, {
"key": "SWmai_v1",
"value": "V260",
"unit": null,
"name": "Software Master Version"
}
Can someone please assist me with getting this data into Home Assistant as sensors?
Thank you