hello,
I want to retrieve data from an Imeon inverter with ESPHome32 by the Modbus rtu protocol, the manufacturer has provided me with the documentation.
with this one I can see my frames and view the data with the software "Qmodmaster’
two examples:
with manufacturer doc > frames sent and received by qmodmaster and ESPHome logs
serial number recovery
1 serial number recovery
Frames I retrieve with qmodmaster
[RTU]>Tx > 18:45:38:609 - 01 03 00 01 00 04 15 C9
[RTU]>Rx > 18:45:38:857 - 01 03 08 00 00 50 5D 2D 3C 7F EF DC 96
Frames by ESPHome with custom_command
[21:51:27][D][uart_debug:114]: >>> 01:03:00:01:00:04:15:C9:00
[21:51:27][D][modbus_controller:032]: Modbus command to device=1 register=0xE828 countdown=0 no response received - removed from send queue
Voltage recovery:
Frames I retrieve with qmodmaster
[RTU]>Tx > 18:46:04:110 - 01 03 01 00 00 01 85 F6
[RTU]>Rx > 18:46:04:110 - 01 03 02 09 41 7E 24
Frames by ESPHome: with custom_command
[14:35:01][D][uart_debug:114]: >>> 01:03:01:00:00:01:85:F6:00
[14:35:01][D][modbus_controller:032]: Modbus command to device=1 register=0xAB13 countdown=0 no response received - removed from send queue
we see that ESPHome sends: 00 more at the end of the frame
I don’t know if this is normal!
here is my ESPHome code:
uart:
id: mod_bus
tx_pin: 17
rx_pin: 16
baud_rate: 9600
stop_bits: 1
debug:
modbus:
flow_control_pin: 5
id: modbus1
modbus_controller:
- id: imeon
## the Modbus device addr
address: 0x01
modbus_id: modbus1
setup_priority: -10
sensor:
- platform: modbus_controller
modbus_controller_id: imeon
name: "serial number"
id: serial_number
custom_command: [ 0x01, 0x03, 0x00, 0x01, 0x00, 0x04, 0x15 ]
value_type: U_QWORD_R
- platform: modbus_controller
modbus_controller_id: imeon
name: "Voltage"
id: voltage
custom_command: [ 0x01, 0x03, 0x01, 0x00, 0x00, 0x01, 0x85 ]
value_type: U_WORD
unit_of_measurement: V
value_type: I don’t know if it’s good but somehow I don’t get a response from the inverter
I hope I was clear in my request.
Thank you for your answers
be indulgent towards my English I do the French / English translation with google translate