MQTT integration in 3.5.0-beta.4_101 working not as should
-
Hello,
first thank's to bring MQTT into the RRF 3.5 beta firmware, I tried it and it works only limited and not as MQTT could.
Current:
- connection during config.g and setup of the one usable topic to publish before connecting to the broker.
- publish from within GCode using M118 P6 to this topic
- no LWT*
- when an other topic is needed, disconnect mwtt set the topic and reconnect.
Default:
- while connecting set a LWT*
- publish with M118 P6 T"devices/rrf-printer/wahtever" S"payload" where T is the topic.
With this changes the usage of MQTT will be improved a lot, as example:
- send values like temperatures, status details with daemon.g
- get the device state when powered off (LWT)
- use any other MQTT device as example switch a shelly / tasmota device from within GCode (macro or wathever)
*LWT --> Last will and testament, this is used to tell the broker what to do when the client is disconnected. As Example set the dopic devices/rrf-printer/online with the payload false. And after the connection set the topic devices/rrf-printer/online with payload true will to the following.
When the printer goes online it sets the topic devices/rrf-printer/online to true and when you power it off the broker sets the devices/rrf-printer/onnline topic to false after 15 to 30 seconds. So you will see when the devices is offline, eventbased without ping or others.Many thank's again for all your effort and hard work!
-
@paulg4h thanks for your input. I've created https://github.com/Duet3D/RepRapFirmware/issues/880.
-
@dc42 many thank's!
-
@paulg4h is this still in the plans for 3.5 release? I am looking forward to having this functionality so I can plug in to home assistant.
-
@misterjtc this is being worked on, but at this stage I don't know which improvements will be ready in time for the next 3.5 release candidate and hence in 3.5 stable.