SolarEdge WEB API not working?

Moderator: leecollings

Post Reply
romix
Posts: 11
Joined: Saturday 21 May 2016 12:06
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Contact:

SolarEdge WEB API not working?

Post 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.
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: SolarEdge WEB API not working?

Post 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 :-)
User avatar
jvdz
Posts: 2189
Joined: Tuesday 30 December 2014 19:25
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.107
Location: Netherlands
Contact:

Re: SolarEdge WEB API not working?

Post 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.
New Garbage collection scripts: https://github.com/jvanderzande/GarbageCalendar
romix
Posts: 11
Joined: Saturday 21 May 2016 12:06
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Contact:

Re: SolarEdge WEB API not working?

Post 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.
romix
Posts: 11
Joined: Saturday 21 May 2016 12:06
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Contact:

Re: SolarEdge WEB API not working?

Post 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?
freijn
Posts: 536
Joined: Friday 23 December 2016 16:40
Target OS: Raspberry Pi / ODroid
Domoticz version: Stable
Location: Netherlands Purmerend
Contact:

Re: SolarEdge WEB API not working?

Post 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.
romix
Posts: 11
Joined: Saturday 21 May 2016 12:06
Target OS: Raspberry Pi / ODroid
Domoticz version: Latest
Contact:

Re: SolarEdge WEB API not working?

Post 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
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest