rlindner / node-red-contrib-sma-webconnect

Node-RED node to query the web interface of SMA inverters
MIT License
13 stars 9 forks source link

SMA Tripower STP8.0-40AV30 has more than 13 Character String ID #29

Open FrankKrick opened 2 years ago

FrankKrick commented 2 years ago

I am working to control my private SMA Tripower inverter using raspi and node-red. I am using node-red-contrib-sma-webconnect and have configured the inverter adding the object ID's according to the instruction into the "sma-webconnect.js" configuration script file. It works with correct values display'd fine for: "6100_00464800": { "name": "phase1_voltage", "divider": 100}

But the inverter spotvalue-page has longer ID's for the DC power readings, which are 15 caraters long configured like this: "6380_40251E00_0":{ "name": "power_string_a", "divider": 1}

The DC string B has following ID:

"6380_40251E00_1":{ "name": "power_string_b", "divider": 1}

See the object as currently is: grafik (no worries for the grit consumptrion and feedin values because I don't have an SMA energy meter connected yet)

See the spotvalue page of the STP8.0 grafik

I am not the script guy and perhaps somebody can help to correct the code or the sma-webconnect.js so I can make use of the DC values. Many Thanks

rlindner commented 2 years ago

Hey @FrankKrick, you do not need to adjust the code of the node, you can just pass a JSON configuration object as described in the readme here: https://github.com/rlindner/node-red-contrib-sma-webconnect#read-custom-values

FrankKrick commented 2 years ago

Hi Roland @rlindner That is what I have done, I have added the different ID's which I need for my monitoring. In the meantime I figured out when I use the 15 char ID (example: 6380_40251E00_0) is describing an array. It should be used as you described in your instructions for configuring the sma-webconnect.js to use the ID without the array indicator like 6380_40251E00. This then shows the values of the payload in an array [2] position 0: for string a and position [1] for string B. That should work for my purpose to simply send a message when a string voltage is permanently below the value of a string as it should be on a good sunny day to indicate defect solar panels.