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

I have no automation for EV charging, but if your EV charger is known in HA, you should be able to trigger the automation based on the charging current towards the EV.
One remark however: I am not sure setting autorepeat to 0 would stop the modbus power control mode. In my automations, I simply set to ‘Disabled’ and issue a trigger:

alias: Normal mode (modebus power control)
description: ""
trigger: []
condition: []
action:
  - service: select.select_option
    data:
      option: Disabled
    target:
      entity_id:
        - select.solax_remotecontrol_power_control
  - service: number.set_value
    data:
      value: "0"
    target:
      entity_id: number.solax_remotecontrol_active_power
  - service: number.set_value
    data:
      value: "3590"
    target:
      entity_id: number.solax_remotecontrol_autorepeat_duration
  - service: button.press
    data: {}
    target:
      entity_id: button.solax_remotecontrol_trigger
mode: single

Thank you for the reply. Sorry for being unclear but my question specifically to you was about the automation you mentioned earlier in this thread regarding blocking grid export during negative prices.

Ok, now I understand better. In the example I posted above, the action section could be shortened, there is no reaon to set the autorepeat_duration if power_control has been set to disabled. Dont forget the button press trigger however !

I think https://evcc.io/ is the best solution to do this :wink:

I use this for many month and it have many and many possibilty and compatible Iinverter (solax too), and any vehicle and EV charger too.

Looks cool but I am just a bit worried that it will write a lot to EEPROM memory on the inverter instead of using Modbus Power Control.

It’s only reading information from modbus not writing.

It’s the EV charger have to be compatible to set power limit for charge, EVCC just update this from your condition.

Is the number.solax_remotecontrol_active_power required to use?

No it’s PV_total and battery power if avalaible

I have the API to my Solax X1-AC and thats all good…
Did you manage to use this code to change the charging modes?
Im keen to do this but just cant seem to get it to work :frowning:
Its originally from Social Energy (so I know it can be done…) but now connected via a Raspberry Pi & home assistant and want to control this myself.
Any help would be gratefully receieved

Did you manage to control the charge mode via the command line or Home Assistant?
Keen to get some help if you did please

Depends on the chosen mode: for disabled it does not matter, for Enabled_no_discharge, the software will compute the value automacitally so no need to set it. I believe only the mode Enabled_power_control uses this value
(sorry for the short quick reply, I am quite busy right now)

Correction: enebled_battery_control also uses this value. Most other modes set this value to 0 or compute it from house_load

1 Like

Hi all, I have Solax X3 hybrid G4 connected via Pocket LAN and would rather not to integrate with Wifi Pocket as many users complained about this connection not being very reliable with Modbus. So I was hoping to use Waveshare or similar RS485/TCP adapter but realized COM port on my inverter is already used for connectivity with Solax EV charger. Any advice how to proceed in such scenario?

Thansk a lot

No one has gotten it working yet.

But you could use GitHub - infradom/ha-addon-modbusspy: Serial Modbus Spy - Publish captured data as Modbus TCP server to see what’s actually going on between the Inverter and EV Charger.

The main discussion so far is SolaX EV Charger · wills106/homeassistant-solax-modbus · Discussion #349 · GitHub

Wills, thanks a lot for a quick reply. But my point is not to integrate Solax EV Charge into HA, at least not know. I would like to integrate the inverter as such but I dont know how because physically there is no port available on inverter. As I wrote, I would rather avoid Wifi Pocket as I am hearing it’s not realizable with Modbus and Pocket LAN unfortunately does not support Modbus (BTW I really don’t get why).

Thanks

In theory you can daisy chain off Modbus as discussed here SolaX EV Charger · wills106/homeassistant-solax-modbus · Discussion #349 · GitHub But no one has got it working yet. That’s why I suggested using the Modbus spy to understand how the Internal communications works. Then we can possibly adapt the Integration to suit.

Your only other option that I know off is a PocketWiFi 3.0 on the latest firmware?

Had zero issues using Pocket Wifi …

Everything is working great in a Growatt system (thanks @wills106 !). I need help integrating my battery into the Energy Dashboard. The configuration is asking for sensors which measure energy going in to and out of the battery in either of GJ, kWh, MJ, MWh, Wh. The battery sensors I get with the component (Battery Charge Power and Battery Discharge power) show live updated values in W.

Would a template formula get me the right sensors for the Energy Dashboard?

Update:

I used the Riemann Sum Integral Integration and created these two sensors…

  - platform: integration
    source: sensor.growatt_modbus_battery_charge_power
    name: battery_in
    unit_prefix: k
    round: 2
  - platform: integration
    source: sensor.growatt_modbus_battery_discharge_power
    name: battery_out
    unit_prefix: k
    round: 2

…and it seems to be working accurately. I’ll let it work for a couple of days and compare results with Growatt’s own measurements

I was going to suggest that sensor type for now.

I’ll have another look to see if the Inverter gives those values directly. Growatt is still a bit work in progress, so there might be more I can add in.

If it’s any help, the values on kWh do show up on Growatt’s app…