Following a conversation over on the DSF LPC discord group about using MQTT with DUET, I've had a go at creating a python service for SBC's running DSF, which enables MQTT integration with DSF.
MQTT4DSF (https://github.com/MintyTrebor/MQTT4DSF) has 4 main functions:
- Subscribe to user defined DSF events and send mqtt msgs to a broker of choice on receipt of event (user configurable)
- Poll DSF on a timed frequency and send mqtt msgs based on a value delta (user configurable)
- Send user defined MQTT msgs when specially formatted M117 msgs are received from DSF events.
- Act as MQTT to GCode proxy - passing GCode commands to DSF and executing them on the machine, by subscribing to a custom MQTT topic.
Short video of features in use - https://www.youtube.com/watch?v=2XwTgxythTE
It runs on the DSF SBC (tested on rpi), using the DSF python API library, and the Duet Rest API. Its user configurable through a json file accessible through DWC.
It's had limited testing but I hope it might be of use to someone here.