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
1,219 views 2 comments
by anonymous

Hi everyone,

I have a question that is perhaps partly answered in this answer.

I want to use the TRB142 modem to send data via the command line interface to http://www.thethingsnetwork.org using MQTT.

The configuration for MQTT Publishing is done as shown in the screenshot below.

On the Mosquitto website I find the command "mosquitto_pub" to publish data under a certain topic, however this command is not available from within the command line interface.

  1. Does this mean, that no mosquitto client is installed on the TRB142?
    And if so...
  2. ... the mosquitto client can be installed manually (as mentioned in the first link)?
  3. ... what is the configuration of MQTT Publisher for (see screenshot)?

Any hint is very much appreciated.

Cheers
Daniel

1 Answer

0 votes
by anonymous
If they are your credentials for the MQTT broker it looks it should work.

Note that the Teltonika gear does not sit there pushing data out unless it is requested by a published topic ie router/#serialnumber/temperature with payload of 'get'. The mqtt topics are also hidden and cannot be obtained by simple running a # sub on the connected broker as no data has been transfered without a get publish.
by

Hi Justin,

thank you for your fast reply. I understand that the TBR142 can only publish data under a certain topic to the broker (specified by the credentials given in the web interface) when requested to. The issue is, how can I envoke such a request (on the command line interface)? From all I know is that mosquitto is being used for MQTT, but I recognize no command in the CLI similar to "mosquitto_pub". This would be the command to publish data under a certain topic to the broker, but there is no such command available. I assume that I need to install a mosquitto client myself on the TBR142 (as mentioned in this answer). But if so, what for is the MQTT Publisher section in the web interface?

Cheers
Daniel

by anonymous

The MQTT Publisher is to Publish the MQTT data to an external broker, like a cloud based broker or one that you run at home maybe.

https://wiki.teltonika.lt/view/Monitoring_via_MQTT

They are all the topics available and explains how to get access to the data via mqtt. There is also some CLI commands there if you so please.