OpenRemote
Introduction
In this article you will find instructions on how to setup OpenRemote Manager as a MQTT Broker and how to setup a RUT router as a MQTT Publisher and send data over to this OpenRemote Broker.
With that, you will be able to configure any other device as a MQTT Subscriber, and listen to any published info by the router or other devices on this same broker.
Prerequisites
You will need:
- OpenRemote system
- A router from RUTx, TCRx or TRBx series
Hardware Description
Hardware descriptions can be found in different Quick Start Guides (QSG). There you will find an overview of the various components on the front and back of a device, hardware installation instructions, first login information, device specifications, and general safety information. Link: Quick Start Guides
Set up your Development Environment
Teltonika Networks devices comes with our created firmware, therefore no additional development or scripting is required for this unit to support OpenRemote.
Setting up OpenRemote
Quickstart
Refer to the online OpenRemote documentation at Quckstart. Follow the steps in the section Quickstart to create your own environment with full access.
NOTE: In examples, port 1883
was used for MQTT protocol. To use this port you need to add it to your docker-compose
file.
Create a service user
The service user will give programmatic access to the MQTT client.
- Go to the users page and create a new service user (second panel on the page).
- Name the service user 'mqtt_user' and give the user the read and write role for the sake of convenience. It is advised to configure a more restricted role for your service users.
- Click 'Create', a secret will be generated automatically.
- Open the 'mqtt_user' user to see and copy the secret.
Create an asset with attributes
We will create a Thing asset (MQTT subscriber), but feel free to use an AssetType that matches your physical device.