Integracja-Komunikacja modbus RS485 z licznikiem DTS238-7

Cześć,
Jak w tytule chciałbym wykonać integrację z moim licznikiem Hiking Tomzn DTS238-7.
posiadam konwerter RS485-TTL, esp d1_mini oraz dokumentację modbus do licznika.


Przechwytywanie2
image
Przechwytywanie5
Przechwytywanie6
Przechwytywanie3

Planuje wzorować się na kodzie znalezionym na naszym forum lecz do innego licznika:

substitutions:

  devicename: "dtsu-logger"

  friendly_name: DTSU-Logger

wifi:

  ssid: "xxxx"

  password: "xxx"

 

  # Enable fallback hotspot (captive portal) in case wifi connection fails

  ap:

    ssid: "dstu666 Fallback Hotspot"

    password: "xxx"

#captive_portal:

# Enable Home Assistant API

api:

  encryption:

    key: "xxx"

ota:

  password: "xxx"

# Enable Web server

#web_server:

#  port: 80

esphome:

  name: $devicename

  platform: ESP8266

  board: esp07

  board_flash_mode: dout

  comment: DTSU666 Logger (Modbus/RS485)

logger:

    level: debug

    baud_rate: 0

   

uart:

  tx_pin: 1

  rx_pin: 3

  rx_buffer_size: 512

  baud_rate: 9600

  parity: NONE

  data_bits: 8

  stop_bits: 1

  id: uart_to_modbus

modbus:

  send_wait_time: 500ms

  id: modbus_component_hub

  uart_id: uart_to_modbus

modbus_controller:

  - id: dtsu666_modbus_controler

    address: 0x02

    modbus_id: modbus_component_hub

    update_interval: 2s

text_sensor:

  - platform: template

    name: "ESP-DTSU Uptime (human readable)"

    id: uptime_human

    icon: "mdi:clock-start"

    update_interval: 5s

sensor:

#------------------------------------------------------

# Energia

# ------------------------------------------------------

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Power_Imp

    name: "Energia pobrana z sieci kwh"

    address: 0x101E

    unit_of_measurement: "kWh"

    device_class: "energy"

    state_class: "total_increasing"

    register_type: read

    value_type: FP32

    accuracy_decimals: 2

    skip_updates: 12

    filters:

      - multiply: 1

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Power_Exp

    name: "Energia oddana do sieci kwh"

    address: 0x1028

    unit_of_measurement: "kWh"

    device_class: "energy"

    state_class: "total_increasing"

    register_type: read

    value_type: FP32

    accuracy_decimals: 2

    skip_updates: 12

    filters:

      - multiply: 1

#------------------------------------------------------

# Napięcia

#------------------------------------------------------

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Ua

    name: "Napięcie L3"

    address: 0x200A

    unit_of_measurement: "V"

    register_type: read

    value_type: FP32

    accuracy_decimals: 1

    filters:

      - multiply: 0.1

     

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Ub

    name: "Napięcie L2"

    address: 0x2008

    unit_of_measurement: "V"

    register_type: read

    value_type: FP32

    accuracy_decimals: 1

    filters:

      - multiply: 0.1  

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Uc

    name: "Napięcie L1"

    address: 0x2006

    unit_of_measurement: "V"

    register_type: read

    value_type: FP32

    accuracy_decimals: 1

    filters:

      - multiply: 0.1  

#------------------------------------------------------

# Prądy

