Differences

This shows you the differences between two versions of the page.

Link to this comparison view

install_22_4_mqtt [2024/02/07 21:22] – created systeminstall_22_4_mqtt [2024/02/07 22:47] (current) system
Line 1: Line 1:
-====== MQTT Real-time Support for MESHdesk and APdesk ======+====== MQTT real-time support for MESHdesk and APdesk ======
  
 ===== Install Mosquitto ===== ===== Install Mosquitto =====
-  * Install the Mosquitto MQTT Broker as per these fine instructions:+  *  Install the Mosquitto MQTT broker according to these detailed instructions:
         * https://www.vultr.com/docs/install-mosquitto-mqtt-broker-on-ubuntu-20-04-server/         * https://www.vultr.com/docs/install-mosquitto-mqtt-broker-on-ubuntu-20-04-server/
-  * Make sure you do **Step 3** to secure the it with usernames and passwords+  *  Make sure you perform **step 3** to secure the application with username and password
-  * In this document we use username and password of **openwrt**. Please change according to your preference.+  *  In this document we use the username and password of **openwrt**, please change them according to your needs.
  
 <alert type="info"> <alert type="info">
-  * Please use a strong password for the MQTT user in a production environment.+  * Please use a secure password for the MQTT user in a production environment.
 </alert> </alert>
  
  
 ===== Install Rdcore-API-Gateway ===== ===== Install Rdcore-API-Gateway =====
-  * The Rdcore-API-Gateway is a Node.js application. We will start off by installing Node.js and npm.+  * 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
 </code> </code>
-  * Go to /opt directory+  * Change to the /opt directory
 <code bash> <code bash>
 cd /opt cd /opt
Line 26: Line 26:
 sudo git clone https://github.com/RADIUSdesk/Rdcore-API-Gateway.git sudo git clone https://github.com/RADIUSdesk/Rdcore-API-Gateway.git
 </code> </code>
-  * Go to newly cloned directory+  * Change to the newly cloned directory
 <code bash> <code bash>
 cd /opt/Rdcore-API-Gateway cd /opt/Rdcore-API-Gateway
 </code> </code>
-  * Install NPM Dependencies+  * Install NPM dependencies
 <code bash> <code bash>
 sudo npm install sudo npm install
Line 48: Line 48:
  
 </code> </code>
-  * The Rdcore API Gateway Systemd Startup File+  * The Rdcore API gateway systemd startup file
 <code bash> <code bash>
 sudo cp /opt/Rdcore-API-Gateway/rdcore-api-gateway.service /lib/systemd/system/ sudo cp /opt/Rdcore-API-Gateway/rdcore-api-gateway.service /lib/systemd/system/
 </code> </code>
-  * Enable the Rdcore API Gateway+  * Activate the Rdcore API Gateway
 <code bash> <code bash>
 sudo systemctl enable rdcore-api-gateway.service sudo systemctl enable rdcore-api-gateway.service
 </code> </code>
-  * 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
 </code> </code>
-  * Confirm the service is running by visiting the FQDN:8001+  * Confirm that the service is running by calling the FQDN:8001
   * e.g http://cloud.radiusdesk.com:8001/   * e.g http://cloud.radiusdesk.com:8001/
  
-===== MQTT Settings in RADIUSdesk ===== +===== MQTT settings in RADIUSdesk ===== 
-  * To enable MQTT on RADIUSdesk there are two places where it has to be configured.+  *  To activate MQTT on RADIUSdesk, you must configure it in two places.
   * 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**
  
 {{:getting_started:mqtt_settings.png|}} {{:getting_started:mqtt_settings.png|}}
   * Command topic is always **/RD/NODE/COMMAND/RESPONSE**   * Command topic is always **/RD/NODE/COMMAND/RESPONSE**
-  * Then for the server to use MQTT instead of the heartbeat system you have to edit the following config file.+  * To enable the server to use MQTT instead of the heartbeat systemyou must edit the following configuration file.
   * Edit **/var/www/html/cake4/rd_cake/config/MESHdesk.php**   * Edit **/var/www/html/cake4/rd_cake/config/MESHdesk.php**
-  * Look for this sections and adapt to your server's values.+  * Search for these sections and adapt them to the values of your server.
 <code php> <code php>
 $config['mqtt_settings']['enable_realtime'] = true; $config['mqtt_settings']['enable_realtime'] = true;
 $config['mqtt_settings']['api_gateway_url'] = 'http://164.160.89.129:8001'; $config['mqtt_settings']['api_gateway_url'] = 'http://164.160.89.129:8001';
 </code> </code>
  • install_22_4_mqtt.1707333749.txt.gz
  • Last modified: 2024/02/07 21:22
  • by system