HA - modbus SDM 630

Good day
I use energy meter SDM630, USB serial.
These settings work
core-2021.6.6
the version is no longer functional.
core-2021.7.3

In the configuration.yaml file I’ve the following:

modbus:
type: serial
method: rtu
port: /dev/ttyUSB0
baudrate: 9600
stopbits: 1
bytesize: 8
parity: N

according to that instruction, it was operational for half a year

This will probably be the answer to my question.
But I’m quite an amateur and I don’t know what to change. Can anyone advise?
Thank you

ill try to help as i just converted mine over. Do you currently have all of your sensors in the sensor.yaml?

modbus:
  type: serial
  method: rtu
  port: /dev/ttyUSB0
  baudrate: 9600
  stopbits: 1
  bytesize: 8
  parity: N


# Sensors
sensor:
  - platform: modbus
    registers: !include sdm630_registers.yaml

I have in my own file

im not an expert on splitting through files like that im sorry. I basically have nothing in sensor.yaml anymore related to modbus. I moved everything into the config.yaml. this is my working config now for the modbus. you put the sensors right below the modbus: entry.

#################################
### SOLAR INVERTERS ###
#################################

modbus:
  - name: SB 6.0 Inverter
    type: tcp
    host: 192.168.1.147
    port: 502
    sensors:
      - name: SB 6.0 Solar Power
        device_class: power
        unit_of_measurement: W
        slave: 3
        address: 30775
        input_type: input
        count: 2
        scan_interval: 60
      - name: SB 6.0 Total Yield Inverter
        device_class: power
        unit_of_measurement: Wh
        slave: 3
        address: 30529
        input_type: input
        count: 2
        scan_interval: 60
      - name: SB 6.0 Internal Temp Inverter
        device_class: temperature
        unit_of_measurement: C
        scale: 0.1
        precision: 1
        slave: 3
        address: 34113
        input_type: input
        count: 2
        scan_interval: 300


  - name: SB 6.0 Inverter 2
    type: tcp
    host: 192.168.1.123
    port: 502
    sensors:
      - name: SB 6.0 Solar Power 2
        device_class: power
        unit_of_measurement: W
        slave: 3
        address: 30775
        input_type: input
        count: 2
        scan_interval: 60
      - name: SB 6.0 Total Yield Inverter 2
        device_class: power
        unit_of_measurement: Wh
        slave: 3
        address: 30529
        input_type: input
        count: 2
        scan_interval: 60
      - name: SB 6.0 Internal Temp Inverter 2
        device_class: temperature
        unit_of_measurement: C
        scale: 0.1
        precision: 1
        slave: 3
        address: 34113
        input_type: input
        count: 2
        scan_interval: 300
modbus:
  - name: sdm
    type: serial
    method: rtu
    port: /dev/ttyUSB0
    baudrate: 9600
    stopbits: 1
    bytesize: 8
    parity: N
    sensors:
      - name: 630 Phase 2 line to neutral volts
        precision: 2
        register: 2
        register_type: input
        slave: 1
        unit_of_measurement: Volts
        count: 2
        data_type: float

configuration check:

Invalid config for [modbus]: [register] is an invalid option for [modbus]. Check: modbus->modbus->0->sensors->0->register. (See /config/configuration.yaml, line 19).

they dont use the word register anymore. change register: 2 to address: 2

and register_type is now input_type

1 Like

Thank you very much.
Yes this works! .-)

# modbus pro sdm630
modbus:
  - name: sdm
    type: serial
    method: rtu
    port: /dev/ttyUSB0
    baudrate: 9600
    stopbits: 1
    bytesize: 8
    parity: N
    sensors:
      - name: 630 Total kWh
        precision: 2
        address: 342
        input_type: input
        slave: 1
        unit_of_measurement: kWh
        count: 2
        data_type: float