SAJ Solar inverter

Hi Frederic,

I’ve added the SAJ integration in HA (using docker compose, raspbian buster, RPI2, HA core-2021.3.4, SAJ inverter ethernet connected).

The integration seems to work well (added it during the night) and it polls the SAJ every few minutes. Today during the first day, however, if noticed the parameters saj_current_power, saj_state, saj_today_time, saj_today_yield giving 0 while the inverter is in operation.
Only after a restart of HA, the readings appear to be correct.

Does it mean I should be restarting HA every night in order to get correct readings from the SAJ, only after sunrise when the SAJ is awake, or is there something else we can do to amend this?

for your information, I’m posting you the xml files equipment

<equipment_data>
<Model>Sununo Plus 3K-M</Model>
<Max_DC_POWER>3500</Max_DC_POWER>
<Max_DC_Volt>600</Max_DC_Volt>
<DC_Current_String>&nbsp&nbspMax.DC Current Input/Per String</DC_Current_String>
<DC_Current_Content>11A/11A</DC_Current_Content>
<DC_Conn_Sets>1/1</DC_Conn_Sets>
<Num_MPPT>2</Num_MPPT>
<Rated_AC_Power>3000</Rated_AC_Power>
<Rated_AC_Current>13.6</Rated_AC_Current>
<Power_Factor>>0.99(full load)</Power_Factor>
<Consum_Night><0.2</Consum_Night>
<Max_Eff>97.4%</Max_Eff>
<Euro_Eff>97.0%</Euro_Eff>
<Grid_comp> C10_11 </Grid_comp>
<MFMW>V1.116</MFMW>
<SFMW>V1.116</SFMW>
<DFMW>V1.272</DFMW>
<SN>13020J2020EN09010</SN>
<Product_Code>SU03KMTL2EN6SD0000</Product_Code>
<eth_ver>V1.036</eth_ver>
</equipment_data>

and realtime data

<real_time_data>
<state>Normal</state>
<Vac_l1>241.1</Vac_l1>
<Vac_l2>-</Vac_l2>
<Vac_l3>-</Vac_l3>
<Iac_l1>9.54</Iac_l1>
<Iac_l2>-</Iac_l2>
<Iac_l3>-</Iac_l3>
<Freq1>49.98</Freq1>
<Freq2>-</Freq2>
<Freq3>-</Freq3>
<pac1>2303</pac1>
<pac2>-</pac2>
<pac3>-</pac3>
<p-ac>2303</p-ac>
<temp>46.8</temp>
<e-today>12.55</e-today>
<t-today>6.8</t-today>
<e-total>586.85</e-total>
<CO2>585.09</CO2>
<t-total>1278.7</t-total>
<v-pv1>240.7</v-pv1>
<v-pv2>180.8</v-pv2>
<v-pv3>-</v-pv3>
<v-bus>378.6</v-bus>
<maxPower>2930</maxPower>
<i-pv11>5.34</i-pv11>
<i-pv12>-</i-pv12>
<i-pv13>-</i-pv13>
<i-pv14>-</i-pv14>
<i-pv21>5.37</i-pv21>
<i-pv22>-</i-pv22>
<i-pv23>-</i-pv23>
<i-pv24>-</i-pv24>
<i-pv31>-</i-pv31>
<i-pv32>-</i-pv32>
<i-pv33>-</i-pv33>
<i-pv34>-</i-pv34>
<script/>
</real_time_data>

Alvast bedankt voor de hulp.

W

I have exactly the same issue. I will probably switch to an appdaemon solution because of this. I already have a python script which reads out my 2 inverters. I will switch them to appdaemon and will report back later.

1 Like

Hi, I’m trying to get SAJ inverter into Node Red but it dosen’t work.
With a normal internet browser I can see data but inside node red I dosen’t get any data.
Do you have any idea of how to do? Enclose some pictures for you to get a view.

Sorry, I’m not using Node Red to get data from the inverter just a template based request.

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

It works flawless for me.

1 Like

Many thanks @csarlifilpo - based on your input I could create similar sensors for the three Line voltages like this:

      voltage_l1:
        friendly_name: Inverter L1 Voltage
        value_template: "{{ states.sensor.saj.state.split(',')[25] | float / 10}}"
        unit_of_measurement: 'V'
      voltage_l2:
        friendly_name: Inverter L2 Voltage
        value_template: "{{ states.sensor.saj.state.split(',')[27] | float / 10}}"
        unit_of_measurement: 'V'
      voltage_l3:
        friendly_name: Inverter L3 Voltage
        value_template: "{{ states.sensor.saj.state.split(',')[29] | float / 10}}"
        unit_of_measurement: 'V'

It’s missing from the SAJ integration as well, not sure why.

2 Likes

I can’t seem to get this working either…?
in configuration.yaml I’ve got

#### SENSORS ####
#SAJ Inverter
sensor:
- platform: saj
  host: http://192.168.2.11
  type: wifi

I’ve restarted HA an no sensors can be found. I’ve tried variations as suggested (rest sensor) without luck. Am I missing something? I’ve checked the default log in details and can confirm they are admin/admin however the webportal doesnt ask for them (hence why they are not in my configuration.yaml). It’s a WiFi model

remove the http:// it is not needed.

Does anyone know how to connect the eSolar AIO3 to home assistant. Did a port scan on the local ip but don’t see any open ports. Tried this both on WiFi as on Ethernet cable. Thanks!

Thanks for the reply @djansen1987 - I’ve tried both without & with http:// without luck. Any other ideas?

I can connect to my SAJ Inverter through a web-browser via its IP address directly (it has a web server built in) over WiFi. I found mine checking the connected devices on my router and set it to have a static IP. You’ll need to do this during the day when its producing power as once the sun goes down the connection turns off (and the inverter too).

