This project includes Live Objects Client code samples for the MQTT protocol.
- LiveObjects official help includes a dev. guide mqtt section
- Samples are written in JavaScript for node.js.
- Samples require minimal common environment described in "Quick start" below.
Clone this repository from GitHub:
$ git clone https://github.com/DatavenueLiveObjects/Start-here-nodeJS
- Install NodeJs (https://nodejs.org/en/download/)
- Install samples dependencies (from package.json, example, https://github.com/mqttjs/MQTT.js)
npm install
- copy the template in a private file
cp initEnv.template.sh initEnv.dontpush.sh- edit
initEnv.dontpush.shaccording to your constraints and with your own API KEYS - source it
source ./initEnv.dontpush.sh- verify environment
env|grep LO_Go to sample dedicated documentation.
The samples are:
- lo-device - a mqtt client using
device mode, this sample is able to connect, receive command, receive firmware updates and config. This device can send data messages too. - lo-application - a mqtt client using
application mode, this sample is able to listen a given fifo.
Example:
source ./initEnvLO.dontpush.sh
node samples/lo-device/lo-device.jsCopyright (c) 2015 — 2026 Orange
This code is released under the BSD3 license. See the LICENSE file for more information.
- Homepage: liveobjects.orange-business.com
- cf CONTRIBUTING