Home Assistant MQTT Install and Setup - A Beginner's Guide
HTML-код
- Опубликовано: 29 мар 2021
- MQTT and Home Assistant are extremely powerful when paired together and can be used on a wide range of applications, but what is MQTT and how does it work? How do we add it to our Home Assistant Installation? In this video I will show you how to install the Mosquitto Broker add-on in Home Assistant and install the MQTT integration so that you can be up and running with MQTT very quickly! We also discuss a MQTT topics, QoS (Quality of Service) and how to publish and subscribe as well as how to configure a Shelly smart home device with MQTT.
If you'd like to support me and future projects:
Patreon:
/ everythingsmarthome
Buy Me a Coffee:
www.buymeacoffee.com/EverySma...
Written Article:
everythingsmarthome.co.uk/how...
EVERYWHERE YOU CAN FIND ME:
Everything Smart Home Community Discord:
/ discord
Twitter: / everysmarthome (@EverySmartHome)
Instagram: / everythingsmarthome
Facebook: / everythingsmarthomeoff...
#homeassistant #smarthome
________________________
Some of the links above are affiliate links, where I earn a small commission if you click on the link and purchase an item. You are not obligated to do so, but it does help fund these videos in hopes of bringing value to you! Наука
I spent many hours trying to understand the different authentication options and you got it clear in 6 seconds. Your video is straight to the point. Thanks!
That's awesome, thanks for the comment!
Finally I can understand what is MQTT when you show the listen to a topic concept, you are one of the best Home Assistant youtuber! :)
I am SO grateful I found this. There's a lot of videos but this seriously got me through some serious roadblocks I've been dealing with for days. Huge thanks
That's awesome Alex! Glad I could help!
This man is reading my mind on what I want to see.
🔮🧙
Once again, another great tutorial. I've always looked at MQTT but was somewhat intimidated... Not anymore. Thanks to you! Bravo!!!
Thanks Jesse for the support as always, glad it could help!
Incredible video, In all of your videos you have a perfect way of describing things that make them just click in my head! Sincerely, thank you so much for all the work you do in these videos!
outstanding video, clear, concise, working example and from my experience you even offer support when asked questions! you should be one of the top smart home youtubers! cant wait until everyone realises how much better you are than most the others out there
Thanks Aaron, appreciate the support! Don't know about best but doing my best for sure! Thanks again friend 🙏
NOTE that the Home Assistant menus have changed since this video. The "Supervisor store" is now in "Add-ons" from the "Settings" menu. Adding a user is trickier as it is now a tab on the "People" page from the "Settings" menu. BUT... you must first enable "Advanced Mode" on your profile, opened by clicking your name in the lower left corner. All this took quiet a while to wade thru and figure out!!
There is no addon category in the settings menu
Edit: You need to set up hass with supervised mode initially to have the option. Scroll to the bottom of the installation docs to see how.
@@saiverx That might be a menu item requiring 'Advanced Mode' be set in your profile, which in turn requires you to be an 'admin'.
@@fergazoid I spent some time reading, since I setup hass as a docker container it doesn't include the Supervised version. You need Debian to setup hass with supervised, I'm on Ubuntu 🤦🏼♂️ But I figured it out 👍
Please pin this comment - or do another video, prior, I was creating a person that could log in but this is not the same as a user which you can only do with advanced options on!
First video of yours I've seen. Well done. Your instructions were clear and specific. Thank you
Thank you! Your videos are excellent and precise and clear. I've been learning a lot from your videos.
I've been able to setup MQTT, and even secure it using TLS, and having disabled non-encrypted traffic, however I'd highly value a tech Tuesday video on how to setup/flash the devices with tasmota to allow TLS from the start (without having to revert back to unsecured port 1883).
I've also got proper SSL and one url already configured for the Home Assistant as well.
Thanks!
Thank you so much! I was stuck on 6:58 and most videos just gloss over this section. Finally working, thank you!
Great video, came complete sense and even thought the version was slightly different, i managed to get everything up and running and felt like a wizard afterwards.
Finally got my Tasmotized Sonoff S31 plugs to show up in my device list with your help here. Thank you!
Thak you for this. I've watched quite a few videos on this subject and they seem to miss step or two. I finally can use MQTT
PERFECT! I am just starting with HA but I am finding your videos very useful, thank you for your time ;-)
Excellent video! Thanks! First one I've watched in 2 years and it was simply perfect! Great job!
Thanks, glad it was useful!
Excelent! Password concept in HA also well explained. This has been lacking in the other videos.
Glad you enjoyed it! 🙏
Amazing, rebuilding system and forgot some of the subtle issues. Came back to this video and problem gone
Thanks 👍
The video helped me to unterstand the fundamentals of MQTT and how to setup in Home Assistant. Excellent video!
Awesome, glad it was useful!
thanks man! i've spent hours trying to get MQTT set up. i swear other videos said to put the devices ip in the host field on the devices mqtt configuration. YOU ROCK
Thanks Ethan!
Great tutorial! Got my mqtt setup running with your pedagogic instructions,thank's!
I had to look that word up haha, thank you very much glad it was useful!
Very helpful thank you. Great simple MQTT explanation too. Successfully installed and working.
Awesome, glad it was useful!
Thank you. Very thorough explanation.
oh damn! it can be so easy! thanks for the easy setup! was trying over 2 days now ....... with your guide 5 min
My man 🙌
Thanks Lewis - this helped for the HASS client install as my MQTT was not correctly installed via another YT vid!
Another great video thanks
Thank you. I've always found mqtt as a bit of a dark art, and have generally avoided products and projects that use it. Will def have another look now
Thanks for the comment Simon, hopefully this gets you a bit closer, MQTT is really powerful and not scary once you get started! Let me know how it goes!
Great video. Thanks for the overview and examples. Much appreciated
Cheers David!
Thank you for sharing. Nice quality tutorial and very easy to understand.
Thanks for watching and commenting!
Thanks for the tutorial, very useful. I work in software, mqtt is the same as kafka and GCP pub/sub. Very cool!
THANK YOU! After watching a dozen MQTT videos (with super-tiny text and thick accents), I finally found your video. Not only did it make sense, but it allowed me to finally get my stupid Tasmotized ESP32 to be recognized in HA. Only drawback: the relays I'm running via Tasmota are only available by directly accessing the URL of the device; I see the relay names in HA, but can't control them from HA. *sigh*
Excellent, as always!
Thanks buddy!
Very well done with this explanation, I'm very unfamiliar but I'm now closer to making things switch on and off...perhaps even when I want them to :) 👍
Thanks, glad I could help!
Thanks, very helpful!
Clear and concise as always buddy..
Thank you my friend!
Great video
Thank you!
you saved an hour of my life THX
Nice 👊
Muy bueno compadre !! Excelente explicación !!
Gracias mi amigo!!
Thank you! Now how do you setup a MQTT relay after we get all the infra running?
your channel is gold!
Thank you sir!
Thanks for this. I was having trouble connecting to my local broker and the issue was that I hadn't added an MQTT user to HA.
Great video, thanks. Would like to know how to make a sensor out of MQTTT in the future ;-)
Hello , very well explainned . Might EMQ X Broker work with HA ?
Thanks!
Thanks for your share video!
Thanks for watching!
Nice job! Please consider of making a video, on how to connect a simple relay which is controlled by an esp32 or esp8266, programmed 1. with arduino IDE 2. with espHome.... I think this is something that a lot of people would like to understand, because after a Google research, not many things are clear enough...And all this connected to home assistant (and MQTT with the first part of arduino IDE )
Thanks I will add it to the list!
Thx for the great videos! I saw you reviewed SwitchBot curtain. Can you make a tutorial to get it working with home assistant? (without using a SwitchBot hub? Thx in advance!
After watching the videos, everything is simple and clear. Thanks! 😀👌
Thanks glad you liked it!
I'd still love to see more stuff that isn't dependent on a supervised install... I have done many of the topics he's covered already, but it would be good to cover them from "both sides", since many people (like myself) run HA in a non-supervised environment like Docker or even Core.
I'd love to do more of them too, unfortunately it would double the length of a lot of videos. But where I can, I absolutely will;
I enjoyed the video, but i was hoping for the reasons i would want to add MQTT to my home assistant. What is the benefit?
Hello Sir,
First of all thank for making simple and detailed video around Home Assistant.
Sir, I have a question with regards to MQTT and Webhooks in Home Assistant.
So I am building an application which take events as input and stores into my database.
I have tried MQTT of Home Assistant and I have no complains. I know that HA also provide Webhook feature, which I wanted to try but I thought to check with you before giving it a try. So my Questions is, what are the benefits of using one over the other, specially in my case.
Thanks for the video =)
Thanks for watching!
Hi Lewis Thanks for all your help. I am running ZAH in home assistant and my devices are dropping off too frequently, have to reboot home assistant every few days . I would like to switch to MQTT. I have the Zigbee bridge flash with Tasmota 4 sonoff mini behind switches, 1 motion sensor and a toggle switch to controle the lights. How is the best way to do the switch to MQTT. I already have MQTT install following one of your previous video but not using it. Thanks Lewis. P.S . I watch your video on the Mushroom dashboard, will try that after i figure this MQTT thing.
Excellent video and explanation. I've seen other videos similar to this, but the piece that never gets explained is why. There are Zwave to MQTT and Zigbee to MQTT addons, but what is the advantage vs the standard addons? Is MQTT just for pulling in devices that don't integrate directly? If so, how to you take a device on your MQTT broker and create an entity in HA?
Tha is Jeffrey! MQTT is just a ubiquitous way of exchanign information so it's an excellent way to integrate devices together and get them talking, it's super lightweight and fast!
very very clean man. I am trying this with tasmota. but i have a problem with connecting to the mqtt server. I also run duckdns. and thats where it gets a bit complicated with the ip. not sure if thats my problem though. everything else seems to be okay. i have tested with https and without for my duckdns and same with my ip.
small question :) i am trying to start make a small projet here temp and humdity sensor will publish on somewere the measurement and save the values, home assistence is a good option? by the way, do have any video showing how to install home assistence? ty :)
For those who maybe have the same problem I had, I couldn't find the Configuration->Users section, you need to enable "Advanced features" on your profile for Users to show up under Configurations.
Hi - I'm about to start the Home Assistant journey. I already have a lot of IoT sensors, some use Modbus protocol. Can Home Assistant talk to Modbus ?
Thanks.
Do you have a video or guide on doing this if MQTT is on a separate VM? I wanna give it a whirl, as I have HAOS on a Proxmox host, and my MariaDB is on separate VM/container already. Wanted to think about doing MQTT on separate VM/container as well.
Thank you you’re every much appreciate your don’t understand.
Thanks, Lewis. You've untangled a knotty problem for me. I'm giving serious consideration to being a member. Do you have another contact method rather than this in to cover a few questions? I had a look around by can't see anything immediate.
Will this work with a ConBee stick?
Great content - thanks! A small suggestion: the black background theme on your HA install may be easy on the eyes for the actual user, but the contrast comes through poorly in RUclips's window. Please consider filming screens that have higher contrast - bold colours on a white background, for instance.
Or just zoom the browser content.
Hi! How do i change QoS from 0 to 1 or 2?
Hello good morning and first of all thanks for your videos, I ask you a question to see if you can help me, I have the lights of my home with esp8266 before I used adafruit and fttt and change to hassio but I have the problem that mqtt connects and disconnects repeatedly Sometimes and there are points where it is no longer connected, can you think of a solution? or do I go back to ifttt and adafruit? thank you very much genius
Should Debugging be on (I am getting Client unknown closed its connection)
I tried to get the mqtt server to listen for a wildcard topic with my Shelly device exactly as you suggested, but it wouldnt show up as an event. Any tips? Im assuming the error was probably Shelly side.
Be good to list interesting Mqtt projects in home assistant like esp home, tasmota, zigbee2mqtt and maybe my sensors. Of course a bit of back story to adoption of mqtt from its inception in oil pipelines and use in WhatsApp and signal also nice to have passing mention.
Liking the videos. You are from glasgow aren’t you so am I. Keep it up.
Thanks Ben appreciate it! Not quite from Glasgow no, much further north in Scotland! Good to see another Scot!
The most important point i have learned in this video: Many tuturials (like the official documentation) ask you to add a "person" in HomeAssistent. But under this dialog you get a complety diffrent dialog and can not set a password. You have to switch the tab and add an "user" instead. I wasted a whole sunday afternoon to reconise this diffrent. So its might be good to highlight this point.
I make mobile in kivy and I want to connect with esp32. With the mqtt protocol. How I can use it kindly make a vedio on it
Thanks for the tutorial sir, do you recommend securing mqtt messages with ssl certificates is necessary if I access home assistant through home vpn ?
Appreciated
If your running MQTT on your local network and only on your local network then I don't see a need for it personally but the option is there if you want to do it. If it runs over the internet then yes always use SSL
Great video, will help if you can make a part 2 which covers how you can use the mqtt payloads received by home assistant mqtt broker to trigger actions or display information such as temperature on the lovelace UI
Thanks! Sure I hope too soon
@@EverythingSmartHome Did you end up doing this?
Still new to home assistant. Found your video very helpful, but still unable to connect to MQTT, I get connection failed.
I'm trying home assistant which doesn't include supervisor so I've setup the MQTT broker manually. I've completed the tests from terminal to check the broker is working, but when I try to connect from home assistant I get connection failed. Any help would be very grateful.
Please make a tutorial on how to install HO with supervisor on TrueNas in Virtual Machine.
Hi may i know what is the possible issue i need to adress if device not appear in mqtt? Actually i already pair it with zigbee2mqtt addon.
I can't find a video that shows how to add mqtt switches in the home assistant 😪 please help me?
great video, i had to learn mqtt a month or so back and this would have made things a bit easier. have you considered doing a node-red video?
Cheers Mark, I have, lots of people have requested it. I keep putting it off 👀🤣
@@EverythingSmartHome haha fair enough, imanaged to get a light working once and i cant even remember how i did it, everyone raves about node red though and says so much more can be done with it than automations in HA. i can wait, im trying to leave my system alone for a bit so i dont break anything now its finally working like a dream.
All my devices through MQTT devices are shown as lights. How to I change that, so lights are shown as lights, locks as locks and sensors as sensors.
thank u
Great stuff!
Can you do one on Rest API
Thank you sir!
At minute 6:05 in the more recent versions of HA, this "users" tabs is no longer present by default. You must go into your own person settings (left bottom of the page) and enable "Advanced Mode". Been searching like mad why that "users" wasn't shown on my new install.
thanks!+
are those MQTT messages transmitted over TCP or UDP? if it's TCP, that takes care of the delivery guarantees. TCP not only guarantees that all packets get delivered, it also guarantees that they come out the other end in the right order, even if a packet gets lost and needs to be re-transmitted out of sequence. with UDP there are no such guarantees, but it can be faster than TCP because there is no handshake.
Great!
Thanks Alejandro!
From here how to i do about adding mqtt devices in homeassistant.
Is this the one I want to see my Ring doorbell image? I can't find ring-MQTT
Doing a full reinstall of home assistant, things were getting a little too errory in the logs. Time to binge some everything smart home.
I want to integrate my Ring alarm system with HA in order to utilise its sensors in automation. Is MQTT the answer?
I believe there is a ring to MQTT custom integration somewhere but haven't used it myself
thanks for you
but users not show in my home assistant how to show it
i do not get it. I followed your video step by step and upp till the point where you use the real-world exampel its working great. But when i try to connect a shelly 1 like you did i do not get any message.
Question: I am about to buy a device for HA, how to tell if it supports MQTT please?
Google is probably the only way, unless they state it in their specs
Hello, do I have to buy a Rasperry Pi and install on it mosquitoo broker to control esp8266/32 with Home Assistant via MQTT/Node-RED? I've found that there is the CloudMQTT service so I could use it for simple project? So then I don't have to buy a RPi and just buy esp chip/relay module controlled by RS485(modbus)/create a server on CloudMQTT - intergrate it with my Home Assistant account and then install Node-RED for Home Assistant. So simply my mobile phone (Home Assistant app) can be the Publisher to CloudMQTT Broker and my ESP will be the subscriber to the CloudMQTT Broker then if ESP (if I click a button on Home Assistant app on my mobile phone) receives a message e.g. msgString == "1" it would do the code to change the state on the relay via Modbus?
how to install mqtt client in esp32 or esp8266 with custom code
can you make a video on that...its easy to setup devices which are ready for mqtt but making a non mqtt supported code(lets say blink sketch in arduino ide) to mqtt client is herd for newbes like me...people like you could really help us
Is the Supervisor Store still a thing? How do I find it? Thanks.
Yes it's under Settings > addons
@@EverythingSmartHome Right under my nose. Thanks :)
Edit: Was sent here via ruclips.net/video/F0jCAoM5ry8/видео.html
Everythng is working as it should. Thanks again.
Hello, I have a request for you if you can help me. I installed HA on a generic laptop-x86-64 250Gb storage and 8Gb memory. I got a Sonoff Zigbee 3.0 Dongle plus and 2 Aqara P1 motion sensors. I can't integrate Zigbee2MQTT in HA. I install, I did all the configurations from your tutorials but the add-on does not start. You can help me, I haven't gotten any help from anyone here. Thank you very much.
I note that HA is the only one installed on the laptop.
I've been struggling with this for the last 3 days. I can't even get Frigate to start! I'm using it within Home Assistant on my Unraid server, but the Frigate log says 'ERROR : Unable to connect to MQTT server: [Errno 111] Connection refused'. I typed exactly what you did in your frigate.yml. I tested MQTT within HA just as you said, and it works. I opened all ports. I can't figure out what to do, it's driving me nuts!
Any ideas?
Hope in the discord server I'm sure we can sort you out!
useful:)
It keeps saying cannot connect at mqtt?
"You can find that linked up here" .... flashes on for 2 seconds.
Please provide links in the text below the video?