Read networkbinding xml file from SAJ suntrino inverter

Im new to openhab, and installed it just to monitor my saj inverter… but i got stuck after installing influxdb and network bindings, so it “finds” my inverter but i don’t know how to get it to read the inverters xml file.

The xml file looks like this
(found at http:///real_time_data.xml) for the inverter
the openhab is installed on proxmox, as an ct.










































Found some one that tried on homeassistant


can anyone help me get the final push to get this in openhab, so i can see my graphs?

I suggest to install the XML Transformation.
That should do the trick.

Hi Jorerg

my programing is more or less then basic, i can copy paste :slight_smile: so if you have any more pointers to push me in the right direction ill be happy… :slight_smile:
First id like to do a small script to test it in the console of the openhab, just dry run so it works, and then add database and so on… :slight_smile:

just have a look at:
That should explain it.


Hi @hwvvse,

did you get this work?

OK, I have the connection running and I get data to my items. I didn’t have time to properly organize the data, but here is my item config for my 3-phase inverter (replace the with the IP address of inverter).

Note: I know that there is difference between WiFi and Ethernet connection, username and password needed to be added on the ones with WiFi (I have wired connection so can’t help much there).

//SAJ Solar inverter
Group               groupSolarInverter      "Solar Inverter"            <energy>   (groupLaundryRoom)                                                   
String              SAJ_xml_state           "Solar Inverter state"                 (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Vac_l1          "Solar Inverter Voltage L1"            (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Vac_l2          "Solar Inverter Voltage L2"            (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Vac_l3          "Solar Inverter Voltage L3"            (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Iac_l1          "Solar Inverter Current L1"            (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Iac_l2          "Solar Inverter Current L2"            (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Iac_l3          "Solar Inverter Current L3"            (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Freq_1          "Solar Inverter frequency"             (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_P_l1            "Solar Inverter Power L1"              (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_P_l2            "Solar Inverter Power L2"              (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_P_l3            "Solar Inverter Power L3"              (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Power           "Solar Inverter Power"                 (groupSolarInverter)     {http="<[]"}
Number:Temperature  SAJ_xml_Temperature     "Solar Inverter Temperature"           (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Power_Today     "Solar Inverter Power Today"           (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Time_Today      "Solar Inverter Working Time Today"    (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Power_Total     "Solar Inverter Total Power"           (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Time_Total      "Solar Inverter Total Time"            (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_CO2_Total       "Solar Inverter Total CO2"             (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Vdc_1           "Solar Inverter Voltage DC1"           (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Vdc_2           "Solar Inverter Voltage DC2"           (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Vdc_Bus         "Solar Inverter Voltage DC Bus"        (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Power_Today_Max "Solar Inverter Max Power Today"       (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Idc_1           "Solar Inverter Current DC1"           (groupSolarInverter)     {http="<[]"}
Number              SAJ_xml_Idc_2           "Solar Inverter Current DC2"           (groupSolarInverter)     {http="<[]"}

I am getting more into the OpenHab and actually the right way to configure the SAJ inverter would be:

  1. Define thing:

     Thing http:url:SAJInverter "SAJ Inverter" [ baseURL="", refresh=10, commandMethod="GET"] {        
             Type string :   chSAJ_state          [ stateTransformation="XPath:/real_time_data/state/text()"]
             Type number :   chSAJ_Vac_l1          [ stateTransformation="XPath:/real_time_data/Vac_l1/text()"]
             Type number :   chSAJ_Vac_l2          [ stateTransformation="XPath:/real_time_data/Vac_l2/text()"]
             Type number :   chSAJ_Vac_l3          [ stateTransformation="XPath:/real_time_data/Vac_l3/text()"]
             Type number :   chSAJ_Iac_l1          [ stateTransformation="XPath:/real_time_data/Iac_l1/text()"]
             Type number :   chSAJ_Iac_l2          [ stateTransformation="XPath:/real_time_data/Iac_l2/text()"]
             Type number :   chSAJ_Iac_l3          [ stateTransformation="XPath:/real_time_data/Iac_l3/text()"]
             Type number :   chSAJ_Freq_1          [ stateTransformation="XPath:/real_time_data/Freq1/text()"]
             Type number :   chSAJ_P_l1            [ stateTransformation="XPath:/real_time_data/pac1/text()"]
             Type number :   chSAJ_P_l2            [ stateTransformation="XPath:/real_time_data/pac2/text()"]
             Type number :   chSAJ_P_l3            [ stateTransformation="XPath:/real_time_data/pac3/text()"]
             Type number :   chSAJ_Power           [ stateTransformation="XPath:/real_time_data/p-ac/text()"]
             Type number :   chSAJ_Temperature     [ stateTransformation="XPath:/real_time_data/temp/text()"]
             Type number :   chSAJ_Power_Today     [ stateTransformation="XPath:/real_time_data/e-today/text()"]
             Type number :   chSAJ_Time_Today      [ stateTransformation="XPath:/real_time_data/t-today/text()"]
             Type number :   chSAJ_Power_Total     [ stateTransformation="XPath:/real_time_data/e-total/text()"]
             Type number :   chSAJ_Time_Total      [ stateTransformation="XPath:/real_time_data/t-total/text()"]
             Type number :   chSAJ_CO2_Total       [ stateTransformation="XPath:/real_time_data/CO2/text()"]
             Type number :   chSAJ_Vdc_1           [ stateTransformation="XPath:/real_time_data/v-pv1/text()"]
             Type number :   chSAJ_Vdc_2           [ stateTransformation="XPath:/real_time_data/v-pv2/text()"]
             Type number :   chSAJ_Vdc_Bus         [ stateTransformation="XPath:/real_time_data/v-bus/text()"]
             Type number :   chSAJ_Power_Today_Max [ stateTransformation="XPath:/real_time_data/maxPower/text()"]
             Type number :   chSAJ_Idc_1           [ stateTransformation="XPath:/real_time_data/i-pv11/text()"]
             Type number :   chSAJ_Idc_2           [ stateTransformation="XPath:/real_time_data/i-pv21/text()"]
  2. Define the items

     //SAJ Solar inverter
     Group               grpSolarInverter      "Solar Inverter"            <solarplant>                                                    
     String              SAJ_state           "Solar Inverter state"                          (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_state"}
     Number              SAJ_Vac_l1          "Solar Inverter Voltage L1 [%.0f V]"            (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Vac_l1"}
     Number              SAJ_Vac_l2          "Solar Inverter Voltage L2 [%.0f V]"            (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Vac_l2"}
     Number              SAJ_Vac_l3          "Solar Inverter Voltage L3 [%.0f V]"            (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Vac_l3"}
     Number              SAJ_Iac_l1          "Solar Inverter Current L1 [%.1f A]"            (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Iac_l1"}
     Number              SAJ_Iac_l2          "Solar Inverter Current L2 [%.1f A]"            (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Iac_l2"}
     Number              SAJ_Iac_l3          "Solar Inverter Current L3 [%.1f A]"            (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Iac_l3"}
     Number              SAJ_Freq_1          "Solar Inverter frequency [%.1f Hz]"            (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Freq_1"}
     Number              SAJ_P_l1            "Solar Inverter Power L1 [%.0f W]"              (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_P_l1"}
     Number              SAJ_P_l2            "Solar Inverter Power L2 [%.0f W]"              (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_P_l2"}
     Number              SAJ_P_l3            "Solar Inverter Power L3 [%.0f W]"              (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_P_l3"}
     Number              SAJ_Power           "Solar Inverter Power [%.0f W]"                 (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Power"}
     Number:Temperature  SAJ_Temperature     "Solar Inverter Temperature [%.1f °C]"          (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Temperature"}
     Number              SAJ_Power_Today     "Solar Inverter Power Today [%.1f kWh]"         (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Power_Today"}
     Number              SAJ_Time_Today      "Solar Inverter Working Time Today [%.1f h]"    (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Time_Today"}
     Number              SAJ_Power_Total     "Solar Inverter Total Power [%.1f kWh]"         (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Power_Total"}
     Number              SAJ_Time_Total      "Solar Inverter Total Time [%.1f h]"            (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Time_Total"}
     Number              SAJ_CO2_Total       "Solar Inverter Total CO2 [%.1f kg]"            (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_CO2_Total"}
     Number              SAJ_Vdc_1           "Solar Inverter Voltage DC1 [%.0f V]"           (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Vdc_1"}
     Number              SAJ_Vdc_2           "Solar Inverter Voltage DC2 [%.0f V]"           (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Vdc_2"}
     Number              SAJ_Vdc_Bus         "Solar Inverter Voltage DC Bus [%.0f V]"        (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Vdc_Bus"}
     Number              SAJ_Power_Today_Max "Solar Inverter Max Power Today [%.0f kW]"      (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Power_Today_Max"}
     Number              SAJ_Idc_1           "Solar Inverter Current DC1 [%.1f A]"           (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Idc_1"}
     Number              SAJ_Idc_2           "Solar Inverter Current DC2 [%.1f A]"           (grpSolarInverter)     {channel="http:url:SAJInverter:chSAJ_Idc_2"}

I note some also some other fields in the xml, however they are empty in my case so I ignored them.
Also I am connected on ethernet and I know that WiFi connection requires also authentication, which should be configured in the thing (see HTTP - Bindings | openHAB)
XPATH transformation is needed for this to work properly.

1 Like

No, ive sold my saj, and got a solax x3 hybrid with batteries :slight_smile:
Just starting it, so now i want it in openhab… but solax has an open api… should be better…

What type of SAJ inverter do you have? Here with me it doesn’t seem to work. Would it be needed to upgrade the SAJ firmware if that’s even possible?
I have a Sununo Plus 4K

This is what I get from the inverter web page. I didn’t do any firmware updates, and that thing is blocked by my firewall from all Internet traffic, so no automatic updates also

  Model:	Suntrio Plus 10K
  Grid Compliance:	C10_11
  Maste Control Firmware Ver:	V2.011
  Slave Control Firmware Ver:	V2.011
  Display Board Firmware Ver:	V3.006
  Ethernet Module Firmware Ver:	V1.018

try to see if you can reach the following:

http://"IP address of your inverter"/real_time_data.xml

I get

real_time_data class=" FB_FW_ext eidReader">

Thanks for your quick respons @DarkoG
The Inverter is reachable I get this xml data:

This XML file does not appear to have any style information associated with it. The document tree is shown below.








































The log gives me this error

2024-01-18 10:24:47.941 [WARN ] [.transform.SingleValueTransformation] - Transformation service XPATH for pattern /real_time_data/t-total/text() not found!

2024-01-18 10:24:47.941 [WARN ] [.transform.SingleValueTransformation] - Transformation service XPATH for pattern /real_time_data/Vac_l2/text() not found!

2024-01-18 10:24:47.942 [WARN ] [.transform.SingleValueTransformation] - Transformation service XPATH for pattern /real_time_data/pac1/text() not found!

2024-01-18 10:24:47.943 [WARN ] [.transform.SingleValueTransformation] - Transformation service XPATH for pattern /real_time_data/pac3/text() not found!

2024-01-18 10:24:47.944 [WARN ] [.transform.SingleValueTransformation] - Transformation service XPATH for pattern /real_time_data/p-ac/text() not found!

2024-01-18 10:24:47.945 [WARN ] [.transform.SingleValueTransformation] - Transformation service XPATH for pattern /real_time_data/e-total/text() not found!

2024-01-18 10:24:47.945 [WARN ] [.transform.SingleValueTransformation] - Transformation service XPATH for pattern /real_time_data/v-pv1/text() not found!

2024-01-18 10:24:47.946 [WARN ] [.transform.SingleValueTransformation] - Transformation service XPATH for pattern /real_time_data/v-bus/text() not found!

2024-01-18 10:24:47.947 [WARN ] [.transform.SingleValueTransformation] - Transformation service XPATH for pattern /real_time_data/Freq1/text() not found!

2024-01-18 10:24:47.948 [WARN ] [.transform.SingleValueTransformation] - Transformation service XPATH for pattern /real_time_data/v-pv2/text() not found!

You need to install the XPATH transformation from the addons in Openhab

1 Like

Yes now it works.
Thank you so much

By any chance, does someone knows if this also works for SAJ inverters from the R-series.
These are newer but seem not to have a webinterface where one can read out this data.