Schneider Electric Solar TCP Modbus Integration

Could you elaborate a bit more on how you solved your issue. I am in exact same position, and so far failed to make it work.

Hi @Kramos thanks for sharing. Can u added all your config in github ?
I dont have Conext Gateway, but i will try use Combox.
Thnkyou,

this may be of help.

Found this a long time ago. Think it describes the underlying modbus protocol xantrex used for the devices.

Hello, my config file is the same that i have posted above. Nochanges and nothing different from what is there, as for the Combox, you need to found the Modbus Map for the device, then go ahead and convert your HEX Modbus Addressed to decimal. I have been very busy a lot of thing going on i havent had a chance to provide @johnnyc with the updated documents, which is his i just added a couple stuff, but since he is the owner it is up to him to share it. As soon as i can i will provide him with the updated document.

Great information, thanks

I have done some research, i would like to go forward and see if we can make this an integration, to have a seamless configuration. But will see, cant promise anything anytime soon.

Sorry for the delayed response.

The first thing I had to do was go into my Combox configuration and change the Modbus Bight Order to MSB first.

After that all I had to do was edit my configuration.yaml

Here is a sample of what I added that worked for me:

modbus:

  - name: conext_gateway
    type: tcp
    host: ENTER YOUR IP HERE
    port: 502
    delay: 2
    timeout: 14
   
    sensors:

      - name: "Battery SOC"
        data_type: uint32
        unit_of_measurement: "%"
        scale: 1
        slave: 1
        address: 76
        device_class: energy
        
      - name: "Load AC Power"
        data_type: uint32
        unit_of_measurement: W
        scale: 1
        slave: 90
        address: 132
        device_class: energy
        
      - name: "AC Input Power"
        data_type: uint32
        unit_of_measurement: W
        scale: 1
        slave: 90
        address: 100
        device_class: energy
        
      - name: "Charge DC Power"
        data_type: uint32
        unit_of_measurement: W
        scale: 1
        slave: 90
        address: 92
        device_class: energy
        
      - name: "Load Output Energy Today"
        data_type: uint32
        unit_of_measurement: kWh
        scale: 0.001
        precision: 1
        slave: 90
        address: 220
        device_class: energy
        state_class: total_increasing
        
        
      - name: "Energy From Battery This Hour"
        data_type: uint32
        unit_of_measurement: kWh
        scale: 0.001
        precision: 1
        slave: 90
        address: 144
        device_class: energy
        state_class: total_increasing
        
        
      - name: "Energy to Battery This Hour"
        data_type: uint32
        unit_of_measurement: kWh
        scale: 0.001
        precision: 1
        slave: 90
        address: 168
        device_class: energy
        state_class: total_increasing
        
      - name: "Generator Status"
        data_type: uint16
        scale: 1
        slave: 51
        address: 77
        device_class: energy
        
      - name: "Generator to Battery This Hour"
        data_type: uint32
        unit_of_measurement: kWh
        scale: 0.001
        precision: 1
        slave: 90
        address: 192
        device_class: energy
        state_class: total_increasing

I’m new to all this. I’m probably doing this in the wrong place. I just installed Casa OS on a RaspberryPi and installed home assistant in a docker. Can someone tell me how to get the data from my Schneider Sw4048 into home assistant? Any and all help will be greatly appreciated.

I am confused as to what hardware I need between my Conext SW 2524 and Home assistant to make this integration work. I presume that I would either need the Xantrex combox or SE Insight gateway.
Is there another hardware solution that is not going to cost me $300-$400? I have Solar Assistant running on a RPi but SA doesn’t support Schneider inverters.

@cleverjay In order for this to work you need one of the two devices as schneider uses their own fork of Modbus called xanbus and the Combox or Gateway can translate to the original modbus.

1 Like

Do you have the combox or gateway installed on your system?

I seem to have the same issue @m0ngr31 was experiencing (sensor flipping between “Unavailable” and a good value, seemingly every other update).

This is from the log:

Logger: homeassistant.components.modbus.modbus
Source: components/modbus/modbus.py:388
Integration: Modbus (documentation, issues)
First occurred: 9:21:58 PM (2 occurrences)
Last logged: 9:22:28 PM

Pymodbus: conext_gateway: Modbus Error: [Connection] ModbusTcpClient(192.168.1.113:503): Connection unexpectedly closed 0.000019 seconds into read of 8 bytes without response from unit before it closed connection
Pymodbus: conext_gateway: Modbus Error: [Connection] ModbusTcpClient(192.168.1.113:503): Connection unexpectedly closed 0.000028 seconds into read of 8 bytes without response from unit before it closed connection