#------------------------------------------------------      

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Ia

    name: "Prąd L3"

    address: 0x2010

    unit_of_measurement: "A"

    register_type: read

    value_type: FP32

    accuracy_decimals: 1

    filters:

      - multiply: 0.001

     

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Ib

    name: "Prąd L2"

    address: 0x200E

    unit_of_measurement: "A"

    register_type: read

    value_type: FP32

    accuracy_decimals: 1

    filters:

      - multiply: 0.001  

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Ic

    name: "Prąd L1"

    address: 0x200C

    unit_of_measurement: "A"

    register_type: read

    value_type: FP32

    accuracy_decimals: 1

    filters:

      - multiply: 0.001

  #------------------------------------------------------

  # moc chwilowa

  #------------------------------------------------------

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Pt

    name: "Moc chwilowa całkowita"

    address: 0x2012

    unit_of_measurement: "W"

    register_type: read

    value_type: FP32

    accuracy_decimals: 0

    filters:

      - multiply: 0.1

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Pa

    name: "Moc chwilowa L3"

    address: 0x2018

    unit_of_measurement: "W"

    register_type: read

    value_type: FP32

    accuracy_decimals: 0

    filters:

      - multiply: 0.1

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Pb

    name: "Moc chwilowa L2"

    address: 0x2016

    unit_of_measurement: "W"

    register_type: read

    value_type: FP32

    accuracy_decimals: 0

    filters:

      - multiply: 0.1

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Pc

    name: "Moc chwilowa L1"

    address: 0x2014

    unit_of_measurement: "W"

    register_type: read

    value_type: FP32

    accuracy_decimals: 0

    filters:

      - multiply: 0.1

#------------------------------------------------------

# power factor

#------------------------------------------------------

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Pf

    name: "Power Factor"

    address: 0x202A

    unit_of_measurement: "Pf"

    register_type: read

    value_type: FP32

    accuracy_decimals: 2

    filters:

      - multiply: 0.001

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Pfa

    name: "Power Factor L1"

    address: 0x202c

    unit_of_measurement: "Pf"

    register_type: read

    value_type: FP32

    accuracy_decimals: 2

    filters:

      - multiply: 0.001

       

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Pfb

    name: "Power Factor L2"

    address: 0x202e

    unit_of_measurement: "Pf"

    register_type: read

    value_type: FP32

    accuracy_decimals: 2

    filters:

      - multiply: 0.001

  - platform: modbus_controller

    modbus_controller_id: dtsu666_modbus_controler

    id: Pfc

    name: "Power Factor L3"

    address: 0x2030

    unit_of_measurement: "Pf"

    register_type: read

    value_type: FP32

    accuracy_decimals: 2

    filters:

      - multiply: 0.001

  #------------------------------------------------------

  # wifi signal

  #------------------------------------------------------    

  - platform: wifi_signal

    id: dtsu_wifi_signal

    name: "WiFi Signal DTSU-Logger"

    update_interval: 60s

    icon: "mdi:wifi"

 

  - platform: uptime

    id: inverter_uptime

    name: "ESP-DTSU Uptime"

    filters:

      - lambda: return x / 60.0;

    unit_of_measurement: minutes

    icon: "mdi:clock-start"

  - platform: uptime

    name: ${friendly_name} Uptime

    id: uptime_sensor

    update_interval: 5s

    icon: "mdi:clock-start"

    internal: true

    on_raw_value:

      then:

        - text_sensor.template.publish:

            id: uptime_human

            state: !lambda |-

              int seconds = round(id(uptime_sensor).raw_state);

              seconds = seconds % (24 * 3600);

              int hours = seconds / 3600;

              seconds = seconds % 3600;

              int minutes = seconds /  60;

              seconds = seconds % 60;

              return (

                (hours ? to_string(hours) + "h " : "") +

                (minutes ? to_string(minutes) + "m " : "") +

                (to_string(seconds) + "s")

              ).c_str();

  - platform: template

    unit_of_measurement: "%"

    name: "ESP-DTSU WiFi Signal (human readable)"

    accuracy_decimals: 0

    update_interval: 30s

    device_class: "signal_strength"

    icon: "mdi:wifi"

    lambda: return (-0.0134 * (id(dtsu_wifi_signal).state * id(dtsu_wifi_signal).state ) ) + (-0.2228 * id(dtsu_wifi_signal).state) + 100.2;

# Basic switch to allow you to restart the device remotely

switch:

  - platform: restart

    name: DTSU-Loger Restart

binary_sensor:

  - platform: status

    name: DTSU-Loger Status

Teraz pytanie czy w wierszach wystarczy pozmieniać adresację tak jak na przykładzie poniżej czy coś jeszcze będę musiał pozmieniać?

