8355 questions

9835 answers


14036 members

+1 vote
420 views 1 comments
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

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, 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 -t router/get -l
root@raspberrypi:~# echo 'name' | mosquitto_pub -h -t get/1102600000/command -l
root@raspberrypi:~# echo 'uptime' | mosquitto_pub -h -t get/1102600000/command -l

root@ubtest:~$ mosquitto_sub -h -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.

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

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.