This is my config.yaml:

modbus:
  - name: conext_gateway
    type: tcp
    host: 192.168.1.113
    port: 503
    delay: 2
    timeout: 14
    sensors:        
      - name: "XW Inverter Enabled"
        data_type: uint16
        input_type: input
        slave: 10
        address: 71

I have a flow set up in Node-RED using the node-red-contrib-modbus package and reliably receive the value every time with any poll rate I choose (500ms up to ten minutes).

I have the Conext Gateway Facility, 2x XW Pro, 4x MPPT 100 600, and EG4 batteries (with closed-loop communication to the gateway). No matter which device I target, it’s the same error in the log. My log snippet is after a clear, but it was up over 30 of the same error from Pymodbus.

I have tried different delays and timeouts with no success. Obviously a fix would be nice, but I would be willing to live with throwing away the “Unavailable” readings and keeping the actual readings. Do you guys know of a way to do that?

Thanks for sharing the configuration. I have the XWPro6848 using your sensors.yaml I’m receiving this readings in these 2 sensor:
sensor

Any thoughts of what could gone wrong? Thanks in advance for your help.

Also I have searched for the modbus map of the XWPro6848 but couldn’t find it. It’s to verify if something changes in the address number and could be given me those reading.

Thanks for any help!

Hey there, as far as i know the 6848 pro and the regular one has the same modbus map for all that apply as equals, Ex. Battery Voltage on both has the same address. I need you to provide your config of the sensor. There might something wrong on the sensor.yaml, recently the Gateway i was using for testing purposes died, no connection to internet and im also not able to reset it to factory defaults, it is turning on and responding. No time to debug or test.

Hi thanks for your response. This is my configuration for those sensors:


Thanks in advance for your help.

This is what works for me. Looks like data_type should be uint16 for both. Also the address I use for frequency is 152. It looks like the address you have (100) is for AC current.

      - name: "XW Battery Temperature"
        data_type: uint16
        input_type: input
        slave: 10
        address: 86
        unit_of_measurement: degC
        scale: 0.01
        offset: -273
        precision: 2

      - name: "XW Load AC Frequency"
        data_type: uint16
        input_type: input
        slave: 10
        address: 152
        unit_of_measurement: Hz
        scale: 0.01
        offset: 0
        precision: 2

Hello Dave,

Thanks for your help, those values did work. Now showing sensor as supposed to. Thanks again!

It’s easy to setup the energy dashboard. Add state_class: total to some of the lifetime stats (i.e. PV Input Energy Lifetime at address 326) to make it a “long-term statistic”. Then you can add it to the energy dashboard

1 Like

Here are the ModBus Maps for these Conext Devices, XW/XW+ , Schneider Link shared below:

[SE Devices Link PDF’s Zip - Below:
503-0244-01-01_RevA.4_Modbus_Map_Conext_SW_Device.pdf
503-0245-01-01_RevA.4_Modbus_Map_Freedom_SW_Device.pdf
503-0246-01-01_RevA.4_Modbus_Map_Conext_XW_Device.pdf
503-0247-01-01_RevA.4_Modbus_Map_AGS_Device.pdf
503-0248-01-01_RevA.4_Modbus_Map_MPPT60_Device.pdf
503-0250-01-01_RevA.4_Modbus_Map_GridTie_Device.pdf
503-0251-01-01_RevA.4_Modbus_Map_SCP_Device.pdf
503-0252-01-01_RevA.4_Modbus_Map_MPPT80_Device.pdf
503-0253-01-01_RevA.4_Modbus_Map_ConverterComBox_Device.pdf
503-0261-01-01_RevA.4_Battery_Monitor_Device.pdf
503-0262-01-01_RevA.4_Freedom Sequence Device.pdf

These maps can be found in the InsightHome and InsightFacility downloads section. Under Technical Documents.
https://solar.se.com/us/wp-content/uploads/sites/7/2022/02/Conext-Gateway-InsightHome-InsightFacility-Modbus-Maps.zip

2 Likes

hi all. I just found this post a d found it very interesting.
i have a schieder SW4024 inverter and am InsightHome smart edge device.
my charge controllers are another brand.
will this be good enough to monitor a few sensors like:
ac voltage out
dc voltage in
consumption current and power?
total newbie with HA so if anyone is willing to help will be much much appreciated.
i will need a headstart on the ymal code
thanks
M.