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

Past couple of releases for those who don’t follow the GitHub page:
(0.4.10 removes the need to connect the Inverter to the Cloud at all! You can now unlock Inverter control from the Integration)

0.4.9

Renamed and fixed sensors:

  • feedin_energy_total → grid_export_total
  • consumed_energy_total → grid_import_total
  • total_energy_to_grid → total_yield

Fixed following:

  • normal_runtime
  • e_charge_total
  • eps_yield_total

General code cleanup.

0.4.10

Gen2, Gen3 & Gen4

Added a new button:

  • unlock_inverter

Gen2 & Gen3

Added the following sensors and selects:

  • discharger_start_time_1
  • discharger_end_time_1
  • discharger_start_time_2
  • discharger_end_time_2

“The discharge time allows you to use the battery only from the start time to the end time”
While the sensors read on Gen3 and you can alter the times I can’t verify if it does anything on the Gen3. Might only apply to Gen2
(Does not force Discharge into the Grid)

Gen2

Removed the following sensors as they don’t exist on Gen2

  • battery_input_energy_today
  • battery_output_energy_today

@infradom Has started to write up a connection guide for the Gen4 on the Wiki for the custom_integration

@tom1502 Does this help you in understanding how to connect to your inverter?

Any chance have you managed to try the Integration out yet?

I haven’t, sorry. I have a case of it “ain’t broke, don’t fix it”!

Hi,
Sorry I was away. It gave me a bit more idea, but it’s still not something that I know how to do. I also haven’t been able to find a converter at anything close to a price that I can justify.

Thanks,

Tom

Hi, I’ve used Wills cloud interface package for a while to monitor but i’m wanting to be able to control the inverter so I’m trying to get this working and having problems getting it to display anything. I was getting rejected connection errors and decode errors in my logs so made some tweaks to the vircom config (added my HA IP address to the Multi Dest IP and Port list and changed the transfer protocol), i can now see RX and TX packets showing in vircom and I get no log errors in HA, but still not data! Here is my Vircom settings, can you see anything wrong?

and here is the setup in HA i am using

I then rebooted to be sure, and everything is showing up as ‘unknown’

I suspect i have the modbus set up wrong but i’m a complete novice to know where to go next!

another thought, I connected the blue and blue and white wires are directed, but noticed above Will suggested connecting the GRND too, would this be affecting it?

any pointers please, i’m good at following instruction but don’t have an understanding of system to be able to sus myself.

Have you tried swapping the Blue and Blue-white wire around? (Or did you follow the Wiki?)

GND / Ground wire is more for longer wire runs. I don’t know exactly when you need to connect GND but I know RS485 can run upto 1200M. If you do need GND it’s pin 6 according to the image I posted a couple of pics up.

Might need input from @infradom or @Voreland as I personally haven’t used an RS485 - Ethernet Adaptor as my Gen3 has built in Ethernet port which supports Modbus over TCP

Hi Will,
Thanks for you and all’s work on this, I’m looking forward to getting it working.

I used the wiki but will swap over just in case. It’s only a 1.8m cable but I can connect the ground if it would help.
I’ll have a look in the morning and see if either makes a difference

Mark

If you followed the Wiki I would say it’s a software setting then.

We can get some extra screen shots on the Wiki. I also plan to add a page of known working RS485 to X adaptors. As I am guessing not all will be created equally or some might only function as perhaps a slave device etc.

I did not connect ground. That should not be needed, just the 2 wires
I see in your vircom config that you have selected REALCOM
In my config, I have selected Modbus_TCP Protocol as transfer protocol

I will add the vircom screenshots for my config to the wiki.
Should be done in half an hour …

1 Like

Please have a look at my config:

You have specified realcom protocol instead of modbusTCP
Furthermore, I did not have to add the HA address in advanced settings

thanks for the extra info. I’ve changed my settings to match yours and still the same. I do remember noting the clip of the ethernet connector did not ‘click’ into the socket on the inverter, despite my best efforts, i struggled to get a view into it to see if there was any blanking plate or similar. I just unscrewed the cover cap. Could that be an issue?Iis there a way to test the rs485 connection is good?

Does it click without the cover cap?
The cover is meant as protection in high humidity environments

Are you sure you used the correct COM port? Should not be confused with the modbus port for the power meter.
X1 may be somewhat different than my X3

No click, I never refitted the cap. I do remember checking and rechecking the port was correct, and there is a meter already connected. It’s in the garage soba but dark now. I’ll check all of these in the morning and let you know anything I discover.
I did turn on remote cons in the grid menu and when checking the other settings, The modbus port in the inverter setting is ‘4’, I didn’t change it as I’d not seen any mention of changing this

I dont know what you mean by “remote cons” in the grid menu.
I do know that the modbus address of the inverter should be 1 (the default for X3)
So in the settings > advanced settings > modbus > RS485 addr , it should be set to 1 (default afaik)
In settings > advanced settings > modbus > baud rate, I expect 19200 as default

I just downloaded and read the X1 manual: unlike the X3, the default baudrate seems to be 115200.
Please verify this on the inverter, if so, you can either:

  • change the speed in the waveshare settings
  • change the speed on the solax inverter

I thought I had them matching. I’ve just changed the modbus and rebooted HA and the modbus and no change. I’ll have to try checking the inverter settings again in the morning. I’ll let you know what I find
Thanks for the pointers.
I do have problems with my installer overriding things like the clock ( keeps going back to GMT which means my forced charge is out if synch with my tariff and I have to alter the force charge times instead, they may have redisabled the remote communications setting to enable the RS485 connection. I need to sis out how to stop their interference!

I’ll check it all again tomorrow

Mark

Do you have a PocketLAN or PocketWiFi connected?

If so remove it. Your installer should lose control over your Inverter then!

Or do they have some third party device connected?