If its a freshly installed inverter your solar provider may need to still put it on your WiFi. The eSolar App can help you do this manually

The web server has a HEAP of information available, I just dont know how to pull any of it.

#edited for spelling

Hi, i think you have a different dongle than i have.

I guess you have one of these 2 dongle:

Wi-Fi Data Acquisition Module

Connecting to home Wi-Fi is quick and easy. External expanded connection, easy to maintain. Wireless connection, configure parameters quickly. Embedded local web page and the parameters are readable locally. Supports remote controlling function.
image

Ethernet Data Acquisition Module

Wiring connected to the residential network, easy to plug in and use. No need to configure parameters embedded local web page, the parameters are readable. Waterproof RJ45 connector is safe and reliable. Supports remote and controlling functions.
image
.
.
.
.
I have the following dongle:

eSolar AIO3

eSolar AIO3 is is an easy-installed and quick commissioning communication module in inverters’s monitoring. It integrates bluetooth, Wi-Fi and Ethernet. This module connects App via bluetooth and transmits data to server via Wi-Fi/ Ethernet. This module is also embedded with an OLED display inverter operating information.


.
.(All SAJ Products Info)
.
as it goes for your issue, you can try the solution from csarlifilpo

For those that have the new dongle without local API i created a Custom Component. The component reads the private API from the SAJ eSolar Portal.

Currently you can only add it manually to your HA config custom component folder. I am trying to get it in the HACS store but stuck at that part. So if there is anyone who can help me with that part would be great.

Let me know what you think of it and if it works for you!

sensor:
  - platform: saj_esolar
    username: [email protected]
    password: abcd1234
    resources:
      - nowPower
      - runningState
      - todayElectricity
      - monthElectricity
      - yearElectricity
      - totalElectricity
      - todayGridIncome
      - income
      - lastUploadTime
      - totalPlantTreeNum
      - totalReduceCo2
      - todayAlarmNum
      - userType
      - type
      - status
      - plantuid
      - currency
      - address
      - isOnline
      - peakPower
2 Likes

Anyone already tested if the standard HA SAJ integration is working as solar source in the new 2021.8 Energy dashboard?

I have a Saj inversor, and I’m facing a little issue.
My inversor goes on standby at night, and the sensor on HA becomes unavailable, so I used a workround:
I use a template sensor to count when the sensor isn’t “unavailable” or “unknow”:

sensor:
  - platform: template
    sensors:
      correct_energy_production:
        friendly_name: Energia Produzida Total
        icon_template: mdi:flash
        unit_of_measurement: kWh
        value_template: "{{ states('sensor.saj_today_yield')|float }}"
        availability_template: >
          {% if is_state("sensor.saj_today_yield", "unavailable") %}
            false
          {% elif is_state("sensor.saj_today_yield", "unknown") %}
            false
          {% else %}
            true
          {%- endif %}

and then I use a utility_meter for daily cicles:

utility_meter:
  total_production_daily:
    source: sensor.correct_energy_production
    cycle: daily

The only issue is at the end of solar production, the sensor get an astronic value, and I can’t figure out how to solve it. Example, today I produced 12.5KWh, and the utility_meter was counting good, until the inverter goes standby, after that, the sensor shows 74.9KWh as production today.

I also use influxdb and grafana, and the values coming from the sensor.saj_today_yield is correct
Screenshot 2021-08-05 at 01.12.24

1 Like

I hope someone can help with a fix. I tried your code, but somehow it does not seem work for me… The sensor.total_production_daily seems to increase in values, but on the “Energy distribution” card it just shows 0 kWh.

EDIT:

card just started to work… Now I hope someone knows how to fix this daily cycle…

Update 2021.8.2 seems to have fixed the issue

Thanks I was searching for this
I have a gprs module and can’t connect

i’m trying this now

1 Like

Great, hope you like it.
Still new features are build in to it and I am also almost in the HACS store. At the moment we are fine tuning the SEC module with @LowKey88 which will be updated soon. Good to know is that is is also Energy Dashboard ready.

Currently you can add it to hacs via this manual:

Using this method you will also get the updates.

Let me know what you think. If you walk in to any issue, please report them on Issues · djansen1987/SAJeSolar · GitHub

Update:

The Custom Component is approved on HACS and has already multiple users helping to add new device support to it and enjoying the component. It can be found in HACS under SAJ eSolar or at GitHub - djansen1987/SAJeSolar: SAJ eSolar Portal Sensors

3 Likes

@djansen1987 this is incredible! thank you!
I am stuck on one thing though, getting the eSolar AIO3 working…
Would any genuius be able to assist?

################################################################################

#SAJ eSolar HACS Integration

sensor:
  - platform: saj_esolar
    username: !secret saj_username
    password: !secret saj_password
    resources:
      - nowPower
      - runningState
      - todayElectricity
      - monthElectricity
      - yearElectricity
      - totalElectricity #Energy -> Solar production
      - todayGridIncome
      - income
      - lastUploadTime
      - totalPlantTreeNum
      - totalReduceCo2
      - todayAlarmNum
      - status
      - plantuid
      - currency
      - address
      - isOnline
      - peakPower
    
sensors: saj_sec
resources:
      - pvElec
      - useElec
      - buyElec
      - sellElec
      - buyRate
      - sellRate
      - selfConsumedRate1
      - selfConsumedRate2
      - selfConsumedEnergy1
      - selfConsumedEnergy2
      - plantTreeNum
      - reduceCo2
      - totalGridPower
      - totalLoadPower
      - totalPvgenPower
      - totalPvEnergy
      
################################################################################

I’ll go to check my config before a restart and I get this

Integration error: sensors - Integration ‘sensors’ not found.
Integration error: resources - Integration ‘resources’ not found.