Easy MQTT Server Setup

แชร์
ฝัง
  • เผยแพร่เมื่อ 22 ก.ย. 2017
  • This simple tutorial shows how to setup an MQTT broker on a Raspberry Pi. MQTT is a little bit explained and some examples are shown. It is also shown how to add password protection and get es fixed IP from a router.
    Links, code etc. can be found on the project page:
    bitluni.net/simple-mqtt-broker...
    Twitter: @bitluni
    If you like the video consider supporting my work on Patreon and get some extras:
    / bitluni
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 100

  • @thenetimp
    @thenetimp 6 ปีที่แล้ว +57

    So FYI, you don't need a mouse and keyboard and monitor to setup the raspberry pi.
    1) create your SD card Raspbian image
    2) . create an empty file called ssh in the root of the SD card boot partition. This enables ssh on first boot.
    3) Connect via ssh from your computer, saves you a lot of hassle...

    • @xxaax
      @xxaax 6 ปีที่แล้ว +3

      cool thanks! saved me alot of time!

    • @webblab2415
      @webblab2415 4 ปีที่แล้ว +3

      ​@@xxaax don't you forgotten a network connection? I mean wpa_supplicant.conf file with ssid ad pass....to allow raspberry to connect to the LAN..

    • @richardlighthouse5328
      @richardlighthouse5328 3 ปีที่แล้ว

      @@webblab2415 Not needed when you are using ethernet, which you should be using anyway.

    • @cavhaunch3597
      @cavhaunch3597 2 ปีที่แล้ว

      How do you know the ip address of the pi before connecting it to a monitor?

    • @thenetimp
      @thenetimp 2 ปีที่แล้ว

      @@cavhaunch3597 I don't. I use other unix tools to scan my network for new devices and their IP addresses, typically the new PI is the new one. Or if it's an older pi I am setting up again, I have the mac address recorded on a piece of tape on it for future reference, I can set it up in my router to have a specific given IP address.

  • @ytfp
    @ytfp 6 ปีที่แล้ว +3

    Yep love the home automation and so happy your back making videos one of the best on youtube.

  • @mmajstruk398
    @mmajstruk398 5 ปีที่แล้ว

    Hi!
    Another great video that saved me lots of time setting up my Raspberry Pi with MQTT broker for my academic project.
    I got Raspberry Pi with Node-RED and MQTT ready, now it`s time to get ESPs, sensors and relays out from box and start playing with them - that should be the most fun part of project ;)
    BTW, I liked the password ;)

  • @TrentSterling
    @TrentSterling 6 ปีที่แล้ว +3

    Was subbed, but today I added the bell. There's a lot of devices around here I need to chuck an ESP into. Looking forward to the washing machine project!

  • @arunbm123
    @arunbm123 6 ปีที่แล้ว

    You have so many components in shelf...Good Setup !!!!

  • @KshitijDhar7
    @KshitijDhar7 6 ปีที่แล้ว +1

    Awesome! Was looking for this. Thanks :D

  • @Noah-vm8id
    @Noah-vm8id 2 ปีที่แล้ว

    Echt mega hilfreich, bin schon am Schauen wo ich meinen Raspi habe, das wird sofort umgesetzt

  • @xxaax
    @xxaax 6 ปีที่แล้ว +1

    Hi bitluni, thanks for showing us the setup.
    How would you proceed, building a new house?
    I like the mqtt node-red technology and think it would be a cheap solution for a smart-home.
    Are there any good guides out there yet? How to wire everything up and so on.
    Thanks again, and keep on basteling ;)

  • @BrianThomas
    @BrianThomas ปีที่แล้ว +1

    3:58 The default IP address can be found also in the raspberry pi after running ifconfig. Generally the default gateway is the router or where the IP is being generated from. Type in the default gateway IP into a browser and you should be prompted to login to your router.

  • @zvpunry1971
    @zvpunry1971 6 ปีที่แล้ว +2

    6:11 The config file contains "include_dir /etc/mosquitto/conf.d" by default. It is a good advise to use this to just create a file like "/etc/mosquitto/conf.d/50-bitluni.conf" and add your config there. When the mosquitto package is upgraded, it won't ask if you want to keep or discard changes on a changed config file. And you have all of your changes in a single file with clear visibility of your own deviations from the default.
    Many other programs have something like this in their config too.

  • @JasonRobards2
    @JasonRobards2 3 ปีที่แล้ว

    excellent tutorial!

  • @leon-set
    @leon-set 5 ปีที่แล้ว

    Bruder genau was ich brauche 👌🏼

  • @colinpamplin9976
    @colinpamplin9976 6 ปีที่แล้ว

    Very interesting I think I will add password to my mosquitto Pi3 setup with 12 mqtt devices. I have found node-red very good and easy when you get the hang of it. The only issue is the dashboards can be slow with several devices, graphs and dials.

    • @bitluni
      @bitluni  6 ปีที่แล้ว

      I like node red.. planned to add it with the first use case :-)

  • @beaned714
    @beaned714 11 หลายเดือนก่อน

    Thx for the helpful vid, also great user password ;)

  • @MrBobWareham
    @MrBobWareham 6 ปีที่แล้ว

    I hear the SD card in Pi don't last very long something to do with read-writes so can we use a hard drive to the pi or another small computer please thanks Bob

  • @zephalon
    @zephalon 6 ปีที่แล้ว

    Nice video! I want to build something similar but I already have a RF24 hub so my sensors don't need a WiFi connection.

    • @bitluni
      @bitluni  6 ปีที่แล้ว

      +Zephalon coming back to rf in a few weeks

  • @VBsepheroth888
    @VBsepheroth888 6 ปีที่แล้ว

    Does mosquitto not work on the newer versions of raspberry pi? I have a pi 3 model b and I can't get mosquitto to install to it.

  • @tinker7722
    @tinker7722 6 ปีที่แล้ว

    MQTT is so great! wow - I like it!

    • @tinker7722
      @tinker7722 6 ปีที่แล้ว

      Thank's for that info! this way I do not have to plug my raspi to my TV-Screen

  • @MobiMenace
    @MobiMenace 6 ปีที่แล้ว

    Thanks for the videos; they are helpful. Would you please go through SSL setup, please?

    • @bitluni
      @bitluni  6 ปีที่แล้ว

      Ok, I will. But probably not October since I've a full schedule and have to do a project for Halloween

  • @ajaybnl
    @ajaybnl 6 ปีที่แล้ว +16

    I love when you do over acting.... Thanks.

    • @bitluni
      @bitluni  6 ปีที่แล้ว +1

      Thanks mate :-)

  • @sairfan06
    @sairfan06 3 ปีที่แล้ว +1

    What user interface you were using for mosquitto like 192.xx.x.x:1992

  • @yusofjohan3456
    @yusofjohan3456 5 ปีที่แล้ว

    what if im just using a mobile phone hotspot? should i change also

  • @phamtoan3820
    @phamtoan3820 5 ปีที่แล้ว

    you rock man!

  • @hacihocni6156
    @hacihocni6156 5 ปีที่แล้ว

    Is there a safe way to access local host in internet ?
    Usibg just esp32

  • @msmadaram
    @msmadaram 4 ปีที่แล้ว

    have you ever work on android broker such as moquette or something like that ?

  • @jonatasdeoiveirasousa595
    @jonatasdeoiveirasousa595 6 ปีที่แล้ว

    If a don't have a Rapsberry Pi, can I use a virtual machine Linux instead of a Raspberry?

  • @shinevisionsv
    @shinevisionsv 6 ปีที่แล้ว

    Lmao, the washing machine fix is genius.

  • @gianluca1694
    @gianluca1694 6 ปีที่แล้ว

    i have the problem that my PI in the menu not marked as "mos installed".... and nothing connectto anything....

  • @sntshkmr60
    @sntshkmr60 10 หลายเดือนก่อน

    I can't open the dashboard from my host machine's chrome. I have installed mosquitto into raspi using ssh.

  • @xbmcnut
    @xbmcnut 6 ปีที่แล้ว +1

    Thanks for the vid. What MQTT app did you use on your phone?

    • @bitluni
      @bitluni  6 ปีที่แล้ว +1

      MQTT Dash. Works fine but it doesn't support widgets.. if you know any other good ones I'll try

    • @xbmcnut
      @xbmcnut 6 ปีที่แล้ว +1

      Yes, I use that too but MQTT Dashboard allows single button widgets although it's not as nice to use.

    • @LatinDanceVideos
      @LatinDanceVideos 5 ปีที่แล้ว

      I'm late to the party, there are far too many options now. Blynkt looks nice but I'm not convinced it works well with MQTT.

  • @transient0126
    @transient0126 3 ปีที่แล้ว

    LOL..rev 1 never used with dust all over it. You and me both mate...you and me both :D

  • @istvantemerdek3445
    @istvantemerdek3445 2 ปีที่แล้ว

    Good password for mosquitto :)

  • @AhmetTasdemirDJLuds
    @AhmetTasdemirDJLuds 4 ปีที่แล้ว

    İ was tried it last year but it worked only with local broker. Am i true or false ?

  • @MegaSolidgamer
    @MegaSolidgamer 3 ปีที่แล้ว

    How did you connect your phone with the ping pong senario?

  • @marcodibona
    @marcodibona ปีที่แล้ว

    HI! Is MQTT client in PHP possible? which library to use?

  • @1q1q1q1q1q1q1qw
    @1q1q1q1q1q1q1qw 6 ปีที่แล้ว

    first of all funny videos your acting is great :D
    i got PRI 1 (c) i inserted the card with the stretch image on it nothing happend
    ??? any idea

    • @___aZa___
      @___aZa___ 3 ปีที่แล้ว

      maybe a little late, but did you flash it or did you just put the image on the card per drag and drop?

  • @facundonieto1598
    @facundonieto1598 3 ปีที่แล้ว

    qué datazo el del minuto 3:41! buen video

  • @moneydontbuyclass
    @moneydontbuyclass 3 ปีที่แล้ว

    will this work with the new raspberry pi zero W?

  • @caroman6761
    @caroman6761 6 ปีที่แล้ว

    How do I get my communication to the MQTT Broker secure? is there any way of encryption? I heard, usernames and passwords will be sendt as clear text ...

    • @bitluni
      @bitluni  6 ปีที่แล้ว

      didn't do encryption yet.. it's still in your local network. but you probably don't like to use the same password as your gmail one

  • @AstralJaeger
    @AstralJaeger 6 ปีที่แล้ว

    Looks verry promising, would be nice if you could explain how we can access these local MQTT servers from everywhere, maybe with somekind of DynDNS

    • @gordhenschel1419
      @gordhenschel1419 6 ปีที่แล้ว

      dyndns hasn't been free for years, but namecheap offers free dns and its good. Then forward a port in your router. not sure about the MQTT / Node-RED part. Maybe bitlunislab can comment.

    • @AstralJaeger
      @AstralJaeger 6 ปีที่แล้ว +1

      doesnt need to be a DynDNS Service, NoIP or something similar should do, would be just nice to be able to check a MQTT based Temperature probe from everywhere not just my own wifi

    • @bitluni
      @bitluni  6 ปีที่แล้ว +1

      dyndns and opening a port on the router... but that might be risky. If you happen to have a virtual server you could also install a mqtt server on that and let your home mqtt subscribe to that one on the virtual server. it's called mqtt bridge... mosquitto supports it. No open port there

    • @AstralJaeger
      @AstralJaeger 6 ปีที่แล้ว

      The problem with the vserver is that it aint cheap to host one, but i might beworth giving it a shot and look it up. By the way its a good video!

  • @schneider1492
    @schneider1492 3 ปีที่แล้ว

    how about running a mqtt broker on a asus router running Merlin

  • @zekrell9381
    @zekrell9381 2 ปีที่แล้ว

    6:37 best password btw

  • @michaelg.werner4331
    @michaelg.werner4331 4 ปีที่แล้ว

    why the ip address of the raspi broker isn't determined AT the raspi itself?

  • @umanggoel2709
    @umanggoel2709 5 ปีที่แล้ว

    My MQTT server is not running.
    Its giving me an error that address already in use.
    Any way to fix it?
    I am a new to linux

    • @leonf.7893
      @leonf.7893 4 ปีที่แล้ว

      Did you put the correct port in?

  • @chuxxsss
    @chuxxsss 6 ปีที่แล้ว

    You must have been reading my mind. I need to make a new broker for my home. The old one has issues with reverse shell stuff.

    • @bitluni
      @bitluni  6 ปีที่แล้ว

      what is reverse shell?

    • @chuxxsss
      @chuxxsss 6 ปีที่แล้ว

      bitluni's lab it's where you have a ssl tunnel in to your system without opening a port,

  • @user-uv2gu8wm6h
    @user-uv2gu8wm6h 6 ปีที่แล้ว

    what is mac address of rasp pi

  • @roadeycarl
    @roadeycarl 3 ปีที่แล้ว

    I don't get it... how to you access the broker?

  • @gcm4312
    @gcm4312 4 ปีที่แล้ว +2

    nice password 🍈🍈😂
    oh, when you want to mask mac addresses, it is better to mask the last 3 bytes since the first 3 are usually used to identify the manufacturer so easily discoverable if you show the device on the video ;)

    • @carlosvidal3814
      @carlosvidal3814 2 ปีที่แล้ว

      I just rewatched the video and thought, "wait, is he showing us the password on purpose? That has to be a joke" and I was right 🤣

  • @narasis
    @narasis 3 ปีที่แล้ว

    whats kind of chip is it that plays ping pong?

  • @gasca_mx
    @gasca_mx 6 ปีที่แล้ว +1

    First comment! Greatings!

  • @jettaglnegro
    @jettaglnegro 3 ปีที่แล้ว

    Is posible.... mqtt +android celphone+modem+esp32? Red local...No Internet .

  • @andironner6784
    @andironner6784 3 หลายเดือนก่อน

    Why would you need security, it's all within your network.?

  • @MyTube4Utoo
    @MyTube4Utoo หลายเดือนก่อน

    Cool......

  • @BrijeshRana
    @BrijeshRana 2 ปีที่แล้ว

    5:36 I see what you did there 😂😂😂

  • @anigamaha
    @anigamaha 5 ปีที่แล้ว

    But what is the other part of the project ; Not the RPi but the little tiny part that is assigned a IP then acts as a remote switch please

  • @lightdark00
    @lightdark00 6 ปีที่แล้ว

    You show really simplistic computer/Linux issues, but you didn't say how you get the results and settings on your phone.

    • @bitluni
      @bitluni  6 ปีที่แล้ว

      this is the beginning of the series for setting up the server. I'll show how to do the client this week.
      the app is MQTT Dash.. you add there the broker (ip, port 1883, user and password). On that page you simply add the topics and select the type you like

  • @Noah-vm8id
    @Noah-vm8id 2 ปีที่แล้ว

    This video is also a good example for the fact that german humor does not work in other languages

  • @SIMPhony
    @SIMPhony 6 ปีที่แล้ว +3

    "rooter"

  • @AKIRAfotografie
    @AKIRAfotografie 6 ปีที่แล้ว

    I did comment already. Got deleted :(

    • @bitluni
      @bitluni  6 ปีที่แล้ว

      sorry had to reupload this one

  • @peterjhartvideo
    @peterjhartvideo 3 ปีที่แล้ว

    So dramatic