Hi Everybody, my name's John. Welcome to HASSCASTS, helping you into the world
of home automation one step at a time. What we're going to do in this series of
videos is we're going to introduce you to the world of home automation through
Home Assistant or hass.io We're going to install it on a virtual
machine, that way you can try it out for free which means you don't have to buy a
Raspberry Pi for $30/£35 or whatever it is in in your
country just to install it.
this is a simple way, I'm going to show you all the,
all the simple ways of doing things so that you don't have to go into any
command lines or terminals and I'm going to keep the the commands that you have
to type to a minimum.
What you will notice is that if there are any commands
that new typing then what I will do is I will list those out in the video notes
below so, and I'll and I'll also let you know when I'm doing that just does that
you can have a look at them anytime. I'll also try and put some time codes up
which will help you navigate the video okay let's begin
[ #Intro Music ]
Okay so, in the first video we're going to install hass.io on a virtual
machine. Our first step is to open up a web browser and the first thing that
we're going to do is we're going to download the server version of Ubuntu
So if you go into your favourite search engine (probably Google); type in Ubuntu
server and it is the one that says "Download Ubuntu server". So if we click
on that it will bring up the the last version which is 17.10.1 so if we
download that
So that will download onto our system, obviously I have downloaded it before in
preparation for this for this video so while that's downloading as you can see
the server Edition is about 754Mb. If we were doing the desktop edition -
for a start it would need more memory (more RAM); it will be a lot
bigger on the file system it would require a bigger dynamic harddrive and
we're not going to need a UI, we're not going to need a graphical user interface
for Ubuntu itself because we are going to be doing everything through hass.io
Right so what I will do is I will get onto the the next piece of software
which is Oracle VirtualBox, you may have this installed, you may not, so just do a
quick search through your Start menu, through your applications menu whatever
it is , and have a look for Oracle VM VirtualBox; Oracle VirtualBox or
VirtualBox. If you don't have it installed then
again open up a web browser go into the search engine - type in VirtualBox (one word)
and you want "Oracle VM VirtualBox" Here will be a download link for your
Operating System, I'm using Linux so for me "Download VirtualBox for Linux" or you
can just click on this one and it will take you into a page that gives
you the option of Operating Systems. Now I am using Arch Linux which is not on
here; however I do have it installed but you can install it however you want to
So if you're on Windows going to Windows and it will give you a
downloadable .EXE file and you can download and install it from there.
OK, so I'm assuming you have now installed VirtualBox so what we're going to do is
we're going to open VirtualBox. Right so that's open what we're going to do now
is we're going to create a new virtual hard drive. I am going to call it "Hass.io"
You can call it whatever you like. The type is going to be Linux and the
version is "Ubuntu 64-bit". you can select it from the menu if it's
not your default. OK click Next, now we are going to leave the RAM (the memory
size) at 1024Mb which is recommended in the instructions that I
followed in order to come up with this video. So we are going to create a new
virtual hard drive we're going to leave it as "VirtualBox disk image" (VDI) we're
going to allow it to be dynamically allocated. What this means is that if our
hard drive or if our hass.io installation grows above the size that
we will set our hard drive it will allow the hard
drive to grow with it. Now we're going to leave it, or set it in
your case to 10Gb again this is a figure that I haven't plugged from thin
air, it's a figure that is on one of the instruction pages that I've followed to get
the quick installation right. So the virtual machine is now being created
there are a few adjustments that we do need to make
if we go into settings the first one is under "Storage", so under "Storage Devices"
"Controller IDE". If we click "Empty" & we are going to
choose "Choose Virtual Optical Disk File". Navigate to the one that we've
downloaded (the Ubuntu file) and then we go to the "Network" tab where it says
"Attached to" -> NAT, change that to "Bridged Adapter" & in "Name" if you have multiple
network connections on your system it will list those and you want to select
your primary network adapter, hopefully you'll
just have one and it'll be nice and easy. OK then click "OK" right, now we can start
it press "Start". So what's happening now is VirtualBox
has started a virtual machine inside it is our CD that we've downloaded. Right so
this is basically asking for the language for the installation CD. We're
going to select "English" now when you do that (if it's the first
time that you've used VirtualBox) you will probably get a warning saying that
auto capture or Auto keyboard or something along
those lines and basically what it means is that once you click inside it once
you start to type inside it, it may be that it steals the focus of your
keyboard or your mouse and you can't get it back
so you won't be able to move outside these borders or you won't be able to
say Alt + tab out of it in to different windows, the
simple thing to do is click what I believe they call the "HOME key" and for
me it is the [Right CTRL] key which is the the "HOME key" (or whatever they call
it) and then whatever you want so what I can do [Right CTRL] + F which will bring
it full screen things like right... and as I speak I haven't got my mouse so
if I press the [Right CTRL] key and I'll get my mouse back, however I do want
to click inside the virtual machine and I'm going to select the first entry
which is "Install Ubuntu Server". It will now boot from the CD and it will ask me
which language do I want to install in.
"English", I am in the United Kingdom right now this may be different for
you and for everybody, we're going to detect the keyboard layout so we're
going to go quickly left and select "Yes" What it's going to do is it's going to ask
you to press certain keys and from there it will be able to narrow down which
keyboard you've got so press one of these keys office my "y"; "w" and then it's
got a fair idea of what keyboard i've got now so it's just asking me if i've
got these keys, no I haven't; no I haven't; no; no; no; no; no; yes I do have a pound or
as you Yanks call it... well, I don't know what you call it. OK yes I do have
a GB keyboard it appears just there okay alright so now it's going to go
through and detects the hardware, I'm going to have a look on my list
to see where we are. So next it's
going to ask me for a hostname
I'll come back to you when it does that. And we're back; OK hostname I'm going to
call my hostname "hass.io". A full name for the new user - call it whatever
you want you can put your full name in there if you want so I'm going to put
"Home Assistant". Right so user name and password so
basically in the setup instructions that are
provided in the hass.io documentation the password and username
that it uses are "ha" for both so I'm going to do the same just in case there
was some intricacies further down in the code because, it does state that if you
install it in an alternative way there may be add-ons
that don't work because the prerequisites are not there and things
like that so what I've done is I've gone the route of... not least resistance, but
the routes that will hopefully minimize and negate any (or hopefully) all of those
problems. Right so here I'm just selecting "Show password in clear" that
means I can show my password in clear, continue, I can now type "ha" I don't need
to show it in clear otherwise it would just fail because it doesn't match up. Yes I
know it's a weak password I want to continue. I do not want to encrypt my
"home" drive. Based on physical location your time zone is "Europe/London"; yes
it is. If I'm going too fast for you then feel free to pause the video at any time
and do it that way. Right so I want to use the entire disk so the top option.
Again it's only got one hard drive which is the one that we gave it.
Yes I want to write these changes to disk. Right so it's now going to install
all the system. I am going to have a drink of tea, CHEERS!
Notice; notice I am NOT posh - my little finger is down like. [gasp] and my
cup is hot. Right so while that is installing (it's not doing bad though)
I'm going to carry on reading my book. Right so it's now asking if we want to
use a proxy - we don't so continue, more installations and also look on my list
to see where we are - proxy (yeah) are automatic security updates so it's going
to ask us when we want to update it. Whether we want to update it always
manually or allow automatic security updates or a third option (I can't
remember what it is) we are going to choose... well I'm going to choose
"Automatic Security Updates" that way if there are any... So we've got "No
Automatic Updates"; "Install Security Updates Automatically" that is the one
that I'm going to choose, that way if there are any bug fixes or any zero day
hacks come out then hopefully they will get pushed and installed before anybody
can get into this server. Mind you with the password like "ha" it isn't gonna
take long to crack is it? Right besides that where are we? Right OK, so
do we want to install any servers? Yes we do
I want to install... No, do we want to install any servers? no we don't. If I was
keeping this installation and if it was just me I would probably install
OpenSSH, maybe Samba I think that's it but anyway we're not going to install
we're not going to install any service we're going to continue. So the next
thing is going to do is it's going to ask me if I want to install the boot
loader to the Master Boot Record. The boot loader is called Grub and if we had
a multi boot system so if we had Linux and say Windows running side by side on
a computer, when we started the computer it would give us the choice do you want
to run Linux or do you want to run Windows however as we're just running
Linux it's nice and simple we're not even going to be looking at it when it
starts so it doesn't matter. so as we can see 47% I'll come back soon. Right so
it's now installing grub when it comes up and asks us if we want to install it
to the Master Boot Record and the answer is yes we do we would like it to install
to the master boot record record. Thank you, yes install the grub boot loader
to the Master Boot Record yes thank you very much for asking yes we do want to.
OK so it's installing that, once it's done that it will let us know that we
can now
reboot the system and boot into booting to our virtual machine. Right so a quick
note on that. We don't need to go back into the settings and we don't
need to go back into the settings and take the CD out we're put in, the
disk that we downloaded. it will do that automatically, which is pretty awesome
really. OK, Manananananana
"Will you be quiet for five minutes?" Right OK so installation is complete.
Continue. Thank you.
OK so it's now rebooting itself, this is Grub, or should I say that is Grub
Right so it's now starting up. It will go to the login screen
here we go and once it goes to the login screen we can login with our
user which is username "ha", password "ha". OK
login username, password of "ha", right and what we're going to do is we are going
to type the command curl -sL goo.gl/goR2HT | bash -
What this is
doing "curl" is downloading the file the "-s" means don't give
me a lot of garbage just show me the important stuff.
The uppercase L means instead of downloading the document
that's here because this is just a shortcut what I
want you to do is I want you to go to this Google address and
follow it through until you find the document at the end which is this one so
this is what it will download and then it will pass it on to it will pass it on
to bash, and bash will execute all those commands from there. Right are we ready
first it'll give you your IP address. The IP address for me is 192.168.0.52
but that's just me yours will more than likely be different, it asks for
our password "ha", right and now we just leave it to it it'll take maybe a
few minutes and it will install... well, if we look over here, it grabs our IP address
it tells us what the IP address is. It updates the system so that it
is installing all the latest versions. It then installs all the software that we
need, in order to install Docker. So don't ask what Docker is if you
don't know, just accept that we need it. OK so it grabs the GPG key for
Docker and it adds it to our system and basically ensures that
it is from the Docker people OK. Yep, make
sure that we've got the right one and then it adds the Docker repository to
our system which is a bit like saying yep I have a look in here you'll find
loads of Docker software. It updates the system again so that he pulls all that
software in and then it says "Oh yeah, I see it. Now I
want to install Docker" so it installs it and then it goes to a different script
which is again is the same "curl -sL" because all the text in passes it on to
bash in executed as a root. OK and then once it's done all that it will then
come here and say "Success: go to (your IP address:8123) like that.
So Success: go to http://119.168.0.52:8123
If we open up a new tab in our browser
Remember, yours will be different 192.168.0.52:8123
Which is the default port for "Home Assistant" press ENTER and Dada! At last
Sorry - I've been trying to tweak that install script
at least for the past hour off camera. Right so now it's preparing "Home
Assistant" so this basically means that it is downloading (as far as
I'm aware)
It's downloading all the internal dependencies that it needs. I apologize
if you can hear my dog snoring. Yeah it is... I know on my system last time I
installed it it didn't take 20 minutes. I assume this "This can take up to 20
minutes" applies if you have a slow internet connection like I
said for myself I think it took maybe 5 minutes but then what it does is it
restarts itself once it's done
all the preparing and it transfers you onto the "Home Assistant" home
screen and there we can go on and configure it in more detail in the next
video. As it happens I will be doing that video straight after this, however it's
going to be a lot to fit in so that is why I'm just... not condensing the videos
but I'm just making sure the videos are just in sizable chunks so we'll do the
configuring after this video and then after that video we'll move on to
installing the essential add-ons and things like that and getting into the
fun stuff I think if I remember correctly because I'm redoing these
videos because the original ones that I did, they were just with my webcam mic
and it's not another proper mic and so they this sounded terrible
I didn't have many issues with them but some users did so I'm redoing
them and as it happens I've learnt a few things and I think
with videos are better so anyway I was just going to say I will come back to
you once it's up and running, however it is up and running so what is happening
now is it's been all the preparing that it needs to do is just restarting itself
and in ten seconds maybe I'll try and restart it
OK, I'm inpatient, I will try and restart it so if i refresh the page we
have "Home Assistant", OK, so it comes automatically configured
with a discovery component/script and it can discover
certain items on your network if you've already got these items running so for
myself I have a Philips hue system I can configure that and the Plex media server.
I can configure that and here I have all the important stuff and this is what we
will be working on in the near future a big long list of components for us to go
through and in the next episode in the series we will be going through the
configuration. Right, OK so it's probably been a long video maybe 30 - 40
minutes or so. So I thank you: if you got value out of this video give it a thumbs
up below if you want to see when the next video comes out because it's going to
take me a bit of time to edit them, then don't forget to subscribe. All the links
and everything else that you need are in the description below the video.
Obviously if you're watching from outside YouTube you'll have to click in... OK
Thank you very much, I look forward to the next video. Thanks, bye.
Không có nhận xét nào:
Đăng nhận xét