FOR TIPS, gUIDES & TUTORIALS

subscribe to our Youtube

GO TO YOUTUBE

14455 questions

17168 answers

28195 comments

0 members

We are migrating to our new platform at https://community.teltonika.lt. Moving forward, you can continue discussions on this new platform. This current platform will be temporarily maintained for reference purposes.
0 votes
542 views 3 comments
by anonymous
Good evening.

My question is regard to the possibility to manage the MQTT Actions (publish, subscribe) by a digital signal that comes from a Beckhoff plc. In particular I want to publish in a topic a message when the Digital isolated Galvanic port change status from "Low Level" to "High level".

I also want to ask: It's possibile to write line command like "mosquitto_pub -h 192.168.1.1 -t "topic"..." in the CLI ? If yes, Where are the command list to intrface with CLI ?

1 Answer

0 votes
by anonymous

Hello,

In general an MQTT connection takes place between two Clients and a Broker. A TRB device and RUT/TCR router can be Broker, Client or both. The MQTT Publisher can send responses containing values of these system parameters, if device supports that parameter:

This article provides a guide on how to configure and use a basic MQTT setup on TRB devices and on RUT, TCR routers:

Monitoring_via_MQTT

Regards.

by anonymous

Good evening. 

I know the way of MQTT communication behaviuor. I already read the article and , if it's possibile, i need to ask the following topic: I would like to use the I/O ports to create the following event. The router will be connected to the PLC of a sorting machine. When the PLC launches a sequence of actions (macromoves) it also launches a digital signal that changes the status of the digital galvanic isolated input port (2-7 of the RUT 955 ports) from "low level" to "HIGH level". The router can be programmed for the publisher to run a MQTT publish command on a certain topic ? In other words: is it possible to create an HTTP post command to tell the router to "post" a message on a topic ?

regards

by anonymous
I do have the same question. I want to use the input of the TRB141 to publish a MQTT message. Looking at the I/O Juggler of this TRB I do see the next "actions" email, Output, HTTP, Script, Reboot, Profile. RMS and SMS. But NO MQTT here.

I assume this Juggler is the place to configure the MQTT messaging??
by anonymous

I'm replaying here in order to answer the Ploige question. I achieved my solution creating a script (python) with the paho-mqtt library. In particular i use two clients in this way: one client executes the publish command (client2.publish(f"router/get", "digital2")) and the second execute the subscribe client (client.subscribe(f"router/1118702025/digital2"))). PLease take note that the number is the serial number of my RUT955. I don't know the features of TRB141 but if you search in the teltonika wiki i think that you can find the table of TRB141 that are possibile to monitor. 

I hope that i was clear and this soluition could help you