MQTT

MQTT is a publish/subscribe, extremely simple and lightweight messaging protocol, designed by IBM for constrained devices and low-bandwidth, high-latency or unreliable networks, where battery power is critical. Due to its features of delivery assurance and bandwidth reduction, MQTT is being used by some Cloud platforms such as IBM or Carriots, which means that Waspmote data can be stored inside them or in any other one based on this protocol.

More information: http://mqtt.org/faq.

With this plugin, Waspmote sensor data can be directly integrated with a MQTT broker.

Configuration

The broker is a key agent in MQTT protocol. The broker is a server which receives all the frames and distributes each one of them to the subscribers clients. In Server/Broker

Configuration, the user can set:

  • IP Address: Server IP address.

  • Port number: Server port number.

  • User: Server user name to log in the MQTT system.

  • Password: Server password to log in the MQTT server.

  • Topic template: Topic of your message. The user can use these wild-cards creating a personalized structure:

    • #MESHLIUM#: Identifier for Meshlium.

    • #ID#: Unique identifier for data.

    • #ID_WASP#: Identifier for Waspmote.

    • #SENSOR#: Sensor identification.

  • Message template: Data structure of your message. The user can use these wild-cards creating a customized content:

    • #ID#: Unique identifier for data.

    • #ID_WASP#: Identifies the Waspmote unit.

    • #ID_SECRET#: Secret identifier.

    • #SENSOR#: Identifies the sensor.

    • #VALUE#: Value obtained from the sensor.

    • #TS("c")#: Date with custom format. The parameter passed in this wild-card corresponds to the same ones you can use in PHP date function (see format parameters in http://php.net/manual/es/function.date.php#refsect1-function.date-parameters).

Examples about MQTT Servers/Brokers:

Note: in this example, the broker was running on a computer inside our local network for test purposes only. For professional use, it is recommended to work with a 24/7 server with static IP address.

Controlling status

Once configured the server/broker, the user can launch the Meshlium MQTT program (Start button). The program will search for the received frames on the local database, and will send them to the broker via MQTT protocol. The status indicator displays the current state, saying "Running" or "Stopped".

You can stop the MQTT sender anytime clicking on the "Stop" button.

Platforms using MQTT

MQTT has been widely implemented across a variety of industries. As of March 2013, MQTT is in the process of undergoing standardization at OASIS protocol stack. The protocol specification has been openly published with a royalty-free license for many years, and companies such as Eurotech (formerly known as Arcom) have implemented the protocol in their products.

Here are a number of notable projects that have made use of MQTT and related technologies. Companies like Cisco, Eclipse Foundation, Eurotech, IBM, Kaazing, M2Mi, Red Hat, Software AG, TIBCO and Carriots, among other companies, are working with this protocol.

More information about examples and uses: http://mqtt.org/wiki/doku.php/example_uses.

Last updated