SAJ Solar inverter


I’m new in HomeAssistant and in a first step I’m trying to add all my available components into HA. In a second step I’ll start with automating this components.
No I want to add the data off my solar panels, but I can’t find a component for my inverter “SAJ Sununo”.

After some research I found there is a way to get the output of the inverter . If I go the http://ipofinvertor/status/status.php I receive a string value with all the data comma separated. With the call, I must enter the admin credentials.

Is there any component I can use where I can input this data and I will see the data of my solar panels?


1 Like

Would like also to have this… Did you manage to get anything?

Nope, I haven’t found a way to do this.
Unfortunately I don’t have the knowledge (and time to learn) to program in Python, so I’m not able to create a custom_component.


I’m also interested in monitoring SAJ inverter.
Any progress in this area?

Best regards

1 Like


Here is a method to add SAJ solar inverter into HA.

Need a Rest sensor to pull data from the inverter.

The code below goes to sensor.yaml

- platform: rest
  resource: http://INVERTER.IP.ADDRESS/status/status.php
  name: SAJ
  username: admin
  password: admin
  authentication: basic

After this we need to format the information because it’s a mess.

- platform: template
      friendly_name: Total power generated
      value_template: "{{ states.sensor.saj.state.split(',')[1] | float / 100 }}"
      unit_of_measurement: 'kWh'
- platform: template
      friendly_name: Today power generated
      value_template: "{{ states.sensor.saj.state.split(',')[3] | float / 100 }}"
      unit_of_measurement: 'kWh'
- platform: template
      friendly_name: Grid-connected power
      value_template: "{{ states.sensor.saj.state.split(',')[23] | float}}"
      unit_of_measurement: 'W'
- platform: template
      friendly_name: Inverter temperature
      value_template: "{{ states.sensor.saj.state.split(',')[32] | float / 10}}"
      unit_of_measurement: '℃'
- platform: template
      friendly_name: CO2 emission reduction
      value_template: "{{ states.sensor.saj.state.split(',')[33] | float / 10000}}"
      unit_of_measurement: 'ton'

This method is working for me.


Thanks. Will soon give it a try.

I have tested it, it works great. Thanks!!

Do you have any great lovelace dashboard? :smiley:

I’m using the mini-graph-card on Lovelace UI.

1 Like

I must be doing something wrong…

Only getting this as result…

<!-- Copyright (c) 2009-2011 Texas Instruments Incorporated. All rights reserved. --> <html> <body bgcolor="white"> <center> <h1>404 - file not found</h1> <h3>Go <a href="/">here</a> instead.</h3> </center> </body> </html>

also some errors in the log, but they do not make sense as it as about the templated sensors.

When I enter the IP adress directly in the browser I do see the Solar inverter page. no login required.
as login I tried to use the admin/admin and the login i normaly use for the esolar app. none of that worked. Should I remove the last 3 lines with user/psw/auth?

After digging around. I noticed there is a xml file I can access. I am not really familiair with coding or get data out of a xml. But maybe someone can tell me what to do with it…

so the adress is http://192.168.XXX.XX/real_time_data.xml

and it shows me:

1 Like

If you can access without login page just delete the username, password and authentication lines.

Please note that the esolar app has a different username and password than the inverter itself. The inverter default username and password is admin/admin.

@jeanbart since HA version 0.100 there is a saj component available that I’ve written.

Today when I read this topic, I realized that there is a difference between saj inverters that are connected via WiFi and those that are connected via ethernet cable…
Looks like the WiFi connected ones are available for readout via /status/status.php
On the other hand via ethernet cable it’s available via /real_time_data.xml

Also the WiFi ones have a default username and password (admin/admin) where the ethernet ones don’t need any credentials…

Currently the saj component only works with inverters that are connected via ethernet as it reads out /real_time_data.xml without any credentials.

@csarlifilpo could you verify that your saj inverter is connected via WiFi instead of ethernet?
Could you also send me the output of /i18n/en/status.xml?
It would be better to read and parse xml than csv in my opinion.

Once I have confirmation about all this I will have a look to adjust the component so it’s compatible with both ways!

1 Like

Yes. This made it very easy for me! Thanks!!! Will look into it later on. :smiley:

@fredericvl I connect via WiFi to the inverter.

Here is the output of /i18n/en/status.xml
(need admin/admin credentials to access the page)

