Schneider Electric Solar TCP Modbus Integration

Has anyone seen a way to get modbus to work with multi 6848 units ?
While I have no problems with AC_Priority on a single 6848, I cannot get that to work on a multi-unit system. Is there a trick since both units must be in sync with each other.

Hello,
Certified Newbee to this topic…
I’m trying to complete installation of the Modbus TCP Gateway Integration in HA but am stuck with ā€œAdding a New Deviceā€ Step 2 (Device Selection):

=> Choose a device type from the dropdown (e.g., Eastron SDM-230 for SDM230.yaml).

I was led to believe that I don’t need any additional hardware between my HA Green box and the LAN network connection which is on the same LAN network as the Conext Gateway (Model 865-0329) device to make this connection. Is this correct?

I have no idea which of the items in the dropdown list are appropriate for the Schneider Electric Solar equipment (Gateway, XW6048, Batt Monitor, AGS, MPPT 60/150, etc.). Based on the fact that this is being asked during configuration, I would think I do actually need hardware… Would really appreciate a tip from the community.
Thank you!

Yes you can use MODBUS write to set the charger on and off-i do with mine once the batteries are full

I got Seplos working - i used this repository and it works very good- https://github.com/ferelarg/Seplos3MQTT/blob/aa14a7054bc69471bd568c40e745f39ebb9be8b1/seplos3mqtt.py

I’m not using a HACS integration for my XW GW MPPT etc- just the modbus native integration from HA- its done through YAML- lots of examples above. I never saw a HAC integration that would work with Schneider - but its totally not necessary since the built in MODBUS works so well.

I am a newbee struggling with this yaml code stuff and greatly appreciate your efforts to provide some bread crumbs for those like me who follow your path. I have a off-grid PV solar system using a XW6048 inverter, a Conext Gateway with two Conext 60/150 MPPTs, a battery monitor, and an AGS, all from Schneider. So far all I get is the ā€œUnavailableā€ status for three entities… that I am trying to pull from the battery monitor to help automate controlling electrical loads to conserve my batteries during bad weather spells or make use of excess ā€œfreeā€ solar energy after the battery bank is fully charged on sunny days.
The requirement for a ā€œTemplate.yamlā€ is baffling… seems like a duplication of the same stuff in the configuration yaml file that I’ve named ā€œModbusā€. There is a a lot of shared code in this community repository but so far none of it works for me. Maybe eventually I will figure this out… I’d be no where without your hints & bread crumbs. Anyway, Thank you!

To Keepsake -
I’m sure the other 6848 units have a different address on the system- that’s how you would talk to them.

To lemachine2u-
it takes a while to understand how to make it all work- but when you finally get it working it can do amazing things- before I was just looking at the webserver on the conext gateway- and while its useful there’s a whole world of things that you can do with home assistant to make it better.
if your just starting out- you dont need separate yaml files- they can all go in the main configuration yaml- in the writing of yaml code all you are doing is calling built in modules and supplying your particular variables-the separate yaml files keeps them from getting too long and hard to read. the first thing to do is find out the ip address of your conext gateway and learn to speak to it with the modbus mine starts out like this…

  - name: conext_gateway
    type: tcp
    host: 192.168.0.107
    port: 502
    delay: 10
    
    timeout: 6
    #close_comm_on_error: true
    message_wait_milliseconds: 100
    #retries: 2
    #retry_on_empty: false
    sensors:
      #Always double check your address for each device.
      #conext_gateway device over Modbus: CSW2524 0 - Bus ID:2, Bus address:1, Modbus SlaveAddress (Port 503): 90
      #conext_gateway device over Modbus: XW6848-01 0 - Bus ID:2, Bus address:1, Modbus SlaveAddress (Port 503): 10

      - name: "XW Device State"
        unique_id: xw_device_state
        data_type: uint16
        input_type: holding
        slave: 10
        address: 64

the conext gateway has your slave numbers for your devices- the schneider modbus documentation has the address and data types for each device in your solar system

Using tempmaltes.yaml is very simple, it shall be referenced in the configuration.yaml
All Schneider modbus sensosrs shall be referenced / created in the templates.yaml
I’ve included all my modbus sensors in the modbus.yaml and kept custom sensors in the templates.yaml.

I’ve mapped all Schneider modbus I needed and created a dashboard, an improved Insight like dashboard using a template from sunsynk-power-flow-card
and created several automations via Node-Red

If help is needed let me know. I would share all my yaml files but I can’t figure out how can I upload those here.

1 Like

Hello!
Unfortunately, I’m not a programming expert. But after dedicating a few hours and adapting the code from Github Maxwell175, I’ve managed to connect my Schneider XW+ to Home Assistant.

However, not all the values ​​I can read are consistent. I read many of the binary or fixed values ​​correctly, but the rest, especially the voltage and current readings, are inconsistent. For example, the battery voltage should read around 50/52V, but the result I’m getting is 889192448.00.
Could someone give me a clue as to what’s happening so I can investigate further?

Thank you very much.

@gallecs

make sure when you are reading the modbus data you are telling HA yaml code how to read it. different data points have different data type registers.
for example the voltages use int32 registers- if you read them as int16 your data will be wildly wrong…

see my example:

      - name: "XW Battery Voltage"
        unique_id: xwbatteryvoltage
        data_type: int32
        input_type: holding
        #count: 2
        slave: 10
        address: 80
        unit_of_measurement: V
        scale: 0.001
        offset: 0
        precision: 2
        device_class: voltage
        state_class: measurement
        #lazy_error_count: 99

binary status elements are usually unsigned 16 registers. (unsigned means it doesnt have a negative value) See this example:

      - name: XW Inverter Status
        unique_id: xw_inverter_status
        data_type: uint16
        input_type: holding
        slave: 10
        address: 122
        #lazy_error_count: 999

pay attention signed values int16 and in32. or if its an unsigned value : uint16 and uint32- also be sure you have right address- wrong addresses will give you wrong values.