RADIUSdesk

logo

This is an old revision of the document!


Hands-On MQTT Usage

Background

  • Although the heartbeat system used in MESHdesk / APdesk allows for remote command execution there might be situations where you need the immediate command execution.
  • Security is a big thing where I stay and with this hands on lab we will see how to make use of the MQTT implementation to switch outdoor lights remotely on and off.
  • For this lab we have:
    • MESHdesk managing a mesh network that has the following hardware
      • 3x Xiaomi 4C Units
      • 2x Dragino MS14

  • 1x 4 Channel Arduino Relay Module connected to one of the Dragino units.
  • 3x outdoor lights connected to the 4 Channel Arduino Relay Module.
    • One will be installed at the garage.
    • One will be installed at the driveway.
    • One will be installed at the backyard.
  • !!!Insert Photo of setup here!!!

GPIO Pins of Dragino MS14

  • The Dragino exposes a couple of GPIO pins on a header.

  • The GPIO pins will be connected to the Arduino Relay Module.

  • We will use the following mapping
Dragino Arduino Comment
GPIO19 In1 Driving the relay to the garage light
GPIO21 In2 Driving the relay to the driveway light
GPIO18 In3 Driving the relay to the backyard light
GPIO24 In4 Extra for future expansion
3.3v Vcc Use the 3.3V since the 5V is to high for the GPIO pin output to trigger a low / high
GND Gnd