Page 1 of 1
SolarEdge WEB API not working?
Posted: Tuesday 17 March 2020 18:45
by romix
Hi, I have obtained a site API key for our SolarEdge installation.
I can pull data from the solaredge api site through:
https://monitoringapi.solaredge.com/sit ... MY_API_KEY
Domoticz (v. 4.9701) produces
SolarEdgeAPI: Error getting http data!
Am I missing something or is the "SolarEdge via Web API" hardware plug-in broken.
I can't enter the site_Id in this plug-in, btw. Including the Site_id seems necessary for SolarEdge to return data.
Re: SolarEdge WEB API not working?
Posted: Tuesday 17 March 2020 20:51
by freijn
Romix
Depending on your scripting knowledge have a look at this :
https://www.domoticz.com/forum/viewtopi ... 65&t=31455
Requirement is to enable Mobus over TCP but then you can have 5 seconds updates

Re: SolarEdge WEB API not working?
Posted: Tuesday 17 March 2020 20:54
by jvdz
D@Romix,
Did you follow the steps in de Wiki description:
https://www.domoticz.com/wiki/SolarEdge to use the internal available hardware?
That worked for me when I set it up a year ago.
Re: SolarEdge WEB API not working?
Posted: Wednesday 18 March 2020 12:37
by romix
It is actually something else. I looked at the source code for the SolarEdge Web API.
It starts pulling data in this part
sURL << "
https://monitoringapi.solaredge.com/sit ... 1&api_key=" << m_APIKey << "&format=application/json";
if (!HTTPClient::GET(sURL.str(), sResult))
{
_log.Log(LOG_ERROR, "SolarEdgeAPI: Error getting http data!");
return false;
}
If I enter the https call in my browser with my Api key, it returns correct (valid) data for my site. However, Domoticz thinks there is an error in the return as it spits out the LOG_ERROR above.
Re: SolarEdge WEB API not working?
Posted: Wednesday 18 March 2020 13:20
by romix
When running curl from the raspi with the right cal produced by domoticz >
https://monitoringapi.solaredge.com/sit ... tion/jsonl
Solaredge returns:
Welcome to Apache Tomcat - Error report
>This request requires HTTP authentication ()
Now we're getting somewhere?
Re: SolarEdge WEB API not working?
Posted: Wednesday 18 March 2020 13:21
by freijn
Hi Romix,
Not sure on your os for Domoticz but do a curl with the same HTTP request and see if your domoticz can reach the Solaredge as well ?
it looks like, for the info you are telling us that the Domoticz can't reach Solaredge website.
Re: SolarEdge WEB API not working?
Posted: Wednesday 18 March 2020 16:08
by romix
For now I found another solution.
This python script works fine:
https://github.com/scns/SolarEdge-Domot ... r/solar.py
I will use this as a starting point for crafting what I want