Przechwytywanie7

Być może parametry transmisji, prawdopodobnie też mnożniki.

Niestety po podmianie adresów na takie jak w instrukcji modbus od mojego licznika encje są niedostępne. logi z esphome wyglądają tak:

[18:24:50][C][uart.arduino_esp8266:102]: UART Bus:
[18:24:50][C][uart.arduino_esp8266:103]: TX Pin: GPIO1
[18:24:50][C][uart.arduino_esp8266:104]: RX Pin: GPIO3
[18:24:50][C][uart.arduino_esp8266:106]: RX Buffer Size: 512
[18:24:50][C][uart.arduino_esp8266:108]: Baud Rate: 9600 baud
[18:24:50][C][uart.arduino_esp8266:109]: Data Bits: 8
[18:24:50][C][uart.arduino_esp8266:110]: Parity: NONE
[18:24:50][C][uart.arduino_esp8266:111]: Stop bits: 1
[18:24:50][C][uart.arduino_esp8266:113]: Using hardware serial interface.
[18:24:50][C][modbus:139]: Modbus:
[18:24:50][C][modbus:141]: Send Wait Time: 500 ms
[18:24:50][C][template.text_sensor:021]: Template Sensor ‘ESP-DTSU Uptime (human readable)’
[18:24:50][C][template.text_sensor:021]: Icon: ‘mdi:clock-start’
[18:24:50][C][uptime.sensor:031]: Uptime Sensor ‘ESP-DTSU Uptime’
[18:24:50][C][uptime.sensor:031]: Device Class: ‘duration’
[18:24:50][C][uptime.sensor:031]: State Class: ‘total_increasing’
[18:24:50][C][uptime.sensor:031]: Unit of Measurement: ‘minutes’
[18:24:50][C][uptime.sensor:031]: Accuracy Decimals: 0
[18:24:50][C][uptime.sensor:031]: Icon: ‘mdi:clock-start’
[18:24:50][C][uptime.sensor:031]: Uptime Sensor ‘DTSU-Logger Uptime’
[18:24:50][C][uptime.sensor:031]: Device Class: ‘duration’
[18:24:50][C][uptime.sensor:031]: State Class: ‘total_increasing’
[18:24:50][C][uptime.sensor:031]: Unit of Measurement: ‘s’
[18:24:50][C][uptime.sensor:031]: Accuracy Decimals: 0
[18:24:50][C][uptime.sensor:031]: Icon: ‘mdi:clock-start’
[18:24:50][C][template.sensor:023]: Template Sensor ‘ESP-DTSU WiFi Signal (human readable)’
[18:24:50][C][template.sensor:023]: Device Class: ‘signal_strength’
[18:24:50][C][template.sensor:023]: State Class: ‘’
[18:24:50][C][template.sensor:023]: Unit of Measurement: ‘%’
[18:24:50][C][template.sensor:023]: Accuracy Decimals: 0
[18:24:50][C][template.sensor:023]: Icon: ‘mdi:wifi’
[18:24:50][C][template.sensor:024]: Update Interval: 30.0s
[18:24:50][C][modbus_controller:275]: ModbusController:
[18:24:50][C][modbus_controller:276]: Address: 0x04
[18:24:50][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:24:50][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:24:50][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:24:50][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘Energia pobrana z sieci kwh’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Device Class: ‘energy’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘total_increasing’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘kWh’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 2
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘NapiÄ™cie L3’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘V’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 1
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘NapiÄ™cie L2’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘V’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 1
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘NapiÄ™cie L1’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘V’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 1
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘PrÄ…d L3’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘A’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 1
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘PrÄ…d L2’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘A’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 1
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘PrÄ…d L1’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘A’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 1
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘Moc chwilowa caĹ‚kowita’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘W’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 0
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘Moc chwilowa L3’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘W’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 0
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘Moc chwilowa L2’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘W’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 0
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘Moc chwilowa L1’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘W’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 0
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘Power Factor’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘Pf’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 2
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘Power Factor L1’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘Pf’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 2
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘Power Factor L2’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘Pf’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 2
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensorModbus Controller Sensor ‘Power Factor L3’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor State Class: ‘’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Unit of Measurement: ‘Pf’
[18:24:50][C][modbus_controller.sensor:010]: modbus_controller.sensor Accuracy Decimals: 2
[18:24:50][C][restart:076]: Restart Switch ‘DTSU-Loger Restart’
[18:24:50][C][restart:078]: Icon: ‘mdi:restart’
[18:24:50][C][restart:098]: Restore Mode: restore defaults to OFF
[18:24:50][C][status:034]: Status Binary Sensor ‘DTSU-Loger Status’
[18:24:50][C][status:034]: Device Class: ‘connectivity’
[18:24:50][C][mdns:103]: mDNS:
[18:24:50][C][mdns:104]: Hostname: dtsu-logger
[18:24:50][C][ota:093]: Over-The-Air Updates:
[18:24:50][C][ota:094]: Address: dtsu-logger.local:8266
[18:24:50][C][ota:097]: Using Password.
[18:24:50][C][api:138]: API Server:
[18:24:50][C][api:139]: Address: dtsu-logger.local:6053
[18:24:50][C][api:141]: Using noise encryption: YES
[18:24:50][C][wifi_signal.sensor:009]: WiFi Signal ‘WiFi Signal DTSU-Logger’
[18:24:50][C][wifi_signal.sensor:009]: Device Class: ‘signal_strength’
[18:24:50][C][wifi_signal.sensor:009]: State Class: ‘measurement’
[18:24:50][C][wifi_signal.sensor:009]: Unit of Measurement: ‘dBm’
[18:24:50][C][wifi_signal.sensor:009]: Accuracy Decimals: 0
[18:24:50][C][wifi_signal.sensor:009]: Icon: ‘mdi:wifi’
[18:24:52][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:24:52][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:24:52][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:24:52][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:24:52][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:24:52][D][modbus_controller:029]: Modbus command to device=4 register=0x2012 countdown=0 no response received - removed from send queue
[18:24:53][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘1m 44s’
[18:24:53][D][sensor:126]: ‘DTSU-Logger Uptime’: Sending state 103.68400 s with 0 decimals of accuracy
[18:24:53][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘1m 44s’
[18:24:54][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:24:54][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:24:54][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:24:54][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:24:55][D][modbus_controller:029]: Modbus command to device=4 register=0x202A countdown=0 no response received - removed from send queue
[18:24:56][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:24:56][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:24:56][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:24:56][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:24:57][D][modbus_controller:029]: Modbus command to device=4 register=0x00 countdown=0 no response received - removed from send queue
[18:24:57][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘1m 49s’
[18:24:57][D][sensor:126]: ‘DTSU-Logger Uptime’: Sending state 108.67900 s with 0 decimals of accuracy
[18:24:58][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘1m 49s’
[18:24:58][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:24:58][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:24:58][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:24:58][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:24:59][D][sensor:126]: ‘ESP-DTSU Uptime’: Sending state 1.84135 minutes with 0 decimals of accuracy
[18:25:00][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:00][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:25:00][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:25:00][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:25:00][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:00][D][modbus_controller:029]: Modbus command to device=4 register=0x1010 countdown=0 no response received - removed from send queue
[18:25:02][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:02][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:25:02][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:25:02][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:25:02][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:02][D][modbus_controller:029]: Modbus command to device=4 register=0x08 countdown=0 no response received - removed from send queue
[18:25:03][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘1m 54s’
[18:25:03][D][sensor:126]: ‘DTSU-Logger Uptime’: Sending state 113.69300 s with 0 decimals of accuracy
[18:25:03][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘1m 54s’
[18:25:04][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:04][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:25:04][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:25:04][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:05][D][modbus_controller:029]: Modbus command to device=4 register=0x2A countdown=0 no response received - removed from send queue
[18:25:06][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:06][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:25:06][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:25:06][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:07][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘1m 59s’
[18:25:07][D][sensor:126]: ‘DTSU-Logger Uptime’: Sending state 118.67900 s with 0 decimals of accuracy
[18:25:08][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘1m 59s’
[18:25:08][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:08][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:25:08][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:25:08][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:25:08][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:08][D][modbus_controller:029]: Modbus command to device=4 register=0x2012 countdown=0 no response received - removed from send queue
[18:25:10][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:10][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:25:10][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:25:10][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:10][D][modbus_controller:029]: Modbus command to device=4 register=0x202A countdown=0 no response received - removed from send queue
[18:25:12][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:12][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:25:12][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:25:12][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:25:12][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘2m 4s’
[18:25:13][D][sensor:126]: ‘DTSU-Logger Uptime’: Sending state 123.68600 s with 0 decimals of accuracy
[18:25:13][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘2m 4s’
[18:25:13][D][modbus_controller:029]: Modbus command to device=4 register=0x00 countdown=0 no response received - removed from send queue
[18:25:14][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:25:14][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:25:14][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:25:14][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:15][D][sensor:126]: ‘ESP-DTSU WiFi Signal (human readable)’: Sending state 68.04480 % with 0 decimals of accuracy
[18:25:15][D][modbus_controller:029]: Modbus command to device=4 register=0x08 countdown=0 no response received - removed from send queue
[18:25:16][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:16][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:25:16][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:25:16][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:17][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘2m 9s’
[18:25:17][D][sensor:126]: ‘DTSU-Logger Uptime’: Sending state 128.68201 s with 0 decimals of accuracy
[18:25:18][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘2m 9s’
[18:25:18][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:18][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:25:18][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:25:18][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:25:18][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:18][D][modbus_controller:029]: Modbus command to device=4 register=0x2A countdown=0 no response received - removed from send queue
[18:25:20][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:20][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:25:20][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8210 count=2
[18:25:20][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:21][D][modbus_controller:029]: Modbus command to device=4 register=0x2012 countdown=0 no response received - removed from send queue
[18:25:22][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6
[18:25:22][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8 count=6
[18:25:22][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=42 count=6
[18:25:22][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=8234 count=8
[18:25:22][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘2m 14s’
[18:25:22][D][sensor:126]: ‘DTSU-Logger Uptime’: Sending state 133.67900 s with 0 decimals of accuracy
[18:25:23][D][text_sensor:067]: ‘ESP-DTSU Uptime (human readable)’: Sending state ‘2m 14s’
[18:25:23][D][modbus_controller:029]: Modbus command to device=4 register=0x1010 countdown=0 no response received - removed from send queue
[18:25:24][W][modbus_controller:112]: Duplicate modbus command found: type=0x4 address=0 count=6

W instrukcji znalazłem jeszcze taki opis do modbus:
Przechwytywanie8

Jakaś podpowiedź który parametr muszę poprawić?

Witam. Czy dało się skomunikować z licznikiem DTS? Walczę także w tej materii bez powodzenia i wydaje mi się że wyważam otwarte drzwi. Jeśli masz rozwiązanie to poroszę o podpowiedź :slight_smile:

Dostałem kolejne kody od producenta i próbowałem odczytywać licznik za pomocą oprogramowania do modbus. Niesyty większość z nich nie działa. Producent przestał mi odpisywać więc temat umarł.

Bardzo ogólnie oznacza tyle, że do kolejki wpisujesz kolejną, taką samą komendę a poprzednia nie została obsłużona. Np. za często wysyłasz zapytanie lub jakieś “timeout” jest niewłaściwy.

Nie rozwiązuj równania z dwiema niewiadomymi na raz (licznik i ESPHome).
Na początek “naucz” się licznika podłączając go do PC przez zwykły konwerter USB<>RS485.

Tak też zrobiłem, że PC z licznikiem. Okazało się, że komendy otrzymane od producenta nie działają. Udało mi się odczytać tylko nie liczne dane

Pokaż jak to robisz i czego nie możesz odczytać.
Oficjalne dane.
DTS 238-7 Manual RS485 Modbus Protokol.zip (254,6 KB)