Differences
This shows you the differences between two versions of the page.
install_22_4_mqtt [2024/02/07 21:22] – created system | install_22_4_mqtt [2024/02/07 22:47] (current) – system | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== MQTT Real-time Support | + | ====== MQTT real-time support |
===== Install Mosquitto ===== | ===== Install Mosquitto ===== | ||
- | * Install the Mosquitto MQTT Broker as per these fine instructions: | + | * Install the Mosquitto MQTT broker according to these detailed |
* https:// | * https:// | ||
- | * Make sure you do **Step 3** to secure the it with usernames | + | * Make sure you perform |
- | * In this document we use username and password of **openwrt**. Please | + | * In this document we use the username and password of **openwrt**, please |
<alert type=" | <alert type=" | ||
- | * Please use a strong | + | * Please use a secure |
</ | </ | ||
===== Install Rdcore-API-Gateway ===== | ===== Install Rdcore-API-Gateway ===== | ||
- | * The Rdcore-API-Gateway is a Node.js application. We will start off by installing | + | * The Rdcore API Gateway is a Node.js application. We start with the installation of Node.js and npm. |
<code bash> | <code bash> | ||
sudo apt install nodejs | sudo apt install nodejs | ||
sudo apt install npm | sudo apt install npm | ||
</ | </ | ||
- | * Go to /opt directory | + | * Change |
<code bash> | <code bash> | ||
cd /opt | cd /opt | ||
Line 26: | Line 26: | ||
sudo git clone https:// | sudo git clone https:// | ||
</ | </ | ||
- | * Go to newly cloned directory | + | * Change |
<code bash> | <code bash> | ||
cd / | cd / | ||
</ | </ | ||
- | * Install NPM Dependencies | + | * Install NPM dependencies |
<code bash> | <code bash> | ||
sudo npm install | sudo npm install | ||
Line 48: | Line 48: | ||
</ | </ | ||
- | * The Rdcore API Gateway Systemd Startup File | + | * The Rdcore API gateway systemd startup file |
<code bash> | <code bash> | ||
sudo cp / | sudo cp / | ||
</ | </ | ||
- | * Enable | + | * Activate |
<code bash> | <code bash> | ||
sudo systemctl enable rdcore-api-gateway.service | sudo systemctl enable rdcore-api-gateway.service | ||
</ | </ | ||
- | * Start the Rdcore API Gateway | + | * Start the Rdcore API gateway |
<code bash> | <code bash> | ||
sudo systemctl start rdcore-api-gateway.service | sudo systemctl start rdcore-api-gateway.service | ||
sudo systemctl status rdcore-api-gateway.service | sudo systemctl status rdcore-api-gateway.service | ||
</ | </ | ||
- | * Confirm the service is running by visiting | + | * Confirm |
* e.g http:// | * e.g http:// | ||
- | ===== MQTT Settings | + | ===== MQTT settings |
- | * To enable | + | * To activate |
* For the devices managed by MESHdesk and APdesk there is this GUI under **Settings** -> **MQTT** | * For the devices managed by MESHdesk and APdesk there is this GUI under **Settings** -> **MQTT** | ||
{{: | {{: | ||
* Command topic is always **/ | * Command topic is always **/ | ||
- | * Then for the server to use MQTT instead of the heartbeat system you have to edit the following | + | * To enable |
* Edit **/ | * Edit **/ | ||
- | * Look for this sections and adapt to your server's values. | + | * Search |
<code php> | <code php> | ||
$config[' | $config[' | ||
$config[' | $config[' | ||
</ | </ |