SAJ Solar inverter

Has anyone had their AI03 with Modbus stop working a week or so ago? I am currently away and it seems to have stopped :frowning: Not sure if SAJ done a firmware update or it’s happened on the HA side.

Maybe your AIO3 module just crashed? I had it before that it was no longer reacting at all (no more blinking of the blue led). Only solution was rebooting the module by disconnecting/reconnecting the module physically. After that, the blue led started blinking again and connection was fine again.

Possibly, except the SAJ app is still.working fine. I get home tomorrow so hopefully it’s just a simple reboot.

Oh… in my case, the SAJ app was also not working… so might be something else.
Or modbus interface and mqtt interface are different processes on the AIO3 module, because the app is using mqtt.

Yes, I have the same problem since updating HA to 2024.2.1, in the error logs I think the register block from modbus is too long now (maybe they changed the length maximum?) but I have no idea how to fix that.

Maybe @stanus74 might have an idea?

The string can only be 255 bytes long. As a solution, must split the query into 2. Please recalculate the offset accordingly - an example is attached.

 sensors:
  
  - name: modbus_sensors1
    slave: 1
    address: 16490  # First Part Register
    count: 10  
    data_type: custom
    structure: ">10h"  # 10 int16 Register
    scan_interval: 35  # not a "X0" to avoid to much request at same time
 
  - name: modbus_sensors2
    slave: 1
    address: 16540  # 2. Part
    count: 20  
    data_type: custom
    structure: ">20h"  # 20 int16 Register
    scan_interval: 10  

Template Part (Please check the Offsets for your Inverter)

- sensor:

      - name: modbus_bat_energy_percent
        unit_of_measurement: "%"
        device_class: battery
        state: >
          {{ states('sensor.modbus_sensors1').split(',')[5] | float * 0.01 }}

      - name: modbus_total_pv_power
        unit_of_measurement: "W"
        device_class: power
        state: >
          {{ states('sensor.modbus_sensors2').split(',')[9] }}

      - name: modbus_total_grid_power_watt
        unit_of_measurement: "W"
        device_class: power
        state: >
          {{ states('sensor.modbus_sensors2').split(',')[17] }}

All registers in this example are read as int16, even though some are uint16. I do not need these.

Important for H2 Inverter Users
The “TotalGridPowerWatt” register is not 16551 but 16557. Maybe somebody have a Contact by SAJ Support with a new Modbus List for H2

1 Like

Already contacted SAJ for it a couple of weeks ago, but no response yet… :frowning:

I’ve sent a contact there an email as well. Let’s see what comes back and I’ll report here.

Does anyone know if GitHub - djansen1987/SAJeSolar: SAJ eSolar Portal Sensors allows for the HS2 all-in-one solution to be used in HA?

Hi,
I have a HS2 too, and i wanted to know if you found any information to read the information using @stanus74 scripts configuration.yaml and modbus.yaml.
I installed but no information is retreived from Home assistant.

it work also for H2 Inverter. I have a H2 and i use this Addon. You need your Login Details for SAJ Web portal.

use the SAJeSolar add-on. It is easy to install and you can get data for H2 inverters. Not in real time, but with a 5 minute delay. I use it too.

you have to register in to the SAJ web portal:

H2 is different from HS2 as far as I see… Do you have any confirmation?

the fact is that by reading the HS2 modbus I want to command an external Wallbox to recharge the car only with the extra energy, after the battery is full with only solar energy. In this moment unfortunately hybrid systems like HS2 cannot talk with the wallbox providing all the information so I wanted to put HA in the middle to manage it. Having an update every 5 minutes from SAJ cloud is not the best. I asked some Saj people the modbus document for HS2, it seems I will receive it on Monday. As soon as I have an update I share with you. Thank you very much for the support.

Happy to look into this as well. I have an Ampere Storage Pro from EKD which seems similar hardware the least. I have an extra small box called Ampere.IQ which can talk to the system and provides a REST API. In the data you see references to SAJ and both system look like twins. The port which is open on the storage pro is 502 … ,-).

http://ip_of_the_ampere_iq_box/rest/items/sajhybrid_inverter_94_HSR2103J2323E18072_inverter_apparentPower
1 Like

Hi, SAJ has provided to me the documentation of H2, they said the standard is the same of HS2.

Here is the link: H2-3~6K-S2 single phase communication protocol -2022.12.02-EN.pdf - Google Drive

Is there any change compared with the documents were already available?

Hello Community,

I’m excited to share that I’ve developed an addon for the SAJ H2/HS2 Inverter, specifically designed for Home Assistant integration. This addon is aimed at enhancing functionality and user experience. Currently, it is in its pre-release stage and available for community testing.

For those interested in contributing through testing, it is advisable to use a test installation of Home Assistant to ensure the stability of your main setup.

The addon can be accessed here: GitHub - stanus74/home-assistant-saj-h2-modbus: Home Assistant Addon to read SAJ H2 Inverter Modbus Data

Feedback and questions are highly encouraged and will be invaluable for further development.

Thank you for your support and contribution.

Best regards,

Buonasera,
da qualche giorno ho iniziato a smanettare su HA su macchina virtuale VirtualBox.

Ho già integrato le mie 3 Shelly PlugS.

Poiché il mio appartamento è dotato di impianto FV con inverter SAJ H1, ho letto che è possibile integrarlo in HA con la configurazione del file YAML.

E’ possibile farlo anche nella macchina virtuale di HA?

In caso affermativo, come?

Vi ringrazio in anticipo.


Good evening,
A few days ago I started tinkering with HA on a VirtualBox virtual machine.

I have already integrated my 3 Shelly PlugS.

Since my apartment is equipped with a PV system with SAJ H1 inverter, I read that it is possible to integrate it into HA with the configuration of the YAML file.

Is it possible to do this also in the HA virtual machine?

If so, how?

Thank you in advance.

Thanks for doing this, I have started running it and it’s working fine for me. I have a separate PV system feeding in so it is now showing PV power on my side, but I think mine is configured differently, I’ll look at it at a later date.

What would be really great is being able to control the battery charging, I think you made the scripts for this earlier and they were working fine for me, but mine stopped working.

Can anyone help me?

Everything continuing to work for me. I think my setup is a bit different so I can’t see PV generation, and it feeds data from my other inverters. It does show in the SAJ portal though, so I think it passes the data through, although I think maybe it can be calculated via the SAJ Battery Power, SAJ Total Load Power & SAJ Gridpower somehow but I need to put some thought into it.