SAJ Solar inverter

Do you have to do a DEC to HEX conversion first, to write values to 3606 and 3607? Or can you send DEC straight as values to them? Using Qmodmaster

You can just Google the conversion, or use ChatGPT. And yep as long as you get the Dec right it will take either.

1 Like

Thanks. I’m currently experimenting with charging and i got it working today, but does anyone know if you can set it twice? e.g. i started charging today at 15:00, and now, using exactly the same values except the start and stop registers (3306 and 3307) it does not start. Is there some kind of limit of daily uses?

Yeah, but for example: 22:35 is 1623 (HEX), but 2235 is 08BB (HEX) - I’m not sure which one to use, getting mixed results.

Using Decimal to Hex Converter

So for instance, if i want to start at 22:30, i do a 2230 decimal to hex conversion? (08B6)

Edit: I had set the start charging time to 0000 (register 3606H) and it started charging at 12 AM. Could it be that it will only use the timeslot once per day or something?

Guys,
Modbus Ninjas,

can you help me with your deep understanding of the SAJ H2 and modbus.

Which modbus registers hold the values for

  1. Battery/PV: The power without house load. This is what is provided by the PV/Battery system (or consumed in case the battery gets charged from grid). Should be Watt. And which direction is positive?

  2. Grid: the power which leaves/enters the house to/from the grid. Again Watt. Again question for direction and sign.

I would be really greatfull for your advice.

When I analyze the code I can see that 16557 should be the grid value (2). However, if I use QModMaster and do this:
image

You see, the values 1/0/-1/1 (the 4 direction values seem to start from decode_instructions_part_2 seem to start with an offset of 1. When I start to read from 16534 I can see the last value is the grid power

image

When I hover in QModMaster over the value it gives me 16558 instead of the expected 16557.

What am I missing?

Regards
Ralf

Set the Base address 0

1 Like

Guys, you rock. Your integration works like a charm.

I was able to activate the total in/out energy entities.

I am missing an entity for “solar total energy” in kWh or similar from the integration for the energy dashboard. Or even better for the PV1 and PV2 side separately.

Edit: Found it. Its called “Inverter Total Generation”.

I would suggest to have those entities enabled by default and named something with “Energy”. This is the terminology HA is using in the Energy Dashboard.

Another one. What entity are you using for the energy dashboard for the PV-Module? It must be an Energy one (with kWh). I went for the entity SAJ Inverter Total Generation, but … it constantly increases even during night/dark times. My expectation would be it does not increase when dark.

I have been struggling to communicate with my Suntrio plus 5k via an elfin ew11a and the RS-485 port. The default baud rate for the RS-485 interface of my inverter is 115200. Only when I changed the baud rate manually in the HMI of the inverter to 9600 baud the communication started to work including the HASS integration. I hope this message can help others in the future :wink:

1 Like

@rak
Some times it makes sence to cross check the value with the data from the WEB view of ASPro

First of all, thank you for this cool integration. I use this without Aio3 but directly into my battery. I use the integration together with Emhass. The expected solar yield and the expected power are examined every day. The shortage of power is then taken from the battery, which we always try to charge at the cheapest hourly rates. Here I have the following issue. Sometimes charging the battery to just 60 percent is enough to get through the day. For example, if I charge to 60 percent and there is still a cheap grid rate, then I want to use the grid and not the battery. How can I set the battery so that it does not discharge? Do I have to adjust battery mode? Anyone have any ideas?

Anny progress with the integration for charging? I have H2T2083J2242E06193 and Your integration for reading are working fine.

I’m probably just missing something trivial, but I cannot find the SAJ H2 modbus integration in HACS. What could I be doing wrong?

I find HACS integrations to be a bit funny and convoluted to install sometimes. Sometimes I just do a custom installation, and point it to Github link of the integration (in this case the SAJ H2 one), instruction below. Then once it’s downloaded, you need to go into HA normal Integrations and ‘install’ it.

1 Like

Thanks. I actually installed it manually, but Custom Repositories is of course better. :pray:

Agree.
W is “power”.
kWh is “energy”.
Would increase user friendliness to use consistent naming of entities.

For the battery, sensors Battery Total Discharge and Battery Total Charge work fine. But for PV generation none of the sensors I tried show reasonable results. I have tried Power current day/month/year but all of them seem to be off by a factor 10 compared to the SAJ Portal values.

In the table saj-modbus-h2, the register 16575 40BF is called Today_PV_Energy but the comment says “PV1 power generation”, indicating that this register is only the PV1 generation. Moreover, there are registers for Today_PV_Energy2 and Today_PV_Energy3. These are, as far as I can see, not picked up by the integration. My question is: should Today_PV_Energy be added to Today_PV_Energy2 to show the total PV generation?

Try using the SAJ CT PV Power Watt entity, it is disabled by default but if you go into the Integration and enable it, it works well. I had to do the same as I have 3rd party Solar inverters feeding into the SAJ inverter.

Enabled this one. Values for Power looks more reasonable than before.

However, for the energy dashboard we need a Energy (kWh) variable. The one I currently use “SAJ Inverter Total Generation”, but it creates unreasonable results. This energy meter increases even during night/dark times. What energy values you guys use?

I have a SAJ H2 with two sets of solar panels and a B2 battery. @stanus74 's integration is really nice but I haven’t been able to get useful values from some of the sensors, most notably the PV energy sensors.
I modified @stanus74 's code to also read registers 16695 (“Today_PV_Energy2”) and 16703 (“Today_PV_Energy3”). Then I defined a helper sensor adding PV1 and PV2 energy. I use this sensor in the Energy dashboard and get good values consistent with the SAJ Portal.
I’m not fluent in Python and don’t feel comfortable checking in my code at github so I hope someone will work on a fix reading all the PV energy registers.