Looking for a little help after reading what seems like hundreds of snippets and articles.
I have the device connected and a sensor configured. I get no data from the device. I can see in the logs that it is sending the following string.
Here is my config for the sensor
- name: Power1
unique_id: OfficePower
unit_of_measurement: KW
input_type: input
slave: 1
address: 0x0090
data_type: float16
What gets sent out by HA is the following:
send: 0x1 0x3 0x0 0x90 0x0 0x1 0x84 0x27
This seems to suggest HA is sending a function code 3 out. I need it to send a function code 4 out (read a register)
The Autometers Modbus RTU and Modbus ASCII protocols uses a subset of the standard
Modbus function codes to provide access to measurement and information registers. These
standard function codes provide basic support for IEEE 32-bit floating point numbers, 16 bit
integer and 8 bit char values.
Function Code
Name
Usage
0x04Read Input RegistersUsed for reading floating point and 16 bit
integer measurements
0x06Write Single RegisterUsed for writing floating point and 16 bit
integer values to a single register
0x10Write Multiple RegistersUsed for writing floating point and 16 bit
integer values to multiple registers
0x11Report Device IDUsed for reading device information including
device ID, description, software version etc
Read Device IdentificationUsed for reading device identification and
additional information
Does anyone have any idea how I can commiticate and send out a function code 4 message (read) a register type float16 from register 0x0090
Totally stumped by this.
Any help appreciated.
Cheers
