Home Assistant Mosquitto MQTT Broker Setup with MQTT Explorer

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome in this video I'm going to go over the procedure for installing the mqtt broker in home assistant so I have a number of other Home assistant videos and I'll put a link below to my home assistant playlist where you can find those so there may be different ways to do this this is just my experience with it so I don't have a ton of experience with mqtt so hopefully I can share some of the things that kind of hung me up as I was going through so what mqtt is is almost like a news wire service so you have entities that would feed in that service and then it would send the news out to other parties so imagine you're at a Small Town Newspaper and you subscribe to a national news feed there might be a reporter in Washington DC that writes something sends it to the wire service and then it sends it down to you because you subscribe to the Washington DC news feed of course this isn't about news this is actually about controlling iot devices and reading sensors and things like that so there are two different parts of this there's the mqtt integration and the mqtt add-on when you install the mqtt add-on it will install the mqtt integration you can also just install the mqtt integration and use some third-party mqtt broker so the first thing I'm going to do is go down to my profile I'm going to scroll down to advanced mode and I'm going to turn it on then I'm going to go to settings people and users now when we turned advanced mode on this user tab showed up I'll go down here to add user and I want to create a display name so I'll just call it mqtt user and then the username I'll just call mqtt underscore user and this can be anything you want for the password you want something secure for my demonstration I'll just do mqtt password and this is on a temporary setup of Home assistant that I set up just for this purpose so I'll go to create here and I can leave those other check marks off so we have the mqtt user and you do want to use a secure password there when you do set this up so now I'll go back to settings I'll go to add-ons I'll go to add-on store and I'll search for mqtt so here we can see the mosquito broker I want to click on that and click on install so I'm going to speed up the video here while this is installing okay so that finished installing we can see it's checked to start on boot we can also turn on Watchdog so if this crashes it will restart it then it has auto update people have different opinions on that I'm just going to leave it off you may want to turn it on but updates can potentially break things so I don't have a good recommendation for everyone for that so next I'll hit start down here so it looks like that started up so now go back down here to settings I'll go to devices and services and now we can see the mqtt integration so what we just installed was the broker and this is the integration the integration will talk to the broker so imagine this integration is like that Small Town Newspaper it's going to connect up to that wire service to get messages so I'll go here to configure it says you want to configure home assistant to connect to the mqtt broker provided by the add-on mosquito broker so I'll hit submit so this does a lot of things automatically for you I'll hit finish and here we have the mosquito broker now we can click on configure here and we have this page where you can publish and you can listen to a topic but what I'm going to do is I'll go to reconfigure mqtt and here we have a username and password so I'm going to put in my own user account here the one I just created not my own but the mqtt underscore user and then password and notice how this is really long I'll get to that in a second I'll type mqtt password so I've had issues with some of the tools I use with mqtt with the default password so I could have actually clicked on this I here and gotten the password and used it somewhere else but it's super long so on my production version of this I just use a really good password that's you know 12 characters that are random and that works better for me but I had a lot of trouble with a really long default password so it should work with the default username password also so then we have advanced options here so then I'll just hit next so here we have enable Discovery and I've read some tutorials that say to leave this on I don't like it on it clutters up the system so I'm going to turn that off then I'll hit submit and finish so now we can use this listen to a topic to start listening to the mqtt broker but there's another tool I like to use that's a lot better it's called mqtt Explorer so you can search online for this if you're on a Mac you can actually download it from the Apple App Store but there are versions for mac and windows and maybe other platforms too so we're going to use this to connect up to the mqtt broker so this is actually similar to the integration so the integration is a client and this is also a client so I'll go here to connections I'll type h a dev2 that's the name of this home assistant instance I'll type in the host hajev2.local so I'm using the local DNS address I have had trouble with certain mqtt clients using that and it liked using the IP address instead so there are a number of different ways to get the IP address let's go back so if I go to setting I think system Network yeah okay so if we look down here under network adapter we have the IP address so it's 192.1687.94 and actually I think I'll use that so I'll type 192.168.7.94 and then the port I have the default port and then we'll use our username as mqtt underscore user as mqtt underscore password so we'll hit connect and hopefully if you did everything right this will connect up so here we can see sys and broker we can see mosquito version 2.0.15 and we have all this stuff all these all this different information here that we can look at so I just want to have this video installing mqtt broker connecting to it in home assistant and then also setting up mqtt Explorer so I'll have future videos where I actually utilize that but I'm going to show you another instance I have that actually has information coming in so I'll hit connect here so if I go here to home in this open mqtt Gateway and rtl433 to mqtt here we have things like weather sensors that are coming in so this is a weather sensor this is a full-on weather station so there are many different things that you can set up that will send information to home assistant via mqtt and it's not actually sending it to home assistant it's sending it to that broker and then home assistant is collecting it from that broker so it's a little confusing because the mqtt broker is hosted from within home assistant but you can almost think of it like a separate entity you could almost even think of it like a whiteboard where people write messages and other people retrieve the messages from that whiteboard so that's setting up mqtt and the mqtt broker on home assistant that's all I'm going to cover in this video if you have any questions please leave them in the comments if you like this video please click like if you haven't subscribed to my channel I'd appreciate if you could do that and thanks for watching until next time goodbye
Info
Channel: RickMakes
Views: 19,991
Rating: undefined out of 5
Keywords: Home Assistant Mosquitto MQTT Broker Setup with MQTT Explorer, home assistant, mqtt explorer, home automation, mqtt home assistant, home assistant mqtt, home assistant mqtt setup, home assistant mqtt install, smart home, mqtt broker, mqtt tutorial, home assistant mqtt broker, home assistant mosquitto, home assistant setup, home assistant automation, mqtt explorer home assistant
Id: vZLvEwwpPkU
Channel Id: undefined
Length: 6min 43sec (403 seconds)
Published: Sat Jul 22 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.