<po><m k="statusTittle" v="Device Status"/><m k="statistics" v="Statistics"/><m k="totalGen" v="Total generated"/><m k="totalRunTime" v="Total Running Time"/><m k="todayGen" v="Today generated"/><m k="todayRunTime" v="Today Running Time"/><m k="DCinput" v="DC Input"/><m k="PV1vol" v="PV1 Voltage"/><m k="PV1cur" v="PV1 Current"/><m k="PV2vol" v="PV2 Voltage"/><m k="PV2cur" v="PV2 Current"/><m k="PV3vol" v="PV3 Voltage"/><m k="PV3cur" v="PV3 Current"/><m k="PV1StrCurr1" v="PV1 StrCurr1"/><m k="PV1StrCurr2" v="PV1 StrCurr2"/><m k="PV1StrCurr3" v="PV1 StrCurr3"/><m k="PV1StrCurr4" v="PV1 StrCurr4"/><m k="PV2StrCurr1" v="PV2 StrCurr1"/><m k="PV2StrCurr2" v="PV2 StrCurr2"/><m k="PV2StrCurr3" v="PV2 StrCurr3"/><m k="PV2StrCurr4" v="PV2 StrCurr4"/><m k="PV3StrCurr1" v="PV3 StrCurr1"/><m k="PV3StrCurr2" v="PV3 StrCurr2"/><m k="PV3StrCurr3" v="PV3 StrCurr3"/><m k="PV3StrCurr4" v="PV3 StrCurr4"/><m k="ACouput" v="AC Output"/><m k="gridConPwr" v="Grid-connected Power"/><m k="gridConFreq" v="Grid-connected Frequency"/><m k="line1vol" v="Line1 Voltage"/><m k="line2vol" v="Line2 Voltage"/><m k="line3vol" v="Line3 Voltage"/><m k="line1cur" v="Line1 Current"/><m k="line2cur" v="Line2 Current"/><m k="line3cur" v="Line3 Current"/><m k="devStatus" v="Other Status"/><m k="runState" v="Running State"/><m k="busvol" v="Bus Voltage"/><m k="devtemp" v="Device Temperature"/><m k="co2red" v="CO<sub>2</sub>emission reduction"/><m k="Statistchart" v="Statist chart"/><m k="chart1" v="Today"/><m k="chart2" v="This month"/><m k="chart3" v="This year"/><m k="chart4" v="Total"/><m k="cx1" v="Time"/><m k="cx2" v="Days"/><m k="cx3" v="Month"/><m k="cx4" v="Year"/><m k="kwh" v="kWh"/><m k="w" v="W"/><m k="m0" v="Not connect"/><m k="m1" v="Waiting"/><m k="m2" v="Normal"/><m k="m3" v="Error"/><m k="m4" v="Upgrading"/><m k="p0" v=""/><m k="p1" v="×10 "/><m k="p2" v="×100 "/><m k="p3" v="×1K "/><m k="p4" v="×10K "/><m k="p5" v="×100K "/><m k="p6" v="×1M "/><m k="p7" v="×10M "/><m k="p8" v="×100M "/><m k="p9" v="×1G "/><m k="u1" v="kWh"/><m k="u2" v="h"/><m k="u3" v="kWh"/><m k="u4" v="h"/><m k="u5" v="V"/><m k="u6" v="A"/><m k="u7" v="V"/><m k="u8" v="A"/><m k="u9" v="V"/><m k="u10" v="A"/><m k="u11" v="A"/><m k="u12" v="A"/><m k="u13" v="A"/><m k="u14" v="A"/><m k="u15" v="A"/><m k="u16" v="A"/><m k="u17" v="A"/><m k="u18" v="A"/><m k="u19" v="A"/><m k="u20" v="A"/><m k="u21" v="A"/><m k="u22" v="A"/><m k="u23" v="W"/><m k="u24" v="Hz"/><m k="u25" v="V"/><m k="u26" v="A"/><m k="u27" v="V"/><m k="u28" v="A"/><m k="u29" v="V"/><m k="u30" v="A"/><m k="u31" v="V"/><m k="u32" v="℃"/><m k="u33" v="Kg"/><m k="mon0" v="Jan"/><m k="mon1" v="Feb"/><m k="mon2" v="Mar"/><m k="mon3" v="Apr"/><m k="mon4" v="May"/><m k="mon5" v="Jun"/><m k="mon6" v="Jul"/><m k="mon7" v="Aug"/><m k="mon8" v="Sep"/><m k="mon9" v="Oct"/><m k="mon10" v="Nov"/><m k="mon11" v="Dec"/></po>

Thanks for your effort!

@fredericvl can you tell which models are supported?
I have the “Sununo-TL3KB” (webserver runs on port 33)

I see the below error in the log.
"ERROR (MainThread) [pysaj] SAJ sensor key maxPower not found, inverter not compatible? "

and only the value filled is “saj_today_yield”

my XML looks like this:
This text will be hidden


@annegerben it’s very hard to tell which models are supported as there is no information about it…
Actually I think it’s not the inverter itself that matters but the module that is plugged into the serial port and hosts a webserver (via WiFi or ethernet cable depending on the module).

Seems like your module does not return the “maxPower” key, but I could work around this in code so it will work for you. I’ll have a look at it.

Thanks for the effort!

Is it possible to provide a naming option? So I can define a name for the sensors.
I have 2 invertors, I hope this naming option will also provide the possibility to add a second invertor into HA.

Hi @sen, I created a PR that includes a configuration parameter to specify a name with the inverter.
I suppose it will be added in the 0.102 release (first beta is scheduled @ 13/11, official release @ 20/11)

Great! Thanks for the work!!

@sen could you do one more thing for me please?
Since you have a WiFi module connected to your inverter, could you send me the full output of http://IP_OF_INVERTER/info.php ?
I’m trying to find a way to get the inverter’s serial number of the inverter, already found it for the ethernet module (equipment_data.xml) but can’t test it for the WiFi module…

1 Like