Universal Solar Inverter over Modbus RS485 / TCP custom_component (AlphaESS, Growatt, Sofar, SolaX, Solinteg, Solis, SRNE, Swatten, TIGO TSI & Qcells Q.Volt Hyb)

Those are the 5 new sensors for the Modbus Meter. I can set them to disabled by default in the proper release. Then users can enable them if required.

I was just worried the Inverter wouldn’t be happy trying to read an empty register. As I have had that happen on other Inverters.

Thanks for testing on an Inverter with Firmware lower than 1.38

@wills106 sensor.solax_x3_mic_today_s_yield and sensor.solax_x3_mic_total_yield should be available without Modbus Meter (at least, they used to work for me).

So there is a regression, even though there is nothing showing in the logs.

I do know its IP, but it’s not responding on any TCP port.

How did you manage to find her ip?
Do you have a V2 or a V3?

I have it setup on a separate “IOT-CLOUD” VLAN, with its own DHCP server.

The box says V2, SolaX Cloud says on the “Device Matrix” page that it is “Lan3.0”.

If Black = V3, if Blank = V2

In that case, V2.

Wills…
Updates on my Gen2 Solax. Having left a decent interval for any bugs to be dealt with, I deleted the integration and installed 2023.
Everything pretty much worked again straight off (a couple of identity ID’s changed and dealt with).
Some entities are disabled by default and had to be enabled… then report correctly. These all seem to be entities that rely on a bidirectional meter connected to the inverter:-

  • sensor.solax_battery_output_energy_total
  • sensor.solax_battery_input_energy_total
  • sensor.solax_grid_import_total
  • sensor.solax_grid_export_total
  • sensor.solax_total_solar_energy

As discussed previously, I think two of the entities are somewhat misnamed:
‘Today’s Solar Energy’ is actually Today’s Yield…solar plus battery.
‘Total Solar Energy’ is actually all energy…solar plus battery, since commissioning.

Interestingly, ‘Solax Today’s Yield’ DOES appear to be a running total of solar yield alone. This is not reported in the Solax portal, so I need to wait for a zero sun day to verify.
I see that the scaling issue that I noted at #984 was fixed a couple of weeks ago :slight_smile:

I added a further battery two days ago and the act of temporarily disconnecting batteries has ‘reset’ the count of battery input and output energy (although old values still there in HA history of course).

Thanks also for the tip (GitHub pages) about having to re-unlock the inverter after a power cycle…this was indeed necessary to enable the charge period settings etc again.

Occasionally I will lose communication with the inverter (powerline LAN to garage), or HA will freeze. I’ve found it quite useful to have the RTC displayed at the top of the info screen, as seeing it increment every 10 secs is a quick confirmation that data is live.
image

1 Like

@wills106 Here is some logging from version 2023.02.6:

2023-02-21 11:56:08.095 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x400 pv_voltage_1 to block with start 0x400
2023-02-21 11:56:08.095 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x401 pv_voltage_2 to block with start 0x400
2023-02-21 11:56:08.095 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x402 pv_current_1 to block with start 0x400
2023-02-21 11:56:08.095 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x403 pv_current_2 to block with start 0x400
2023-02-21 11:56:08.096 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x404 grid_voltage_l1 to block with start 0x400
2023-02-21 11:56:08.096 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x405 grid_voltage_l2 to block with start 0x400
2023-02-21 11:56:08.096 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x406 grid_voltage_l3 to block with start 0x400
2023-02-21 11:56:08.096 INFO (MainThread) [custom_components.solax_modbus.sensor] Starting new block at 0x407
2023-02-21 11:56:08.096 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x407 grid_frequency_l1 to block with start 0x407
2023-02-21 11:56:08.096 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x408 grid_frequency_l2 to block with start 0x407
2023-02-21 11:56:08.096 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x409 grid_frequency_l3 to block with start 0x407
2023-02-21 11:56:08.096 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40a grid_current_l1 to block with start 0x407
2023-02-21 11:56:08.096 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40b grid_current_l2 to block with start 0x407
2023-02-21 11:56:08.096 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40c grid_current_l3 to block with start 0x407
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40d inverter_temperature to block with start 0x407
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] Starting new block at 0x40e
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40e measured_power to block with start 0x40e
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40f run_mode to block with start 0x40e
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x410 measured_power_l1 to block with start 0x40e
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x411 measured_power_l2 to block with start 0x40e
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x412 measured_power_l3 to block with start 0x40e
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x414 pv_power_1 to block with start 0x40e
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x415 pv_power_2 to block with start 0x40e
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] Starting new block at 0x423
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x423 total_yield to block with start 0x423
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x425 today_yield to block with start 0x423
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC returning input block: 0x400 0x407 [1024, 1025, 1026, 1027, 1028, 1029, 1030]
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC returning input block: 0x407 0x40e [1031, 1032, 1033, 1034, 1035, 1036, 1037]
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC returning input block: 0x40e 0x416 [1038, 1039, 1040, 1041, 1042, 1044, 1045]
2023-02-21 11:56:08.097 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC returning input block: 0x423 0x427 [1059, 1061]

