So i’ve been fighting with the Power Meter now which give me RS485 modbus out, or so they say.
For ages I could get NOTHING from this meter, I scanned the entire bus and all device addresses etc, NOTHING.
So, I called the supplied and they supplied me with a tool to test the bus to make sure that it was sending and responding to data, to rule out a faulty meter. And it worked! So its not a faulty meter.
The device address is 1, the registrar im trying to read is 40001, something about a 32bit registrar.
The documentation state a BAUD rate of 9600 so I have to assume that the BAUD is 9600.
Im trying to connect with this method.
Connected to a ESP32 TX2 and RX2 pins. Still, I get nothing from it. - RX and TX reversed.
The meter is a DDS-1Y-36L-80A-M and more info can be found here! Please can someone help me with this, ive been going at this for 1 month now.
[23:24:34][C][ota:093]: Over-The-Air Updates:
[23:24:34][C][ota:094]: Address: modbus.local:3232
[23:24:34][C][ota:097]: Using Password.
[23:24:34][C][api:138]: API Server:
[23:24:34][C][api:139]: Address: modbus.local:6053
[23:24:34][C][api:141]: Using noise encryption: YES
[23:24:34][C][modbus_controller:275]: ModbusController:
[23:24:34][C][modbus_controller:276]: Address: 0x01
[23:24:34][C][modbus_controller:278]: sensormap
[23:24:34][C][modbus_controller:282]: Sensor type=4 start=0x1 offset=0x0 count=1 size=2
[23:24:34][C][modbus_controller:282]: Sensor type=4 start=0x9C41 offset=0x0 count=1 size=2
[23:24:34][C][modbus_controller:284]: ranges
[23:24:34][C][modbus_controller:287]: Range type=4 start=0x1 count=1 skip_updates=0
[23:24:34][C][modbus_controller:287]: Range type=4 start=0x9C41 count=1 skip_updates=0
[23:24:53][VV][api.service:512]: on_ping_request: PingRequest {}
[23:24:53][VV][api.service:043]: send_ping_response: PingResponse {}
[23:25:05][VV][scheduler:226]: Running interval 'update' with interval=60000 last_execution=701072 (now=761073)
[23:25:05][V][modbus_controller:158]: Updating modbus component
[23:25:05][VV][modbus_controller:162]: Updating range 0x1
[23:25:05][V][modbus_controller:125]: Range : 1 Size: 1 (4) skip: 0
[23:25:05][VV][modbus_controller:162]: Updating range 0x9C41
[23:25:05][V][modbus_controller:125]: Range : 9C41 Size: 1 (4) skip: 0
[23:25:05][V][modbus_controller:036]: Sending next modbus command to device 1 register 0x01 count 1
[23:25:05][VV][uart.arduino_esp32:151]: Flushing...
[23:25:05][V][modbus:199]: Modbus write: 01.04.00.01.00.01.60.0A (8)
[23:25:05][V][modbus_controller:486]: Command sent 4 0x1 1
[23:25:05][V][modbus_controller:036]: Sending next modbus command to device 1 register 0x01 count 1
[23:25:05][VV][uart.arduino_esp32:151]: Flushing...
[23:25:05][V][modbus:199]: Modbus write: 01.04.00.01.00.01.60.0A (8)
[23:25:05][V][modbus_controller:486]: Command sent 4 0x1 1
[23:25:06][V][modbus_controller:036]: Sending next modbus command to device 1 register 0x01 count 1
[23:25:06][VV][uart.arduino_esp32:151]: Flushing...
[23:25:06][V][modbus:199]: Modbus write: 01.04.00.01.00.01.60.0A (8)
[23:25:06][V][modbus_controller:486]: Command sent 4 0x1 1
[23:25:06][V][modbus_controller:036]: Sending next modbus command to device 1 register 0x01 count 1
[23:25:06][VV][uart.arduino_esp32:151]: Flushing...
[23:25:06][V][modbus:199]: Modbus write: 01.04.00.01.00.01.60.0A (8)
[23:25:06][V][modbus_controller:486]: Command sent 4 0x1 1
[23:25:06][V][modbus_controller:036]: Sending next modbus command to device 1 register 0x01 count 1
[23:25:06][VV][uart.arduino_esp32:151]: Flushing...
[23:25:06][V][modbus:199]: Modbus write: 01.04.00.01.00.01.60.0A (8)
[23:25:06][V][modbus_controller:486]: Command sent 4 0x1 1
[23:25:06][D][modbus_controller:032]: Modbus command to device=1 register=0x01 countdown=0 no response received - removed from send queue
Here is the YAML on ESP32
esphome:
name: modbus
friendly_name: modbus
esp32:
board: esp32dev
framework:
type: arduino
# Enable logging
logger:
level: VERY_VERBOSE
uart:
id: mod_bus
tx_pin: 17
rx_pin: 16
baud_rate: 9600
stop_bits: 1
modbus:
flow_control_pin: 5
id: modbus1
modbus_controller:
- id: epever
## the Modbus device addr
address: 0x1
modbus_id: modbus1
setup_priority: -10
captive_portal:
sensor:
- platform: modbus_controller
id: power_meter
name: "power_meter"
address: 1
unit_of_measurement: "kWh"
register_type: read
value_type: U_DWORD
filters:
- multiply: 0.1