Read modbus input status / or trigger alarm RUT956

Hi!

I have a modbus unit from waveshare with 8 inputs and 8 outputs
What i want to do is read the inputs, preferable send an alarm when an inputs changes by mqtt
i have tried a lot of settings but cannot get it to work.
Maybe because my knowledge is to low… :wink:

Information about the interface can eb found here: https://www.waveshare.com/wiki/Modbus_RTU_Relay_(D)

As i understand to read input status i need to send 01 02 00 00 00 08 79 CC
But how can i do this from the RUT956 unit?

Also nice to know but not necessary for now is how to control a relay

Besides i already can read and send the gps location, so not everything is a mysterie to me :wink:

Thanks!

Hi qusax,

Welcome to Teltonika Networks Community!

If you want to read the input values of your modbus unit, you need to configure RUT956 as Modbus Serial Client. Then, alarms can be triggered using Modbus Alarm under Modbus Serial Client. MQTT as an action is available on the same instance.

Can you try to do this settings to read input values?

Let me know if this helps.

Regards,

Thanks for your help.
And adding the screenprint

Unfortunately i get the error below:
Request failed, result: Failed to get response: Illegal function

Got it working
Was trying it on tcp instead of modbus serial client.

Now the next challenge. As i understand correct i can use the alarm function to send data at the moment the input changes. Is this correct?

When i set this up as bool read input status (2) with first register number 1 cannot get it working.
Can you give me an example how to do this?
The goal is to send a mqtt message on alarm.

Thanks!

tried with 1 and with 8 but no succes

Function code 2 only reads Boolean registers from the modbus device. Single bit. 1 or 0.

So 8 is not acceptable.