Jump to content

getting started with the MQTT-Protocoll - running raspberry pi as a broker


Recommended Posts

Posted

Hello dear Armbian-experts, 

 

first of all - i hope youre all right and everything goes okay in your hometown.  i am currently triyng to get started with MQTT-Protocoll.  

 

i want to use it with a RaspBerryPi - see here my diagram: 

 

 

 

                                                                                                                                                     
                                                                                                                                                              
                                                                                                                          +---------------------------------+ 
                                                                                                                          |       Device 2                  | 
                                                                                                                          |                                 | 
                                                                                                                         --                                 | 
                                                                                                                      --/ |                                 | 
                                                                                                   Subsciber      ---/    |                                 | 
                                                                                                               --/        |                                 | 
                                                                                                            --/           +---------------------------------+ 
                                                                                                         --/                                                  
                                                                                                     ---/                                                     
                                                                 +-----------------------------+  --/                                                         
         +------------------------------+                        |                             |-/                                                            
         |         device 1:            |                        |                             |                                                              
         |         Publisher            |                        |       MQTT - Broker         |                          +---------------------------------+ 
         |                              |                        |                             |                          |                                 | 
         |     intended measures:       |                        |                             |       Subsciber          |        Device 3                 | 
         |       -Temperature           |                        |                             |--------------------------|                                 | 
         |       -Light                 |    Message ->          |                             |                          |                                 | 
         |       -Moisture              |------------------------|                             |                          |                                 | 
         |                              |                        |                             |                          +---------------------------------+ 
         |                              |                        |                             |                                                              
         |                              |                        |                             |                                                              
         |                              |                        |                             |-\                                                            
         |                              |                        |                             |  ---\                                                        
         |                              |                        |                             |   -  ---\                                                    
         |                              |                        |                             |          ---\                                                
         +------------------------------+                        +-----------------------------+    Subscriber--\         +----------------------------------+
                                                                                                                 ---\     |                                  |
                                                                                                                     ---\ |      Device 4                    |
                                                                                                                         --                                  |
                                                                                                                          |                                  |
                                                                                                                          |                                  |
                                                                                                                          +----------------------------------+

 

 

what is planned: 

 

according to the diagram that is shown above:

device 1 is my publisher and the other devices(2-3) are meant to be the subscribers.

i want to do the following: 

device 1 publishes on a topic “RaspBerryPi/Temperature-measuremet” 

devices(2-4) are connected and do a subscription 


The devices subscribe to the same topic - “RaspBerryPi/Temperature-measuremet” 

In my plan the devices(2-4) are  so called "receivers" and the device 1 is a so called a sender.

 

I want to run the raspi as a broker - is that okay!? 

 

 

 

Posted

I wonder why you ask this at our place and not on RPi place since Armbian does not deal with RPi whatsoever :lol:

Posted
21 minutes ago, Werner said:

I wonder why you ask this at our place and not on RPi place since Armbian does not deal with RPi whatsoever :lol:

 

Well, for once he has a chance to implicate some other armbian SBC as a client ...

 

And in response to the "question", I have been doing this for 4 years with mosquitto (compiled without websocket) and MQTT clients in python, tcl, C, golang ... on raspbian, armbian, debian, RTOS ... So I think it **may** work, as it is designed to do so.

 

 

Posted

hi  there - good day dear Werner, dear Arox,  :)

 

many thanks for the quick reply. I am very glad to hear from you. 

 

I have some Orange-Pi here and besides them also a Banana Pi. So - if i am able to get started with the MQTT - protocoll on one device then i surely will implement it on those systems too.  I will work it out - more thoroughly 

 

Many thanks to  you both - for encouraging me. 

 

Have a great day. 

 

PS - keep up the great work - it rocks!! i  am a big big fan of 'Armbian!

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines