serialMqttBridge

src/index.js

This function runs a serial to mqtt bridge.

The topics querying a command should have the syntax <type>/q/<id>/<cmd>.

The topic to get the list of all existing serial devices is <type>/q/list

serialMqttBridge(options: object)
Parameters
options (object = {})
Name Description
options.type string (default 'bioreactor') The kind of device you want to query
options.host string (default 'mqtt://localhost:1883') The broker address, e.g.: mqtt://127.0.0.1:1883
options.username string? The username of the MQTT broker, if it is secured
options.password string? The password of the MQTT broker, if it is secured