diy solar

diy solar

All MODBUS Maps and Schneider XW 6848 PRO integration into Home Assistant via MODBUS TCP

Yeah, a lot of these things aren't properly documented/not documented at all, and Tech support is not much help. ?

I think your idea of the GitHub is the way to go to share all these Modbus examples. I can probably get around to it after next week and share it.



@NewGuyNoob Im using another system to get/store/visualize the schneider Modbus data but I want to move to homeassistant. I will share when done. Right now, I'm only using enough information for basic status and to change XW Inverter settings on different triggers.

In my system I have two XWPro. I have my system setup for grid export and leave the battery at 60%-70% SOC. I have a command to change those parameters on both XW at the same time to charge to 100% SOC. I use it if there is a storm warning, or the power company announces possible load shed due to not enough generation. By having the system at 50%-70% for many days the BMS SOC is off, so I have a trigger weekly to disable grid export and charge the battery bank to 56V so that the BMS recalibrate the SOC.


I have home assistant as well. Currently I have large battery modules that I will set up, it seems I will use the PACE BMS 16s200A for these 17kw modules. I expect to setup communication with my Schneider system via CAN and pull data for home assistant, then push this to HA. Or I will continue doing as we are doing now.

I have one XW Pro, and plan to purchase another soon. One has met my requirements so far, but I would like two to help offload some of the AC loads that I use, MiG TiG and plasma cutting with Shop Air, can draw a lot of power. So load managment is a must. I am fully off-grid and will remain that way for the foreseeable future.

I do have a problem validating the following code, via Developer tools - Validating the YAML, any thoughts?

YAML:
##########SEMB_BMS 0 Modbus SlaveAddress (Port 502): 230#########

modbus:
  - name: EG4 Internal BMS
    type: tcp
    host: 192.168.1.179
    port: 502
    delay: 2
    timeout: 15
    sensors:
      - name: "EG4 Internal BMS - Battery SOC"
        data_type: uint16
        unit_of_measurement: V
        scale: 1
        slave: 230
        address: 40081
        scan_interval: 15

      - name: "EG4 Internal BMS - Battery Current"
        data_type: uint16
        unit_of_measurement: A
        scale: 0.01
        slave: 230
        address: 40114
        scan_interval: 1

##########XW Pro 6848 Modbus SlaveAddress (Port 503): 171#########
   
  - name: conext gateway
    type: tcp
    host: 192.168.1.179
    port: 503
    delay: 2
    timeout: 15
    sensors:
      - name: "0 - XW 4868 Inverter Enabled"
        data_type: uint16
        input_type: input
        slave: 10
        address: 71
        scan_interval: 1

      - name: "0 - XW 4868 Active Faults Flag"
        data_type: uint16
        input_type: input
        slave: 10
        address: 75
        scan_interval: 1

Code:
    integration = await async_get_integration(self.hass, domain)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 879, in async_get_integration
    raise int_or_exc
ValueError: Invalid domain automation.reload*#data_type
 
I have home assistant as well. Currently I have large battery modules that I will set up, it seems I will use the PACE BMS 16s200A for these 17kw modules. I expect to setup communication with my Schneider system via CAN and pull data for home assistant, then push this to HA. Or I will continue doing as we are doing now.

I have one XW Pro, and plan to purchase another soon. One has met my requirements so far, but I would like two to help offload some of the AC loads that I use, MiG TiG and plasma cutting with Shop Air, can draw a lot of power. So load managment is a must. I am fully off-grid and will remain that way for the foreseeable future.

I do have a problem validating the following code, via Developer tools - Validating the YAML, any thoughts?

YAML:
##########SEMB_BMS 0 Modbus SlaveAddress (Port 502): 230#########

modbus:
  - name: EG4 Internal BMS
    type: tcp
    host: 192.168.1.179
    port: 502
    delay: 2
    timeout: 15
    sensors:
      - name: "EG4 Internal BMS - Battery SOC"
        data_type: uint16
        unit_of_measurement: V
        scale: 1
        slave: 230
        address: 40081
        scan_interval: 15

      - name: "EG4 Internal BMS - Battery Current"
        data_type: uint16
        unit_of_measurement: A
        scale: 0.01
        slave: 230
        address: 40114
        scan_interval: 1

##########XW Pro 6848 Modbus SlaveAddress (Port 503): 171#########
  
  - name: conext gateway
    type: tcp
    host: 192.168.1.179
    port: 503
    delay: 2
    timeout: 15
    sensors:
      - name: "0 - XW 4868 Inverter Enabled"
        data_type: uint16
        input_type: input
        slave: 10
        address: 71
        scan_interval: 1

      - name: "0 - XW 4868 Active Faults Flag"
        data_type: uint16
        input_type: input
        slave: 10
        address: 75
        scan_interval: 1

Code:
    integration = await async_get_integration(self.hass, domain)
                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/src/homeassistant/homeassistant/loader.py", line 879, in async_get_integration
    raise int_or_exc
ValueError: Invalid domain automation.reload*#data_type
yaml is very picky about it's whitespace. I'd start there, making sure that everything is indented properly. Also, I'd validate your yaml before the change, and after.. to make sure you aren't looking for a problem that had previously existed.
 
yaml is very picky about it's whitespace. I'd start there, making sure that everything is indented properly. Also, I'd validate your yaml before the change, and after.. to make sure you aren't looking for a problem that had previously existed.

I could validate previous to any changes mentioned here. I am editing with the built in web file editor of HA.

The configuration of MODBUS works as expected, when adding another connection, it still works, but now YAML will not validate with developer tools. However the built in file editor of HA, does a validation of the configuration prior to letting you save.

I find it odd that it works, but wont validate with developer tools section of HA, but still functions fine.
 
I could validate previous to any changes mentioned here. I am editing with the built in web file editor of HA.

The configuration of MODBUS works as expected, when adding another connection, it still works, but now YAML will not validate with developer tools. However the built in file editor of HA, does a validation of the configuration prior to letting you save.

I find it odd that it works, but wont validate with developer tools section of HA, but still functions fine.
99% of the time, this is going to be due to whitespace. copy/paste your file into one of the online yaml validator tools (remove any passwords or sensitive info just in case) and let it do a basic syntax check for ya.

If it's got no sensitive info, maybe paste it here so we can have a look?
 
99% of the time, this is going to be due to whitespace. copy/paste your file into one of the online yaml validator tools (remove any passwords or sensitive info just in case) and let it do a basic syntax check for ya.

If it's got no sensitive info, maybe paste it here so we can have a look?

Ok here is the config file, nothing is sensitive in my configuration.
 

Attachments

  • configuration.yaml.txt
    16.9 KB · Views: 25
Ok here is the config file, nothing is sensitive in my configuration.
Looks good.

Try removing the big blocks of unused (line 184-265, line 409-510). Maybe it doesn't like comments (#) indented all the way to the right.

I think you may have an error in line 1.
 
Looks good.

Try removing the big blocks of unused (line 184-265, line 409-510). Maybe it doesn't like comments (#) indented all the way to the right.

I think you may have an error in line 1.
Thanks!

Line 1 was the error, somehow I messed up the automations line, I just commented it out. It will validate now! Thanks!
 
Back
Top