For example, this is what some of the code looks like in notepad ++ versus the formating in the html text in the browser…
I worked through all the context stuff, and got it working.
Thanks for pointing me in the right direction!!
On to the NEXT custom integrations…
Thanks John!
Can I connect Directly to the SCP, Its the only monitoring accessory I have, no Gateway or ComBox.
@Kramos As far as I know, connecting directly to the SCP is a non-starter. Schnieder’s Conext devices talk with each other via the Xanbus protocol. A Gateway or older ComBox does the conversion between their proprietary Xanbus and standard Modbus protocols. So, one or the other is required to make a connection with their devices.
Hey pal, can you provide me with you .yaml files? o paste the yaml here with code brackets?
Update 1: No problem i just saw the example you posted above lol
Update 2: Added sensors yaml as provided by @johnnyc , will edit again and add the configuration.yaml scheme
Update 3: I notice the modbus configuration style has changed and also the data_input syntax now you have to declare the full type for example int must be int16 or int32 and so on, uint must be uint16, uint32 or uint64. Other wise you will have an error. Withe the old style as it is right now you will get Integrate sensors error. I have fix the syntax and currently working on updating the data types. I have change all of the values to meet my current inverter which is a XW+6848, @johnnyc i would update all the values by making a copy of your spreadsheet, i will send you the file once updated so you add those to the document. Thanks for making all of this Will update soon.
Update 4: Added the new syntax style for config scheme, added scan_interval to grid power for my use case with XW+6848, but be aware that you can add these to your entries to refresh the data more frequently. Hope this helps!
#sensors.yaml
#conext_gateway device over Modbus
- platform: template
sensors:
sw_operating_mode:
friendly_name: "Operating Mode"
value_template: >-
{% if is_state('sensor.conext_sw_operating_mode', '2') %}
Standby
{% elif is_state('sensor.conext_sw_operating_mode', '3') %}
Operating
{% else %}
N/A
{% endif %}
- platform: template
sensors:
sw_device_state:
friendly_name: "Device State"
value_template: >-
{% if is_state('sensor.conext_sw_device_state', '0') %}
Hibernate
{% elif is_state('sensor.conext_sw_device_state', '1') %}
Power Save
{% elif is_state('sensor.conext_sw_device_state', '2') %}
Safe Mode
{% elif is_state('sensor.conext_sw_device_state', '3') %}
Operating
{% elif is_state('sensor.conext_sw_device_state', '4') %}
Diagnostic Mode
{% elif is_state('sensor.conext_sw_device_state', '5') %}
Remote Power Off
{% elif is_state('sensor.conext_sw_device_state', '255') %}
Data Not Available
{% else %}
N/A
{% endif %}
- platform: template
sensors:
sw_inverter_enabled:
friendly_name: "Inverter Enabled"
value_template: >-
{% if is_state('sensor.conext_sw_inverter_enabled', '2') %}
Standby
{% elif is_state('sensor.conext_sw_inverter_enabled', '3') %}
Operating
{% else %}
N/A
{% endif %}
- platform: template
sensors:
sw_charger_enabled:
friendly_name: "Charger Enabled"
value_template: >-
{% if is_state('sensor.conext_sw_charger_enabled', '2') %}
Standby
{% elif is_state('sensor.conext_sw_charger_enabled', '3') %}
Operating
{% else %}
N/A
{% endif %}
- platform: template
sensors:
sw_active_faults:
friendly_name: "Active Faults"
value_template: >-
{% if is_state('sensor.conext_sw_active_faults', '0') %}
No Active Faults
{% elif is_state('sensor.conext_sw_active_faults', '1') %}
Has Active Faults
{% else %}
N/A
{% endif %}
- platform: template
sensors:
sw_active_warnings:
friendly_name: "Active Warnings"
value_template: >-
{% if is_state('sensor.conext_mppt_active_warnings', '0') %}
No Active Warnings
{% elif is_state('sensor.conext_mppt_active_warnings', '1') %}
Has Active Warnings
{% else %}
N/A
{% endif %}
- platform: template
sensors:
sw_charger_status:
friendly_name: "Charger Status"
value_template: >-
{% if is_state('sensor.conext_sw_charger_status', '768') %}
Not Charging
{% elif is_state('sensor.conext_sw_charger_status', '769') %}
Bulk
{% elif is_state('sensor.conext_sw_charger_status', '770') %}
Absorption
{% elif is_state('sensor.conext_sw_charger_status', '771') %}
Overcharge
{% elif is_state('sensor.conext_sw_charger_status', '772') %}
Equalize
{% elif is_state('sensor.conext_sw_charger_status', '773') %}
Float
{% elif is_state('sensor.conext_sw_charger_status', '774') %}
No Float
{% elif is_state('sensor.conext_sw_charger_status', '775') %}
Constant VI
{% elif is_state('sensor.conext_sw_charger_status', '776') %}
Charger Disabled
{% elif is_state('sensor.conext_sw_charger_status', '777') %}
Qualifying AC
{% elif is_state('sensor.conext_sw_charger_status', '778') %}
Qualifying APS
{% elif is_state('sensor.conext_sw_charger_status', '779') %}
Engaging Charger
{% elif is_state('sensor.conext_sw_charger_status', '780') %}
AC Good
{% elif is_state('sensor.conext_sw_charger_status', '781') %}
APS Good
{% elif is_state('sensor.conext_sw_charger_status', '782') %}
AC Fault
{% elif is_state('sensor.conext_sw_charger_status', '783') %}
Charge
{% elif is_state('sensor.conext_sw_charger_status', '784') %}
AC Fault
{% elif is_state('sensor.conext_sw_charger_status', '785') %}
Charge
{% elif is_state('sensor.conext_sw_charger_status', '786') %}
Absorption Exit Pending
{% elif is_state('sensor.conext_sw_chargerstatus', '787') %}
Ground Fault
{% elif is_state('sensor.conext_sw_charger_status', '788') %}
AC Good Pending
{% elif is_state('sensor.conext_sw_chargerstatus', '789') %}
Load Shaving
{% elif is_state('sensor.conext_sw_charger_status', '790') %}
AC Support
{% elif is_state('sensor.conext_sw_charger_status', '791') %}
AC Coupled
{% elif is_state('sensor.conext_sw_charger_status', '792') %}
AC Coupled Bulk
{% elif is_state('sensor.conext_sw_charger_status', '793') %}
AC Coupled Absorption
{% elif is_state('sensor.conext_sw_charger_status', '794') %}
AC Coupled Float
{% elif is_state('sensor.conext_sw_charger_status', '795') %}
AC Coupled No Float
{% elif is_state('sensor.conext_sw_charger_status', '796') %}
External BMS
{% elif is_state('sensor.conext_sw_charger_status', '797') %}
Load Sense
{% else %}
N/A
{% endif %}
- platform: template
sensors:
sw_inverter_status:
friendly_name: "Inverter Status"
value_template: >-
{% if is_state('sensor.conext_sw_inverter_status', '1024') %}
Invert
{% elif is_state('sensor.conext_sw_inverter_status', '1025') %}
AC Pass Through
{% elif is_state('sensor.conext_sw_inverter_status', '1026') %}
APS Only
{% elif is_state('sensor.conext_sw_inverter_status', '1027') %}
Load Sense
{% elif is_state('sensor.conext_sw_inverter_status', '1028') %}
Inverter Disabled
{% elif is_state('sensor.conext_sw_inverter_status', '1029') %}
Load Sense Ready
{% elif is_state('sensor.conext_sw_inverter_status', '1030') %}
Engaging Inverter
{% elif is_state('sensor.conext_sw_inverter_status', '1031') %}
Engaging Inverter
{% elif is_state('sensor.conext_sw_inverter_status', '1032') %}
Inverter Standby
{% elif is_state('sensor.conext_sw_inverter_status', '1033') %}
Grid-Tied
{% elif is_state('sensor.conext_sw_inverter_status', '1034') %}
Grid Support
{% elif is_state('sensor.conext_sw_inverter_status', '1035') %}
Gen Support
{% elif is_state('sensor.conext_sw_inverter_status', '1036') %}
Sell-to-Grid
{% elif is_state('sensor.conext_sw_inverter_status', '1037') %}
Load Shaving
{% elif is_state('sensor.conext_sw_inverter_status', '1038') %}
Grid Frequency Stabilization
{% elif is_state('sensor.conext_sw_inverter_status', '1039') %}
AC Coupling
{% elif is_state('sensor.conext_sw_inverter_status', '1040') %}
Reverse Ibatt
{% else %}
N/A
{% endif %}
- platform: template
sensors:
mppt_operating_mode:
friendly_name: "Operating Mode"
value_template: >-
{% if is_state('sensor.conext_mppt_operating_mode', '2') %}
Standby
{% elif is_state('sensor.conext_mppt_operating_mode', '3') %}
Operating
{% else %}
N/A
{% endif %}
- platform: template
sensors:
mppt_device_state:
friendly_name: "Device State"
value_template: >-
{% if is_state('sensor.conext_mppt_device_state', '0') %}
Hibernate
{% elif is_state('sensor.conext_mppt_device_state', '1') %}
Power Save
{% elif is_state('sensor.conext_mppt_device_state', '2') %}
Safe Mode
{% elif is_state('sensor.conext_mppt_device_state', '3') %}
Operating
{% elif is_state('sensor.conext_mppt_device_state', '4') %}
Diagnostic Mode
{% elif is_state('sensor.conext_mppt_device_state', '5') %}
Remote Power Off
{% elif is_state('sensor.conext_mppt_device_state', '255') %}
Data Not Available
{% else %}
N/A
{% endif %}
- platform: template
sensors:
mppt_charger_enabled_status:
friendly_name: "Charger Enabled Status"
value_template: >-
{% if is_state('sensor.conext_mppt_charger_enabled_status', '0') %}
Disabled
{% elif is_state('sensor.conext_mppt_charger_enabled_status', '1') %}
Enabled
{% else %}
N/A
{% endif %}
- platform: template
sensors:
mppt_active_faults:
friendly_name: "Active Faults"
value_template: >-
{% if is_state('sensor.conext_mppt_active_faults', '0') %}
No Active Faults
{% elif is_state('sensor.conext_mppt_active_faults', '1') %}
Has Active Faults
{% else %}
N/A
{% endif %}
- platform: template
sensors:
mppt_active_warnings:
friendly_name: "Active Warnings"
value_template: >-
{% if is_state('sensor.conext_mppt_active_warnings', '0') %}
No Active Warnings
{% elif is_state('sensor.conext_mppt_active_warnings', '1') %}
Has Active Warnings
{% else %}
N/A
{% endif %}
- platform: template
sensors:
mppt_charge_mode_status:
friendly_name: "Charge Mode Status"
value_template: >-
{% if is_state('sensor.conext_mppt_charge_mode_status', '0') %}
Stand alone
{% elif is_state('sensor.conext_mppt_charge_mode_status', '1') %}
Primary
{% elif is_state('sensor.conext_mppt_charge_mode_status', '2') %}
Secondary
{% else %}
N/A
{% endif %}
- platform: template
sensors:
bm_device_state:
friendly_name: "Device State"
value_template: >-
{% if is_state('sensor.conext_bm_device_state', '0') %}
Hibernate
{% elif is_state('sensor.conext_bm_device_state', '1') %}
Power Save
{% elif is_state('sensor.conext_bm_device_state', '2') %}
Safe Mode
{% elif is_state('sensor.conext_bm_device_state', '3') %}
Operating
{% elif is_state('sensor.conext_bm_device_state', '4') %}
Diagnostic Mode
{% elif is_state('sensor.conext_bm_device_state', '5') %}
Remote Power Off
{% elif is_state('sensor.conext_bm_device_state', '255') %}
Data Not Available
{% else %}
N/A
{% endif %}
- platform: template
sensors:
bm_dc_source_id:
friendly_name: "DC Source ID"
value_template: >-
{% if is_state('sensor.conext_bm_device_state', '3') %}
House Battery Bank 1
{% elif is_state('sensor.conext_bm_device_state', '4') %}
House Battery Bank 2
{% elif is_state('sensor.conext_bm_device_state', '5') %}
House Battery Bank 3
{% elif is_state('sensor.conext_bm_device_state', '6') %}
House Battery Bank 4
{% elif is_state('sensor.conext_bm_device_state', '7') %}
House Battery Bank 5
{% else %}
N/A
{% endif %}
- platform: template
sensors:
bm_battery_temperature:
friendly_name: "Battery Temperature"
value_template: "{{ (states('sensor.bm_battery_temperature') | float * (9.0/5.0) + 32.0) }}"
unit_of_measurement: "°F"
device_class: "temperature"
sensor: !include sensors.yaml
modbus:
- name: conext_gateway
type: tcp
host: 192.168.xxx.xxx
port: 503
delay: 2
timeout: 15
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 Inverter Enabled"
data_type: uint16
input_type: input
slave: 10
address: 71
- name: XW Active Faults Flag
data_type: uint16
input_type: input
slave: 10
address: 75
- name: XW Active Warnings Flag
data_type: uint16
input_type: input
slave: 10
address: 76
- name: XW Inverter Status
data_type: uint16
input_type: input
slave: 10
address: 122
- name: "XW Battery Current"
data_type: int32
input_type: input
count: 2
slave: 10
address: 82
unit_of_measurement: A
scale: 0.001
offset: 0
precision: 3
- name: "XW Battery Power"
data_type: int32
input_type: input
count: 2
slave: 10
address: 84
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "XW Battery Temperature"
data_type: uint32
input_type: input
slave: 10
address: 86
unit_of_measurement: degC
scale: 0.01
offset: -273
precision: 2
- name: "XW Load AC Voltage"
data_type: uint32
input_type: input
count: 2
slave: 10
address: 98
unit_of_measurement: V
scale: 0.001
offset: 0
precision: 3
- name: "XW Load AC Current"
data_type: int32
input_type: input
count: 2
slave: 10
address: 150
unit_of_measurement: A
scale: 0.001
offset: 0
precision: 3
- name: "XW Load AC Power"
data_type: int32
input_type: input
count: 2
slave: 10
address: 102
unit_of_measurement: W
scale: 1
offset: 0
precision: 0
scan_interval: 1
- name: "XW Load AC Frequency"
data_type: uint32
input_type: input
slave: 10
address: 100
unit_of_measurement: Hz
scale: 0.01
offset: 0
precision: 2
#conext_gateway device over Modbus: MPPT60 0 - Bus ID:2, Bus address:2, Modbus Slave Address (Port 503): 30
- name: "MPPT Device State"
data_type: uint16
input_type: input
slave: 30
address: 64
- name: "MPPT Active Faults"
data_type: uint16
input_type: input
slave: 30
address: 68
- name: "MPPT Active Warnings"
data_type: uint16
input_type: input
slave: 30
address: 69
- name: "MPPT Charger Enabled Status"
data_type: uint16
input_type: input
slave: 30
address: 65
- name: "MPPT Charge Mode Status"
data_type: uint16
input_type: input
slave: 30
address: 67
- name: "MPPT PV Power"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 80
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "MPPT PV Voltage"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 76
unit_of_measurement: V
scale: 0.001
offset: 0
precision: 3
- name: "MPPT PV Current"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 78
unit_of_measurement: A
scale: 0.001
offset: 0
precision: 3
- name: "MPPT DC Output Voltage"
data_type: int32
input_type: input
count: 2
slave: 30
address: 88
unit_of_measurement: V
scale: 0.001
offset: 0
precision: 3
- name: "MPPT DC Output Current"
data_type: int32
input_type: input
count: 2
slave: 30
address: 90
unit_of_measurement: A
scale: 0.001
offset: 0
precision: 3
- name: "MPPT Energy From PV This Hour"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 102
unit_of_measurement: kWh
scale: 0.001
offset: 0
precision: 3
- name: "MPPT PV Input Active This Hour"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 104
unit_of_measurement: kWh
scale: 0.001
offset: 0
precision: 3
- name: "MPPT Energy From PV Today"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 106
unit_of_measurement: kWh
scale: 0.001
offset: 0
precision: 3
- name: "MPPT PV Input Active Today"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 106
unit_of_measurement: kWh
scale: 0.001
offset: 0
precision: 3
- name: "MPPT Energy From PV This Week"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 110
unit_of_measurement: kWh
scale: 0.001
offset: 0
precision: 3
- name: "MPPT PV Input Active This Week"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 112
unit_of_measurement: kWh
scale: 0.001
offset: 0
precision: 3
- name: "MPPT Energy From PV This Month"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 114
unit_of_measurement: kWh
scale: 0.001
offset: 0
precision: 3
- name: "MPPT PV Input Active This Month"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 116
unit_of_measurement: kWh
scale: 0.001
offset: 0
precision: 3
- name: "MPPT Energy From PV This Year"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 118
unit_of_measurement: kWh
scale: 0.001
offset: 0
precision: 3
- name: "MPPT PV Input Active This Year"
data_type: uint32
input_type: input
count: 2
slave: 30
address: 120
unit_of_measurement: kWh
scale: 0.001
offset: 0
precision: 3
- name: "MPPT Operating Mode"
data_type: uint32
input_type: holding
slave: 30
address: 172
#conext_gateway device over Modbus: Modbus Slave Address (Port 503): 1
- name: "GW PV Harvest Power"
data_type: uint32
input_type: input
count: 2
slave: 1
address: 68
unit_of_measurement: W
scale: 1
offset: 0
precision: 0
- name: "GW DC Charging Power"
data_type: uint32
input_type: input
count: 2
slave: 1
address: 70
unit_of_measurement: W
scale: 1
offset: 0
precision: 0
- name: "GW DC Inverting Power"
data_type: uint32
input_type: input
count: 2
slave: 1
address: 74
unit_of_measurement: W
scale: 1
offset: 0
precision: 0
- name: "GW Grid Input Power"
data_type: uint32
input_type: input
count: 2
slave: 1
address: 82
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
scan_interval: 1
- name: "GW Grid Output Power"
data_type: uint32
count: 2
slave: 1
address: 88
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "GW Load Power (In/Out)"
data_type: int32
input_type: input
count: 2
slave: 1
address: 94
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "GW Load Output Power"
data_type: uint32
input_type: input
count: 2
slave: 1
address: 96
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "GW Load In Power"
data_type: uint32
input_type: input
count: 2
slave: 1
address: 98
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "GW Load In Power"
data_type: int32
input_type: input
count: 2
slave: 1
address: 98
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "GW Load Power"
data_type: int32
input_type: input
count: 2
slave: 1
address: 102
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "GW CXW AC1 Power"
data_type: uint32
input_type: input
count: 2
slave: 1
address: 130
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "GW CXW AC Out Power"
data_type: int32
input_type: input
count: 2
slave: 1
address: 136
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "GW MPPT PV Power"
data_type: uint32
input_type: input
count: 2
slave: 1
address: 144
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
- name: "GW MPPT Battery Power"
data_type: uint32
input_type: input
count: 2
slave: 1
address: 148
scale: 1
offset: 0
precision: 0
device_class: energy
unit_of_measurement: W
#data_type: int, uint, float, string, custom (default int)
#count: 1, 2 (default 1 for 16-bit register, 2 for 32-bit register)
#input_type: holding, input (default holding)
#CSW2524 0 - Bus ID:2, Bus Address:1, Modbus Slave Address (Port 503): 90
#XW+6848 0 - Bus ID:2, Bus Address:1, Modbus Slave Address (Port 503): 10
#MPPT60 0 - Bus ID:2, Bus Address:2, Modbus Slave Address (Port 503): 30
#BattMon 0 - Bus ID:2, Bus Address:3, Modbus Slave Address (Port 503): 190
#XW SCP 0 - Bus ID:2, Bus Address:0, Modbus Slave Address (Port 503): 70
#Conext Gateway xxx.xxx.xxx.xxx, Port 503
I have a CSW4048 with the Battery Monitor and an XW SCP as well as the Generator Start.
I would love to get this working on my Home Assistant but I am having trouble getting it to connect properly.
I have added the code @Kramos posted above and change the IP address to my system as well as set the slave to 90 for my SW4048 I also had to change the line “input_type: input” to “input_type: holding” other wise I would not get any data. But now the data makes no sense just very long strings of numbers. Any help would be greatly appreciated. It appears that the Modbus mapping is different for the SW4048. Does anyone have a link for the correct mapping. I cant find it anywhere on schneiders website.
thanks in advance for any help.
Never mind I got is all worked out. thanks for the head start
Just saw this post. Glad you got it working. What did you do to get it worked out with your CSW4048 setup?
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.
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:
Any thoughts of what could gone wrong? Thanks in advance for your help.