Page 1 of 1

NodeID and ChildID function in SolarEdgeAPI.cpp code

Posted: Thursday 15 April 2021 9:59
by vbreemen
Hi all,

I needed some more detail in what data the SolarEdge PV inverter sends.
Copied the Windows source to my local PC and added code in SolarEdgeAPI.cpp for a few parameters:
powerLimit (%)
inverterMode (text like OFF, MPPT, THROTTLED, FAULT)
acCurrent (A)
groundFaultResistance (Ohm)

Works well. I get the data I want now.
Wat I'm not sure about and want to sort out before even trying to get this in the repository:

What's the relevance of the first two call parameters NodeID and ChildID in the various Send*Sensor procedures?
Looking at the code and what the various devices report as ID in Domoticz I see duplicates and no real logic.
I've fixed it for me now like below, making sure each sensor gets an unique ChildID.

int ChildIdNr = 0;
SendPercentageSensor(iInverterNumber, ++ChildIdNr, 255, powerLimit, szTmp);

It's just that I'm pretty fresh here, touched Domoticz code never before and don't know its architecture yet.

regards,
Maarten

Re: NodeID and ChildID function in SolarEdgeAPI.cpp code

Posted: Thursday 15 April 2021 10:35
by waaren
vbreemen wrote: Thursday 15 April 2021 9:59 What's the relevance of the first two call parameters NodeID and ChildID in the various Send*Sensor procedures?
Probably best to ask this question on the domoticz github.