Getting Started with Home Assistant & Raspberry Pi: Install Add-ons, Control Lights

Getting Started with Home Assistant on Raspberry Pi

Did you ever wish that Google Assistant, Alexa, or Siri could let you have a smart home instead of some smart devices? What if you wake up to fresh coffee, get news played on TV, temperature-regulation done automatically at the time you set the alarm? How about automatically changing the room lighting, turning on some backlight on a monitor or panel, and making it relaxed when you play a movie?

 

Instead of trying to open different applications and making changes separately, you can do all this and even more with the Home Assistant platform easily. Yes, you read that correctly! Here is a small tutorial on how you can install and setup Home Assistant on Raspberry Pi.

 

Home Assistant: What is it?

Home Assistant is an open-source operating system for the Smart Home. It operates like IFTTT or Samsung Smart Things but is different in the sense that it's online, open-source, and a completely local alternative to things like HomeBridge and SmartThings. This means that it gives you control of home automation without the cloud. This results in smoother service, reliability, and better protection. Home Assistant also helps you in building complicated Scripts and Automations that blow other Smart Home platforms out of the water. It allows products from hundreds of manufactures and protocols to integrate seamlessly with DIY projects and homemade solutions.

 

Components Required

Hardware

  • Raspberry Pi
  • Micro SD Card
  • SD Card Reader

 

Software

  • Home Assistant Image
  • Balena Etcher

 

Installing Home Assistant on Raspberry Pi

Step 1: For installing Home Assistant on Raspberry Pi, first, download the appropriate Disk Image for Hass.io for your Raspberry Pi from the Home Assistant page. We will be using the Raspberry Pi 4B for this project.

 

Step 2: Then download balenaEtcher for flashing image file on Raspberry Pi. Etcher is a free and open-source utility that helps in burning image files such as .iso, .img files, and zipped folders to create live SD cards and USB flash drives.

balenaEtcher

 

Step 3: Once the installation is done, open the Etcher app. Etcher installs the operating system in three steps, the first step is to select the image. To select an image file, click on Select Image in Etcher and select the hassos image file. Then select the right SD card and click Flash.

balenaEtcher - Flash OS Images

The most reliable networking setup for your Raspberry Pi is to connect it using an Ethernet cable; however, if you want to configure Wi-Fi, you can try this.

 

Navigate to your SD card i.e. hassos boot and create a new folder called ‘CONFIG’. Now, inside the CONFIG folder, create a new folder called ‘network.’ Within the network folder, create a file named ‘my-network’ without a file extension and paste the lines given. Don’t forget to change the Wi-Fi name and password.