And this is the same with version 2023.02.7b3:

2023-02-21 12:06:23.916 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x400 pv_voltage_1 to block with start 0x400
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x401 pv_voltage_2 to block with start 0x400
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x402 pv_current_1 to block with start 0x400
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x403 pv_current_2 to block with start 0x400
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x404 grid_voltage_l1 to block with start 0x400
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x405 grid_voltage_l2 to block with start 0x400
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x406 grid_voltage_l3 to block with start 0x400
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] Starting new block at 0x407
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x407 grid_frequency_l1 to block with start 0x407
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x408 grid_frequency_l2 to block with start 0x407
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x409 grid_frequency_l3 to block with start 0x407
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40a grid_current_l1 to block with start 0x407
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40b grid_current_l2 to block with start 0x407
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40c grid_current_l3 to block with start 0x407
2023-02-21 12:06:23.917 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40d inverter_temperature to block with start 0x407
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] Starting new block at 0x40e
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40e measured_power to block with start 0x40e
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x40f run_mode to block with start 0x40e
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x410 measured_power_l1 to block with start 0x40e
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x411 measured_power_l2 to block with start 0x40e
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x412 measured_power_l3 to block with start 0x40e
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x414 pv_power_1 to block with start 0x40e
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x415 pv_power_2 to block with start 0x40e
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] Starting new block at 0x423
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x423 total_yield to block with start 0x423
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x425 today_yield to block with start 0x423
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x435 inverter_power to block with start 0x423
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x437 total_grid_export to block with start 0x423
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x439 total_grid_import to block with start 0x423
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x43b today_grid_export to block with start 0x423
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] adding register 0x43c today_grid_import to block with start 0x423
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC returning input block: 0x400 0x407 [1024, 1025, 1026, 1027, 1028, 1029, 1030]
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC returning input block: 0x407 0x40e [1031, 1032, 1033, 1034, 1035, 1036, 1037]
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC returning input block: 0x40e 0x416 [1038, 1039, 1040, 1041, 1042, 1044, 1045]
2023-02-21 12:06:23.918 INFO (MainThread) [custom_components.solax_modbus.sensor] SolaX X3-MIC returning input block: 0x423 0x43d [1059, 1061, 1077, 1079, 1081, 1083, 1084]

The new registers (which don’t exist) are read with from the same block as today’s yield and total yield, which apparently fails silently.

EDIT: I see a new entry now, it’s a failure but it is logged at log level info, which is why I failed to notice it before:

2023-02-21 12:06:54.623 INFO (MainThread) [custom_components.solax_modbus] SolaX X3-MIC error reading input registers at device 1 position 0x423
NoneType: None

I have just released 2023.03.1 I have added in an extra newblock before the New Modbus Meter registers. Does that restore the functionality of “Total Yield”

I’ll double check with another Gen2 owner to see if their registers match your description or not.
It’s been a while since I have worked on the Gen2. @matthewjporter Are you able to check your registers? I don’t know if it’s a difference between the Inverter sizing or if yours is wrong as well?

Are there any plans to add support for Solax EV Chargers?
I have my X3-EVC-11K connected with the Solax X3 G4 inverter by Modbus but I don’t see any values related to the charger in the integration. No clue how the cooperation between the EV Charger and the Inverter works though.
As I don’t have EV yet I can’t test it either so I am just curious whether anything is planned in this direction or whether someone already have something working.

I would love to support the EV Charger. But I don’t have access to the docs or any network traffic and I don’t own a charger :frowning:

2 Likes

Thanks! I will check tomorrow when there is enough light again.

@wills106 Tested release 2023.03.1, total yield is there but I lost the frequency and voltage measurements, they now have status “unknown”.

After waiting about 4 minutes, they did get updated. Did something change in the update frequency?

I configured the integration to poll every 30 seconds. Could it be that it slows down overall polling because of the failed reads of the new registers?

After looking at the code, I’m pretty sure that’s it.

The only thing that’s changed recently for X3-MIC’s is the Newblocks moved around. I had a duplicate for the same register. So it could have introduced a delay.

Does the Beta 2023.03.2b1 prevent those sensors from being unknow for a while at the start? So they start reading sooner.

Having a slower poll rate will cause the Integration to be Unknown for longer.
I wouldn’t recommend going lower than 5s on the X3-MIC though.

@wills106 The delay (for every poll!) is caused by the fact that at every poll, reading of the block of registers at offset 0x435 fails, which causes read_modbus_block to return False, which in turn causes read_modbus_registers_all to return False, which then causes slowdown to be set to 10 in async_refresh_modbus_data. So instead of polling every 30 seconds, it will effectively poll every 300 seconds.

So the Inverter isn’t happy with the Integration trying to read these new registers that are only present on ARM Firmware 1.38.

I might need to split the plugin to plugin_solax & plugin_solax_old

maybe we can add an extra attribute that allows us to to ignore an attribute if reading it fails.
I will have a look in the code how easy / difficult this would be
having two versions for solax seems to be difficult to maintain

1 Like

On first sight, this must be relatively easy to do … Let me know if you want me to create a suggested change …