An open source MQTT driver for WAGO PFC controllers backplane.
This project is still in beta - please use at your own risk and post any bugs to issues
Version 2.0 introduces updates that will break version 1.X.X. of the node-red-contrib-wago nodes for Node-RED.
- KBUS connects directly to MQTT broker either onboard the controller or externally
- Status and error messages are sent under /kbus/status topic
- KBUS process data is transmitted under /kbus/event <inputs/outputs> topic
- Supoprt all WAGO "simple" modules, analog and digital
- Entirely event driven I/O bus minimizes network stress
- Very low CPU resource usage
Install the driver on your controller. This is done with the following command:
wget https://github.com/jessejamescox/kbus-daemon-installer/archive/refs/heads/main.zip && unzip main.zip && sh kbus-daemon-installer-main/installer.sh
Input events will be transmitted upon change-of-state. This will be a JSON structured message the the module position and channel position. The output structure follows the formatting for state.reported For example:
{
"state": {
"reported": {
"controller": {
"modules": {
"module1": {
"channels": {
"channel1": {
"value": 123
}
}
}
}
}
}
}
}
Similar to the input structure, you can command outputs over MQTT by passing a JSON object with the following structure:
{
"state": {
"desired": {
"controller": {
"modules": {
"module2": {
"channels": {
"channel1": {
"value": true
}
}
}
}
}
}
}
}
Channel parameters can be configured by passing values as well. Here is an example for setting a deadband and a label to the specific channel:
{
"state": {
"desired": {
"controller": {
"modules": {
"module3": {
"channels": {
"channel1": {
"label": "tankLevel_4-20ma",
"deadband": 25
}
}
}
}
}
}
}
}
Currently the only supported configurations are deadband for analog inputs, and label for all channels. More are planned with future development.
- WAGO PFC with firmware >= 18
This project is open source and can be modified. See here for the development repo kbus-daemon source for more information.
- 8-2-2021
- Restructured the JSON payload to make it more IoT friendly
- Added API allows you to tag IO channels and set deadband threshold for analog inputs
- Removed the integrated mosquitto broker. If this is required you must use Docker to add the broker or connect to external broker
- Added support for mqtt connection via TLS
- Added supoprt for AWS IoT Thing shadow topic and message formatting
kbus-daemon-installer is under the MIT license. See the LICENSE for more information.