This is a NodeJS driver/framework for the Dream Cheeky USB Message Board
.
It contains preinstalled plugins for weather, clock and Bitcoin exchange rate. Custom plugins can be easily written.
git clone https://github.com/b2un0/node-dcled.git
cd node-dcled
npm install
npm install --only=dev
npm run-script examples
npm install dcled
const dcled = require('dcled');
let board = new dcled();
board.connect();
// inspect the examples for more
There is a Docker Container with mqtt client https://hub.docker.com/r/b2un0/dcled
services:
dcled:
image: b2un0/dcled:latest
restart: always
container_name: dcled
network_mode: bridge
devices:
- /dev/bus/usb
environment:
NODE_HID_DRIVER: "libusb"
DCLED_DEVICE_NUMBER: "0"
MQTT_HOST: "mqtt://192.168.1.2:1883"
# MQTT_HOST: "mqtt://USERNAME@PASSWORD:192.168.1.2:1883"
MQTT_TOPIC: "home/dcled"
the topic payload must be a json like this:
{
"text": "word", // must be a string (short)
"align": 0 // optional, positive integer padding from left side, negative integer = padding from right side, 0 = default = auto
}