Glowplug makes it easier to work with Sparkplug B data over MQTT for Industrial IoT (IIoT) use cases
10K+
Glowplug makes it easier to work with Sparkplug B data over MQTT for Industrial IoT (IIoT) applications.
If you're new to IIoT or industrial automation, Sparkplug data can be difficult to work with, and it's binary encoding is not human readable. Glowplug is designed to demystify Sparkplug data, by making every metric value more accessible and human readable.
If you need to know the current value of a specific metric on your edge without talking to a MQTT broker, Glowplug makes it available for you in Redis. You can also subscribe to that value in Redis when it updates.
If you want individual metrics exposed in a UNS when they update, Glowplug can optionally publish them for you.
docker run --network="host" aphexddb/glowplug:latest listen --broker mqtt://localhost:1883 --publish mqtt://localhost:1883
Or, if you have Go installed, install glowplug from the command line:
go install github.com/american-factory-os/glowplug@latest
glowplug listen --broker mqtt://localhost:1883 --publish mqtt://localhost:1883
Next, add a redis url to store current values:
glowplug listen --broker mqtt://localhost:1883 --redis redis://localhost:6379/0 --publish mqtt://localhost:1883
--broker contains the MQTT broker glowplug will listen for Sparkplug messages.
mqtt://localhost:1883 (commonly used for mosquitto).--publish will publish each metrics to a unique topic in a UNS (more below on this).
View your MQTT broker directly with MQTT Explorer.
--redis will specify the redis server for glowplug to store all Sparkplug metrics from birth and data messages in a SET, and publish them to a channel of the same key as the set.You can explore glowplug data in Redis with Redis Insight. All data is prefixed with the value glowplug, so you can search for glowplug:* to see all the keys. Glowplug also stores all the metric data types it has seen in the hash glowplug:metric_types.
If you are using Node Red, the node-red-contrib-redis module makes it easy to consume a redis channel containing Sparkplug metric data using SUBSCRIBE.
Glowplug ensures a consistent and unique namespace for all Redis keys, and MQTT topics. For example, given a Sparkplug payload (using the parris method) that contains a device metric of data type "Float" named "Current/Celsius":
spBv1.0/Plant1:Area3:Line4:Cell2/DDATA/Heater/TempSensorwill be mapped as follows:
glowplug:plant1:area3:line4:cell2:heater:tempsensor:current:celsius
glowplug:plant1:area3:line4:cell2:heater:tempsensor:current:celsius
glowplug/Plant1/Area3/Line4/Cell2/Heater/TempSensor/Current/Celsius
Glowplug also includes a Go module for interacting with Sparkplug B protocol buffers. Install it with:
go get github.com/american-factory-os/glowplug/sparkplug
See example/sparkplug_and_mqtt for example usage.
Content type
Image
Digest
sha256:8635da284…
Size
84.5 MB
Last updated
over 1 year ago
docker pull aphexddb/glowplug