/Start-here-nodeJS

Live Objects Client code samples for the MQTT protocol, written in JavaScript for node.js

BSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Live Objects MQTT Client

scheduled npm audit Automated Release Notes by gren

This project includes Live Objects Client code samples for the MQTT protocol.

Quick start

Download

Clone this repository from GitHub:

$ git clone https://github.com/DatavenueLiveObjects/Start-here-nodeJS

Prerequisites

  1. Install NodeJs (https://nodejs.org/en/download/)
  2. Install samples dependencies (from package.json, example, https://github.com/mqttjs/MQTT.js)

    npm install

Setup your own private environment

  • copy the template in a private file

cp initEnv.template.sh initEnv.dontpush.sh

  • edit initEnv.dontpush.sh
  • source it

. ./initEnv.dontpush.sh

Start using samples

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.js

License

Copyright (c) 2015 — 2023 Orange

This code is released under the BSD3 license. See the LICENSE file for more information.

Contact

Contribute