This project sends the current state of a digital input to an MQTT broker.
I use this project to send the state of my wall switches to Home Assistant.
- USB-1024 Series
- It might support similar devices, your mileage may vary
The messages are published to the MQTT broker with the following formatting
uldaq2mqtt/<UniqueDeviceId>/<port>/<bit> = 0|1
uldaq2mqtt:
container_name: uldaq2mqtt
restart: always
build: ./uldaq2mqtt
privileged: true
environment:
- MQTTAddress=127.0.0.1
- MQTTPort=1883