MQTT Login works, Messages not
-
I already finde and followed some posts about MQTT setup like this one:
Re: Help with MQTT setupSo fare I achieved that my mqtt mosquitto server recognize and accept the login of the Duet Raspberry Pi (I am using SBC mode)
I achieved this by the correct configuration of:M586 C"duet" U"username" K"password" S"subscription" O2 ; configure MQTT parameters M586 P4 R1884 H192.168.10.244 S1 ; Enable MQTT protocol/client
But if i post to a topic
like
M118 P6 S"message" T"topic" ; Publish message (See M118 for more details)
The server doesn't receive any messages from the duet config. I also tried the same topic and message from another computer which worked without any problems.
Also Duet dosn't show any other messages from the server. -
@qurt what version are you running?
There was a hotfix for MQTT made about 2 weeks ago that I assume made it into 3.6b4 but I don't know.
https://github.com/Duet3D/DuetSoftwareFramework/commit/982b58c2b50f704b1216986276d3fb5ee67a24fe
Maybe @chrishamm can comment -
@qurt which board and firmware version are you running, and is it in standalone or SBC mode?
-
@dc42 I used the stable firmware i think 3.5.4 and first thought that might be the issue so I updated but I still have the issue with 3.6.0-beta.4.
the firmware info is:
M115
FIRMWARE_NAME: RepRapFirmware for Duet 3 MB6XD FIRMWARE_VERSION: 3.6.0-beta.4 ELECTRONICS: Duet 3 MB6XD v1.01 FIRMWARE_DATE: 2025-02-11 09:51:34connection still works with the server but
M118 P6 S"message" T"topic" ;
dosn't get recived in the mqtt server... I also don't see any errormessages...
-
@qurt are you running standalone or in SBC mode? You mention an SBC in your first post
-
Thats right. I am in SBC. So, the Duet is connected to the network via a raspberry pi.
-
@qurt You should be using DSF 3.6.0-beta.4, v3.5 does not support MQTT in SBC mode. I'm going to try MQTT support again using Mosquitto, I'm quite sure that worked when I tried it last time.
-
Your commands are wrong. This works well for me:
M586.4 S"test" O2 M586 P4 H192.168.1.198 R1883 S1
Published messages from other clients come in as expected as generic messages in DWC. But it looks like there was indeed a problem using
M118 P6
, up to the next versionM118 L6
needs to be used instead. I'm going to fix it in the next release. Example:M118 L6 S"message" T"test"