MQTT Real-time Support for MESHdesk and APdesk

Install Mosquitto

  • Please use a strong password for the MQTT user in a production environment.

Install Rdcore-API-Gateway

  • Go to /opt directory
cd /opt
  • Clone Rdcore API Gateway from Github
sudo git clone https://github.com/RADIUSdesk/Rdcore-API-Gateway.git
  • Go to newly cloned directory
cd /opt/Rdcore-API-Gateway
  • Install NPM Dependencies
sudo npm install
  • Rename .env.sample to .env and edit
sudo mv .env.sample .env
sudo vi .env
#FQDN of your installed server
  • The Rdcore API Gateway Systemd Startup File
sudo cp /opt/Rdcore-API-Gateway/rdcore-api-gateway.service /lib/systemd/system/
  • Enable the Rdcore API Gateway
sudo systemctl enable rdcore-api-gateway.service
  • Start the Rdcore API Gateway
sudo systemctl start rdcore-api-gateway.service
sudo systemctl status rdcore-api-gateway.service

MQTT Settings in RADIUSdesk

  • To enable MQTT on RADIUSdesk there are two places where it has to be configured.
  • For the devices managed by MESHdesk and APdesk there is this GUI under SettingsMQTT

  • 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.
  • Edit /var/www/html/cake4/rd_cake/config/MESHdesk.php
  • Look for this sections and adapt to your server's values.
$config['mqtt_settings']['enable_realtime']	= true;
$config['mqtt_settings']['api_gateway_url']	= '';