[connection]
id=my-network
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
type=802-11-wireless
[802-11-wireless]
mode=infrastructure
ssid=MY_SSID
# Uncomment below if your SSID is not broadcasted
#hidden=true
[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=MY_WLAN_SECRET_KEY
[ipv4]
method=auto
[ipv6]
addr-gen-mode=stable-privacy
method=auto

 

Step 4: Now unmount the SD card, remove it from your card reader and insert it into Raspberry Pi. Connect your power supply to the Raspberry Pi. After a few minutes, you should be able to access Home Assistant from any device on the same local network. To access the home Assistant page, navigate to the browser, and type http://your-pi-ip-address:8123. It can take up to 20 minutes to install all the Home Assistant dependencies.

Install Home Assistant

 

Once the installation process is done, Raspberry Pi will auto reboot. After this, you will be asked to create a Home Assistant account. Enter a Name, User name, Password, and click on “Create Account”.

Setting up Home Assistant on the Raspberry Pi

 

Now on the next screen, you can enter the name for your project, set your location and unit system.

Home Assistant Dashboard

Finally, click on Finish. Now, you’re brought to the Home Assistant Dashboard. This screen will show all of your devices.

 

Installing Add-On’s

Home Assistant has several add-ons that you can install to get home assistant even better. We are going to install File Editor and SSH add-ons. You can also install other add-ons that you find useful.

 

Installing File editor

The File editor add-on allows you to browse and modify the files on your Pi. We will be using this add-on to modify the configuration.yaml files.

 

To install this add-on, click on Supervisor, and the go-to Add-on Store and install the File editor add-on.

Installing File editor

 

After the add-on has been installed, click start and enable the "Show in Sidebar" option.

File editor Add-On

 

Installing the Terminal & SSH add-on

Also, install the Terminal & SSH add-on. This add-on allows you to connect to your Raspberry Pi that is running Home Assistant over SSH. To install this add-on, go to the Supervisor tab, click on the upright corner icon, and search for Terminal & SSH. Click on the Install button and then Start the add-on.

Installing the Terminal & SSH Add-On

 

Controlling LED using Home Assistant

Now, we’re going to control an LED connected to Raspberry Pi GPIO through a home assistant to get familiar with adding components and building automation. We’re going to add switches to turn two LEDs on and off. Before we can connect LED, we need to configure the configuration.yaml file.

For that, go to https://home-assistant.io/components/ and search for ‘Raspberry Pi GPIO’.

Raspberry Pi GPIO

 

Now, on the Raspberry Pi GPIO page, copy the configuration code.

Raspberry Pi GPIO Configuration

 

Now, go to the File editor tab and click on the folder icon to browse the file system.

Set up Home Assistant with Raspberry Pi

 

Navigate to the configuration file located at /config/configuration.yaml and paste the code that you copied from the GPIO page.

Home Assistant Advanced Configuration

 

Once that's done, we can save changes by pressing the save icon.

Home Assistant Advanced Configuration

 

Every time after making a change to any of the files, first check that the configuration is valid, and then restart Home Assistant. To check the configuration, go to the tab Configuration, and select General, and click "CHECK CONFIG". If the syntax is correct, it will display a message "Configuration Valid". If not, it will show you a debug message showing where the error occurred that needs to be fixed. Once the configuration is valid, press "RESTART" under Server Management, and wait a minute for the changes to be applied.

Home Assistant Raspberry Pi 4

 

After restarting, go to your Home Assistant User Interface and you should see two new buttons labeled Fan Office and Light Desk.

Home Assistance with Raspberry Pi

 

Now, connect two LEDs to GPIO 11 and GPIO 12 of Raspberry Pi and click on those buttons to turn the LEDs on and off.

Raspberry Pi Home Automation

This is how you can install and setup Home Assistant on Raspberry Pi. Hope you’ve found this tutorial useful.

Video

90 Comments

Bonjour je suis vraiment très content de tous vos pubs, j'ai besoin de votre aide je sui étudiant, je travail sur la domotique, avec Raspberry pi 3 b+ et Arduino uno le software, home assistant , je suis débutant dans home assistant j'aimerai avoir votre aide pour la réalisation, j'utilise relay pour aliment le lamp et autre... merci

I am only commenting to let you know what a impressive discovery my friend's child obtained reading through your web site. She figured out plenty of issues, which include what it is like to possess an ideal giving style to have folks quite simply grasp certain hard to do matters. You really surpassed our expectations. Thanks for delivering these important, dependable, explanatory and even unique guidance on that topic to Sandra.

I happen to be writing to let you understand what a remarkable experience my cousin's princess developed browsing your blog. She mastered some things, which included what it is like to possess an ideal coaching heart to let the mediocre ones effortlessly grasp specific tortuous issues. You really surpassed our expected results. Many thanks for displaying the productive, safe, explanatory not to mention fun tips on your topic to Jane.

I would like to express my respect for your kind-heartedness in support of persons that should have guidance on this subject matter. Your personal dedication to getting the message around has been incredibly important and has specifically empowered ladies just like me to attain their pursuits. The warm and helpful hints and tips signifies a great deal to me and a whole lot more to my fellow workers. Thanks a lot; from all of us.

Hello there! I realize This is often sort of off matter but I used to be pondering in the event you understood where by I could Track down a captcha plugin for my comment variety? I’m using the exact blog site System as yours And that i’m having issues finding just one? Thanks quite a bit!

My wife and i got very cheerful when Chris could deal with his research because of the ideas he made from your very own web site. It is now and again perplexing to simply find yourself offering things which usually the others might have been selling. And we all remember we've got you to appreciate for this. All of the explanations you made, the straightforward site navigation, the relationships you help instill - it is everything awesome, and it is facilitating our son in addition to us imagine that the issue is fun, and that's pretty mandatory. Many thanks for all!

Thanks a lot for providing individuals with an extraordinarily memorable possiblity to discover important secrets from this web site. It is often so amazing plus packed with a great time for me personally and my office peers to visit your blog on the least thrice every week to learn the newest guides you will have. And of course, we are at all times amazed concerning the staggering suggestions you serve. Some 2 tips in this post are in truth the most efficient we have ever had.

Needed to compose you that little bit of observation just to say thank you over again about the precious concepts you have discussed on this page. This has been certainly extremely open-handed of people like you to allow easily all many of us might have advertised as an electronic book to help with making some money on their own, specifically seeing that you might have tried it if you decided. Those points as well acted like a good way to be certain that other people online have the identical eagerness just like my very own to grasp many more on the subject of this matter. I am certain there are numerous more enjoyable occasions in the future for individuals who browse through your website.

Thanks for each of your labor on this web page. My mum loves engaging in investigation and it's really simple to grasp why. A number of us notice all concerning the powerful method you offer great thoughts by means of your web site and as well improve response from other individuals on this theme plus my simple princess is studying a great deal. Take pleasure in the rest of the new year. You are carrying out a good job.

I precisely had to appreciate you again. I do not know the things I could possibly have handled without the actual methods contributed by you regarding such theme. It absolutely was the challenging situation in my circumstances, however , noticing the very specialised style you treated that forced me to weep over happiness. Extremely thankful for the guidance and as well , hope you recognize what a great job you have been undertaking educating men and women by way of your website. Probably you haven't encountered all of us.

Thank you a lot for giving everyone an extraordinarily remarkable chance to check tips from here. It is always very ideal plus full of fun for me personally and my office peers to visit your web site particularly thrice per week to read the latest guides you will have. Of course, I am actually fascinated considering the great points you serve. Some two points in this post are undoubtedly the most suitable we've ever had.

Thanks for your entire effort on this blog. My mum really loves conducting investigation and it's obvious why. My spouse and i notice all concerning the dynamic method you render efficient secrets by means of your web site and inspire response from others on the subject while our favorite simple princess is always discovering a whole lot. Have fun with the rest of the year. You're the one conducting a tremendous job.

I want to convey my love for your generosity supporting those who really need assistance with this situation. Your special commitment to getting the message all over came to be unbelievably functional and has surely enabled others much like me to reach their endeavors. Your own informative guide denotes this much to me and still more to my office workers. Regards; from all of us.

Thank you a lot for giving everyone remarkably marvellous opportunity to read in detail from here. It can be very lovely and as well , stuffed with a great time for me personally and my office colleagues to search the blog nearly three times in 7 days to see the new guidance you will have. And indeed, I am also usually fulfilled with the outstanding strategies you serve. Certain 1 facts in this post are essentially the most efficient I've ever had.

I am glad for commenting to make you understand of the really good discovery my princess undergone browsing the blog. She came to understand numerous pieces, which include what it is like to have an excellent teaching mood to have other folks very easily gain knowledge of specified tortuous matters. You undoubtedly exceeded people's desires. Thanks for coming up with these productive, healthy, explanatory not to mention unique thoughts on this topic to Gloria.

My wife and i felt very happy that Michael managed to finish off his basic research from your ideas he grabbed when using the web site. It's not at all simplistic just to be giving freely tips and tricks which some people have been making money from. We really fully understand we need the website owner to appreciate for this. All of the illustrations you have made, the easy website navigation, the relationships you can aid to promote - it is mostly remarkable, and it is facilitating our son and us feel that this situation is fun, and that is very serious. Thanks for the whole lot!

I must convey my appreciation for your kind-heartedness for those individuals that really need help on that matter. Your real dedication to getting the message all over had been extremely informative and have regularly empowered folks much like me to reach their objectives. Your new warm and friendly information signifies a whole lot a person like me and especially to my office colleagues. Best wishes; from all of us.

I would like to express some thanks to the writer for bailing me out of this predicament. Because of checking throughout the the net and getting tricks which were not beneficial, I assumed my entire life was well over. Being alive minus the approaches to the problems you've solved by means of your main article is a critical case, as well as those that would have negatively affected my entire career if I hadn't discovered your web page. Your competence and kindness in controlling all things was valuable. I am not sure what I would've done if I had not come across such a stuff like this. I am able to now relish my future. Thanks very much for your impressive and amazing guide. I will not be reluctant to endorse the website to anybody who would need guidelines about this subject.

I simply wanted to thank you very much once again. I am not sure the things that I would've sorted out without those opinions revealed by you directly on such industry. It seemed to be a real hard case for me personally, however , considering your professional approach you handled that forced me to jump with joy. I will be thankful for this work and thus pray you realize what a great job your are accomplishing training others using your web site. Most likely you haven't come across any of us.

I have to voice my admiration for your kind-heartedness in support of men who absolutely need guidance on this particular question. Your personal dedication to getting the message along became unbelievably important and has specifically enabled somebody like me to attain their ambitions. Your personal valuable hints and tips means this much to me and especially to my mates. With thanks; from each one of us.

Thank you a lot for providing individuals with an exceptionally memorable chance to discover important secrets from here. It really is so pleasing and also stuffed with a good time for me and my office acquaintances to search your web site no less than 3 times per week to find out the newest things you have got. And of course, I am just actually motivated considering the impressive techniques you give. Certain two ideas in this article are honestly the most effective I've ever had.

I just wanted to write down a word so as to express gratitude to you for the remarkable guides you are giving at this site. My long internet search has at the end been paid with excellent facts and strategies to write about with my pals. I 'd suppose that we site visitors actually are definitely fortunate to be in a perfect website with very many special people with interesting things. I feel extremely blessed to have discovered the webpages and look forward to many more fun times reading here. Thank you again for a lot of things.

I intended to send you a little bit of remark just to thank you very much as before for your nice basics you've contributed on this website. It is so unbelievably open-handed of you giving without restraint exactly what a number of people could have sold for an ebook in order to make some bucks for their own end, even more so since you might have tried it if you desired. These inspiring ideas also served to become a good way to fully grasp the rest have the identical passion similar to my very own to know whole lot more concerning this matter. I am certain there are some more pleasant instances up front for individuals that looked over your blog.

I must express my thanks to this writer for rescuing me from such a issue. After searching through the internet and getting techniques which were not powerful, I was thinking my entire life was well over. Being alive without the presence of answers to the issues you've fixed by means of your main write-up is a crucial case, as well as ones that might have in a wrong way affected my career if I had not noticed the website. Your main capability and kindness in maneuvering the whole lot was vital. I don't know what I would have done if I hadn't discovered such a thing like this. It's possible to at this moment look forward to my future. Thanks so much for the expert and sensible guide. I won't think twice to propose the blog to any person who will need guide on this problem.

Thank you a lot for giving everyone a very pleasant chance to read from this blog. It's always very sweet and full of a great time for me and my office friends to search the blog at the least thrice in a week to see the new things you will have. And of course, I am actually amazed with the dazzling knowledge you serve. Certain 2 facts in this posting are particularly the very best I have had.

I am only commenting to make you know what a helpful experience my girl had reading your web page. She picked up a wide variety of details, including how it is like to possess an amazing coaching character to make many people really easily know chosen problematic subject matter. You really exceeded readers' desires. I appreciate you for showing the powerful, dependable, edifying not to mention fun thoughts on that topic to Emily.

I am glad for commenting to make you know what a fine experience my daughter experienced visiting the blog. She came to find numerous issues, most notably what it is like to have an incredible giving character to get many more very easily learn selected multifaceted subject matter. You truly exceeded visitors' expected results. I appreciate you for delivering these invaluable, dependable, explanatory and even fun guidance on the topic to Julie.

I simply had to thank you so much all over again. I do not know what I could possibly have done in the absence of these tricks contributed by you on that problem. This has been the intimidating setting for me, however , considering a new skilled technique you resolved the issue made me to cry for joy. I will be thankful for the assistance and in addition expect you are aware of an amazing job you happen to be getting into teaching many people through the use of your websites. More than likely you have never got to know all of us.

I happen to be writing to make you know what a awesome encounter our girl obtained reading through your web page. She figured out plenty of issues, including what it is like to have an excellent helping mood to make the others quite simply grasp certain impossible issues. You undoubtedly exceeded readers' expectations. I appreciate you for displaying the warm and helpful, safe, revealing and fun tips about that topic to Kate.

I not to mention my guys appeared to be checking the good recommendations found on your web site and so quickly got a horrible suspicion I never thanked the web site owner for those tips. My ladies ended up for this reason passionate to read through them and already have unquestionably been taking pleasure in these things. Appreciate your turning out to be quite considerate and then for picking out this sort of impressive issues most people are really desperate to learn about. Our honest regret for not expressing appreciation to you earlier.

I simply wanted to make a simple word so as to express gratitude to you for all of the pleasant information you are posting here. My time intensive internet look up has finally been compensated with useful suggestions to share with my classmates and friends. I would admit that most of us readers actually are extremely blessed to exist in a useful place with very many special professionals with insightful tricks. I feel really lucky to have seen the webpage and look forward to plenty of more exciting times reading here. Thanks once again for everything.

I wish to point out my passion for your generosity supporting individuals that have the need for help on the niche. Your real commitment to passing the message around has been astonishingly functional and has continuously helped others just like me to realize their objectives. Your personal helpful recommendations means this much to me and a whole lot more to my office colleagues. Thanks a ton; from everyone of us.

Thanks so much for providing individuals with an extremely breathtaking opportunity to read in detail from here. It really is very excellent and jam-packed with a lot of fun for me personally and my office peers to search the blog at a minimum three times per week to see the fresh secrets you have got. And lastly, I am just at all times amazed concerning the impressive points you give. Certain two areas on this page are undeniably the most beneficial I've had.

I wish to express my admiration for your kindness for those who actually need assistance with in this concern. Your very own dedication to passing the message throughout had become astonishingly helpful and has all the time empowered professionals just like me to reach their endeavors. Your personal warm and friendly tutorial indicates so much to me and further more to my office colleagues. Best wishes; from all of us.

Thank you so much for giving everyone an extraordinarily marvellous chance to read in detail from this blog. It can be very kind and also stuffed with amusement for me and my office peers to visit your website minimum 3 times in 7 days to read through the newest tips you have. And indeed, I am also always impressed concerning the special inspiring ideas you give. Some 3 facts on this page are in truth the very best I've had.

Thanks a lot for providing individuals with an extraordinarily nice opportunity to read critical reviews from this website. It's usually so beneficial and stuffed with fun for me and my office friends to visit your site minimum thrice in 7 days to study the newest stuff you have. Of course, I am also certainly fascinated for the attractive secrets you give. Some 2 tips on this page are completely the most beneficial we've had.

Thanks so much for providing individuals with an extremely terrific chance to check tips from here. It is often very useful and full of a good time for me and my office fellow workers to visit your web site nearly 3 times per week to study the fresh secrets you have. And indeed, I am at all times impressed with all the striking things you give. Selected 2 ideas in this article are in truth the most effective I've had.

I needed to create you the very little note just to thank you again for the fantastic methods you have featured here. It was particularly generous with people like you to supply openly precisely what many people could have distributed as an e book to make some dough on their own, certainly seeing that you might well have done it in the event you decided. These smart ideas also served to become fantastic way to realize that some people have a similar dream just like mine to find out a little more related to this condition. I am sure there are numerous more enjoyable instances ahead for those who look over your blog.

Thanks a lot for providing individuals with such a marvellous opportunity to discover important secrets from here. It's always so awesome plus stuffed with fun for me and my office friends to search your blog at minimum 3 times weekly to read the new issues you have got. And indeed, I am just always motivated considering the surprising inspiring ideas you give. Certain 3 ideas in this posting are indeed the finest we have had.

I'm just writing to let you know of the wonderful experience my wife's princess obtained checking the blog. She figured out some details, most notably how it is like to possess an incredible teaching spirit to have other individuals completely master some specialized topics. You truly did more than people's desires. I appreciate you for producing these warm and helpful, trustworthy, explanatory and as well as fun guidance on your topic to Gloria.

I needed to write you this tiny note in order to thank you once again just for the spectacular advice you have contributed in this article. This is simply wonderfully open-handed of you to offer unhampered all some people could possibly have distributed for an ebook to end up making some profit for their own end, particularly considering that you could possibly have done it if you desired. These ideas also acted like a great way to be certain that the rest have the identical eagerness similar to mine to see whole lot more on the subject of this issue. I think there are thousands of more fun sessions ahead for those who see your blog post.

I wanted to send you one very small word so as to thank you very much over again for those pleasing information you have contributed on this page. It has been certainly surprisingly open-handed of you to provide without restraint what exactly many individuals might have sold as an e-book to help with making some dough for themselves, specifically given that you could have done it in case you decided. These pointers as well worked as a great way to recognize that some people have a similar fervor just like mine to realize good deal more when it comes to this issue. I'm sure there are thousands of more pleasant periods in the future for those who discover your website.

I definitely wanted to type a remark to be able to appreciate you for these awesome facts you are giving on this site. My considerable internet investigation has at the end of the day been paid with sensible tips to share with my companions. I 'd point out that many of us site visitors are definitely blessed to live in a great place with so many awesome people with great points. I feel extremely fortunate to have come across your entire website page and look forward to tons of more excellent times reading here. Thanks a lot once more for everything.

Thanks for all your effort on this website. My mom delights in engaging in research and it's really easy to see why. We all learn all about the powerful method you convey useful suggestions via this blog and as well encourage response from website visitors about this issue then our favorite simple princess is actually learning a great deal. Take pleasure in the rest of the year. You're conducting a splendid job.

Thank you for your entire efforts on this blog. Betty take interest in engaging in investigation and it is obvious why. Most people hear all concerning the powerful form you convey invaluable guidance through your website and even increase participation from the others on the content plus my simple princess is in fact discovering a great deal. Take advantage of the rest of the year. You are always carrying out a very good job.

My husband and i were very lucky when Louis managed to finish up his survey through your ideas he was given out of your blog. It's not at all simplistic just to be freely giving helpful tips which often people may have been trying to sell. And we also realize we now have the blog owner to be grateful to because of that. The type of explanations you made, the simple site menu, the relationships you can assist to promote - it's got all astonishing, and it's really assisting our son and us believe that that subject is entertaining, which is certainly unbelievably indispensable. Thanks for all the pieces!

Thanks so much for giving everyone such a special chance to discover important secrets from this blog. It is usually very superb and stuffed with amusement for me and my office mates to search your web site on the least 3 times per week to find out the fresh issues you will have. Of course, we are at all times happy concerning the outstanding methods served by you. Selected 3 areas in this post are really the most efficient we've ever had.

I actually wanted to post a brief note to say thanks to you for all the amazing pointers you are sharing on this site. My time intensive internet lookup has now been honored with awesome tips to write about with my colleagues. I 'd believe that most of us site visitors are rather lucky to live in a fantastic website with very many special professionals with helpful tips. I feel truly grateful to have used the website and look forward to some more entertaining times reading here. Thanks once more for a lot of things.

ルイヴィトン スーパーコピー N級バッグ、財布 専門サイト問屋
弊社は販売ルイヴィトンバッグ、財布、 小物、腕時計、靴類などでございます。
弊社は「信用第一」をモットーにお客様にご満足頂けるよう、
発送前には厳しい検査を通じて製品の品質を保証してあげますとともに、
配送の費用も無料とし、品質による返送、交換、さらに返金までも実際 にさせていただきます。
また、従業員一同、親切、丁寧、迅速に対応 させて頂き、ご安心になってお買い物を楽しんでくださるよう精一杯力 を尽くしていくつもりです。
送料は無料です(日本全国)! ご注文を期待しています!
下記の連絡先までお問い合わせください。
是非ご覧ください!

Add new comment

The content of this field is kept private and will not be shown publicly.

Plain text

  • No HTML tags allowed.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.