Jump to content

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


malaga

Recommended Posts

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!? 

 

 

 

Link to comment
Share on other sites

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.

 

 

Link to comment
Share on other sites

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!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines