Hi, I am trying to get data from my SMA Solar Inverter. All addresses and the general function are tested with another Modbus client. So I know that address and connection are working. But when I configure the telegraf modbus plugin, this is what I am getting:
mathias@devbitch:~/Desktop$ telegraf --config http://localhost:8086/api/v2/telegrafs/0b81784f974ac000
2023-07-15T00:56:40Z I! Loading config: http://localhost:8086/api/v2/telegrafs/0b81784f974ac000
2023-07-15T00:56:40Z I! Starting Telegraf 1.27.2
2023-07-15T00:56:40Z I! Available plugins: 237 inputs, 9 aggregators, 28 processors, 23 parsers, 59 outputs, 4 secret-stores
2023-07-15T00:56:40Z I! Loaded inputs: modbus
2023-07-15T00:56:40Z I! Loaded aggregators:
2023-07-15T00:56:40Z I! Loaded processors:
2023-07-15T00:56:40Z I! Loaded secretstores:
2023-07-15T00:56:40Z I! Loaded outputs: influxdb_v2
2023-07-15T00:56:40Z I! Tags enabled: host=devbitch
2023-07-15T00:56:40Z I! [agent] Config: Interval:10s, Quiet:false, Hostname:"devbitch", Flush Interval:10s
2023-07-15T00:56:40Z I! [inputs.modbus] Got 2 request(s) touching 2 holding registers for 2 fields (slave 3)
2023-07-15T00:56:40Z I! [inputs.modbus] Got 0 request(s) touching 0 inputs registers for 0 fields (slave 3)
2023-07-15T00:56:40Z I! [inputs.modbus] Got 0 request(s) touching 0 discrete registers for 0 fields (slave 3)
2023-07-15T00:56:40Z I! [inputs.modbus] Got 0 request(s) touching 0 coil registers for 0 fields (slave 3)
**2023-07-15T00:56:50Z E! [inputs.modbus] Error in plugin: slave 3: modbus: exception '2' (illegal data address), function '131'**
2023-07-15T00:56:51Z I! [agent] Hang on, flushing any cached metrics before shutdown
2023-07-15T00:56:51Z I! [agent] Stopping running outputs
This is my config file.
[agent]
interval = "10s"
round_interval = true
metric_batch_size = 1000
metric_buffer_limit = 10000
collection_jitter = "0s"
flush_interval = "10s"
flush_jitter = "0s"
precision = ""
hostname = ""
omit_hostname = false
[[outputs.influxdb_v2]]
urls = ["http://localhost:8086"]
token = "$INFLUX_TOKEN"
organization = "765WID"
bucket = "sma"
[[inputs.modbus]]
name = "SunnyBoy"
timeout = "1s"
controller = "tcp://192.168.1.230:502"
configuration_type = "request"
[[inputs.modbus.request]]
slave_id = 3
byte_order = "ABCD"
register = "holding"
measurement = "inverter"
fields = [
{ address=30203, name="Operation.Health", type="UINT16"},
{ address=30775, name="GridMs.TotW", type="INT16"}
]
Does anyone have experience with this error and might be able to give a hint?