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.
+1 vote
777 views 1 comments
by
MQTT Publish is available as option for the RUTX11, but the documentation does not say WHAT it can be used for?

2 Answers

+1 vote
by anonymous

I was wondering about the same thing. After some digging around, I found that it's documented on the wiki that this feature is to allow for some monitoring via MQTT: Monitoring via MQTT

After enabling the MQTT Broker (without any security, just for testing) and configuring the MQTT Publisher to connect to 127.0.0.1, here's the three commands that I sent from a RasPi in my network and (from a different computer) what I got back. Router ID is redacted a bit.

root@raspberrypi:~# echo 'id' | mosquitto_pub -h 192.168.10.254 -t router/get -l
root@raspberrypi:~# echo 'name' | mosquitto_pub -h 192.168.10.254 -t get/1102600000/command -l
root@raspberrypi:~# echo 'uptime' | mosquitto_pub -h 192.168.10.254 -t get/1102600000/command -l

root@ubtest:~$ mosquitto_sub -h 192.168.10.254 -v -t \#
router/get id
router/id 1102600000
get/1102600000/command name
router/1102600000/name RUTX08000000
get/1102600000/command uptime
router/1102600000/uptime 11338
...so this is fully in line with what the wiki describes.
by anonymous

Thanks for the helpful response. I feel like calling this functionality "MQTT Publisher" is what has confused quite a few people (including myself). The natural expectation is that a correctly configured "publisher" would proactively publish information to the broker. Instead it only does so once a request is published on a specific topic by another party. The "Monitoring via MQTT" docs ultimately clarify this, though it does seem like a counter-intuitive approach.

I'm working with a TRB145, and the "MQTT Publisher" docs for that device unfortunately provide no info regarding what it actually does...so thank god for google and for this forum :).

0 votes
by anonymous

Hi Daniel,

An MQTT Publisher is a client that sends messages to the Broker, who then forwards these messages to the Subscriber. You can check here and here for more information.