NodeID and ChildID function in SolarEdgeAPI.cpp code

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
vbreemen
Posts: 2
Joined: Thursday 15 April 2021 9:34
Target OS: Windows
Domoticz version:
Location: Netherlands
Contact:

NodeID and ChildID function in SolarEdgeAPI.cpp code

Post 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
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: NodeID and ChildID function in SolarEdgeAPI.cpp code

Post 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.
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest