Comments on: Testing Mosquitto Broker and Client on Raspberry Pi https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/ Learn ESP8266, ESP32, Arduino, and Raspberry Pi Wed, 02 Jul 2025 10:51:34 +0000 hourly 1 https://wordpress.org/?v=6.8.2 By: Jose Barbosa https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/#comment-1001869 Wed, 22 Jan 2025 14:44:34 +0000 http://randomnerdtutorials.com/?p=31721#comment-1001869 Hi Rui, Sara,
I got all this to work fine. Thank you for the great explanation on both MQTT articles. I use PI to publish and subscribe via command window and I use a Pico with the code to do the same.
I get readings from the pico temperature.
I publish controls for 2 relays connected to the pico. All good.
Now I want to include python code in the pi itself to do the same as I am doing on the command window.
Is there any tutorial with this type of samples?
Thank you

]]>
By: Ronni https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/#comment-900148 Fri, 22 Mar 2024 03:40:59 +0000 http://randomnerdtutorials.com/?p=31721#comment-900148 In reply to Ola Abrahamsson.

I didnt quite know what yoiu meant by external server but, if you are having trouble sending and recieving from two different pi’s Did you add a line to your publishing code of -h 192.168.0.XXX defining your server? I managed to send between 2 pi’s that way

]]>
By: Ronni https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/#comment-900147 Fri, 22 Mar 2024 03:37:30 +0000 http://randomnerdtutorials.com/?p=31721#comment-900147 Hi Peeps
Is there a way to use mosquitto clients from a python script? please tell me you have a book that covers this 😀
I am trying to make a rf doorbell that sends a mqtt message to my node red raspi mosquitto broker and while the tutorial I have found uses paho I cant for the life of me follow the set up of the clients. I can get it all to run as a direct pub/sub using your method, but not from a script.

]]>
By: Sara Santos https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/#comment-820989 Thu, 23 Feb 2023 10:47:25 +0000 http://randomnerdtutorials.com/?p=31721#comment-820989 In reply to Adzy.

Hi.
I’m not sure that I understood your question…
Are you using Node-RED?
If so, you can use a node called Big Timer. It provides plenty of schedule options.
Regards,
Sara

]]>
By: Adzy https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/#comment-820852 Wed, 22 Feb 2023 22:34:08 +0000 http://randomnerdtutorials.com/?p=31721#comment-820852 Hi,

Another Newbie…

I’m looking into MQTT to interact with an Raspberry Pi Process Control System
I understand monitoring and the lamp on / lamp off, but is there any way to change a value, i.e. from now on lamp goes on at 8pm in stead of 9pm

]]>
By: Sara Santos https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/#comment-801769 Fri, 09 Dec 2022 17:39:43 +0000 http://randomnerdtutorials.com/?p=31721#comment-801769 In reply to Ola Abrahamsson.

Hi.
Did you follow these instructions and allowed remote access: https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/?
Regards,
Sara

]]>
By: Ola Abrahamsson https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/#comment-801497 Thu, 08 Dec 2022 06:41:18 +0000 http://randomnerdtutorials.com/?p=31721#comment-801497 Hey! Thanks for a very good review of an MQTT installation. Was able to test it locally and it worked fine. Having trouble getting it to work against external calls and getting no error messages. have added lines in conf. – file.
How can I test external connections to the server?
Can I see if the server has received a call?

]]>
By: Sara Santos https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/#comment-799661 Sun, 27 Nov 2022 11:10:39 +0000 http://randomnerdtutorials.com/?p=31721#comment-799661 In reply to Jorge Ticona.

Hi.
Check if you’ve enabled remote access. See this tutorial: https://randomnerdtutorials.com/how-to-install-mosquitto-broker-on-raspberry-pi/
Scroll down to the section called “Enable remote access”.
You can set up a username and password or choose not to have one.
If you set up a username and password you need to pass them in the command when trying to publish or subscribe.
That tutorial shows an example for that.
Regards,
Sara

]]>
By: Jorge Ticona https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/#comment-799581 Sun, 27 Nov 2022 02:08:59 +0000 http://randomnerdtutorials.com/?p=31721#comment-799581 In reply to Vinayak.

same, how do you solve it?

]]>
By: Vinayak https://randomnerdtutorials.com/testing-mosquitto-broker-and-client-on-raspbbery-pi/#comment-798730 Tue, 22 Nov 2022 16:49:20 +0000 http://randomnerdtutorials.com/?p=31721#comment-798730 Client (null) sending CONNECT
Client (null) received CONNACK (5)
Connection error: Connection Refused: not authorised.
Client (null) sending DISCONNECT

Hi I’m getting this error when I’m trying to subscribe to the testTopic.

Could you guide me through this.

]]>