Sign inSign up

fjudith/thingsboard-demo

By fjudith

Updated over 8 years ago

Dockerized ThingsBoard MQTT demo script running amd64/node official image

Image
3

1.5K

fjudith/thingsboard-demo repository overview

Build Status

ThingsBoard Demo

This container image aims to simulate temperature and humidity sensors metrics sent by a device via MQTT protocol to ThingsBoard.

ThingsBoard is an open-source IoT platform for data collection, processing, visualization, and device management. it supports various messaging protocols such as:

Description

The Dockerfile builds from the official Node.js image "amd64/node:latest" (see https://hub.docker.com/r/amd64/node/)

This image does not leverage embedded database nor persistent data.

Quick Start

Create a device from the ThingsBoard dashboard and copy the access token from the credential panel. Run the following command with the appropriates host name and access token.

docker container run --rm --name=tbdemo \
-e THINGSBOARD_HOST='thingsboard.example.com' \
-e DEVICE_ACCESS_TOKEN='v3ry1nS3cur3T0k3n' \
-e FREQUENCY="100" \
fjudith/thingsboard-demo

Metrics will be shipped to ThingsBoard's MQTT listener every 100 milliseconds.

Environment variables
VariableDescriptionDefault value
THINGSBOARD_HOSTHostname, IP address or Fully Qualified name of the ThingsBoard MQTT listenerdemo.thingsboard.io
DEVICE_ACCESS_TOKENAccess token provisionned from the Thingsboard Devices pannelempty
MINIMUM_TEMPERATURESimulated minimum temperature17.5
MAXIMUM_TEMPERATURESimulated maximum temperature30
MINIMUM_HUMIDITYSimulated minimum humidity12
MAXIMUM_HUMIDITYSimulated maximum humidity90
MINIMUM_LATITUDESimulated minimum latitude48.8534100 (Paris)
MAXIMUM_LATITUDESimulated maximum latitude48.856438 (Paris)
MINIMUM_LONGITUDESimulated maximum longitude2.3488000 (Paris)
MAXIMUM_LONGITUDESimulated maximum longitude2.352456 (Paris)
FIRMWARE_VERSIONCustom firmware version$(uname -s)
SERIAL_NUMBERCustom serial number$(uname -r)
FREQUENCYMetrics publishing frequency in milliseconds1000 (1s)
VARIABILITYPercent of randomization between min. and max0.03 (3%)
Reference

Tag summary

Content type

Image

Digest

Size

254.7 MB

Last updated

over 8 years ago

docker pull fjudith/thingsboard-demo