The Best Nest ↔ Home Assistant Integration via HomeBridge // Better than the "Official"

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey everybody it's ryan with the  smart house and today we're going to   revisit our nest integrations now in a previous  video i did one on an integration called bad nest   and this worked great for a couple of weeks and  then the developer pulled the repo off of github   now a couple people had already forked that  and gone and created their own version of it   but the official version was gone and i  don't think it was being developed anymore   and it stopped working for me a few months ago  so i actually switched over to the official   integration or the official integration um  which is where you actually go out and you   get a official nest developer account you spend  five dollars on it and you use their official   methodology to pull keys it's actually quite  complicated process it took me about 30 minutes   to get it set up so not something i recommend  for everybody and frankly it wasn't as powerful   as the badness integration it was missing  some things like sensors i couldn't see my   bedroom sensor inside the integration it like i  said was very unstable every time i restarted my   home assistant instance or did an upgrade i had  to re-authenticate it every single time and so   it would break randomly so i kind of sought out  and looked for a new and better version and ran   across a couple of posts referring to the home  bridge version of the nest integration and so   i went ahead and set that up and it does  seem like the most powerful and the best   version of what you want to be able to bring your  nest products in to home assistant so effectively   what we're doing here is we're going to set up  a home bridge which is a home kit emulated hub   similar to using something like the hue emulated  hub where you're basically running a piece of   software that's emulating being a home kit device  so home kit being the apple line of products   for home automation you can actually add this  home kit integration to your ios device as well   if you wanted to add it to the home application  but what we're going to be doing is we're going   to be installing a docker container that's  going to run the home bridge application   if you don't want to go through this process they  do actually sell a hardware device but i think   it's around 100 so it's much easier in my opinion  to go ahead and just run a docker container   that runs the home bridge and then you're going  to install a plug-in called home bridge nest   to set that up and use that to run your nest  products and then that will integrate directly   with home assistant we actually don't have to do  anything special with home assistant it already   natively supports home bridge and home kit devices  so we're going to be doing all of the other work   just to set up and establish those devices in  our environment kind of the steps for the process   today the first thing we're going to do is we're  going to install an application called portainer   in our home assistant instance now this is a  supervisor add-on and it's part of the community   series so we don't even need to go out and find  it and what portainer does is portender lets you   actually interact with the docker containers  that run your home assistant instance so   specifically today i'm talking about running home  assistant which is the new parlance for pass i o   where you're running a supervised version of home  assistant that has all of the separate containers   so notice that you'll see a supervisor tab as an  option on your bottom left hand corner so this is   running if you're running a raspberry pi or if  you're running an integrated version say in a   proxmox which is what i'm doing here today this is  gonna be most of you most home assistant users out   there but if you have questions you can go into  the about section and see what type what version   you're running so what we're going to do is we're  going to install this pertainer application which   gives us a nice graphical user interface to be  able to manipulate docker containers but we don't   need to be doing anything with the current home  assistant instance we're going to just be adding   our own docker container so the first step is  we're going to install portainer we're going to   use a bit of code to go ahead and set up this new  home bridge docker container then we're going to   install the nest plug-in in home bridge then we're  going to grab our keys similar to what we did in   the bad nest video and finally add that into home  assistant so it should be a pretty easy video it's   going to be a lot of details it's a pretty simple  step-by-step instruction i've actually combined a   couple different form posts together into this  method so i think it's pretty quick and easy   actually one of the users in our discord server  uh d james he and i've been talking back and forth   and i actually stepped in through this through  discord so it's pretty simple pretty easy to do   but i wanted to put a video together to give you  all the details necessary to do this on your own   so on that subject if you run into any problems  go ahead and click on the link below and it'll   take you into our discord server and that way you  can ask questions in there there's a couple users   in there and then i'm pretty responsive if you  send me a message tag me on it or you can leave   your question in the comments below and if you  found this video helpful and you want to support   the channel you can click this link and it will  take you to where you can buy me a beer thanks to   all the users that have supported the channel so  far all right so let's get into the installation   of partainer all right so here we are in my test  environment the first thing we need to do is go   ahead and install the portainer add-on and the  easiest way to do that is to go down here to   supervisor go to the add-on store and search for  port tuner so you'll see it's built in as one of   the community add-ons so it's not you don't add  any special urls so go ahead and click install   so once that's done you have to disable protection  mode which you'll get this nasty red warning at   the top here and that's fine because of the way  this particular add-on interacts with the core   supervisor it needs to be disabled so we'll go  ahead and disable that and click start alright so   now that that is done and started let's click over  on log and make sure it's finished starting up   once it's done starting up we'll click the open  web ui here and it's gonna ask you to go ahead   and set up your username and password for this  instance so go and give it a password that you   feel comfortable with so i'll create that  new one and then you'll see here this is the   docker container that's running all of your home  assistant add-ons so if you look here you'll see   all the different add-ons that i have running and  their status inside of here so i'm not gonna get   into all the different things you can do with this  but what we need to do now is create a new stack   so i'm actually gonna pop over here and grab this  code this is on the blog post that i have for this   video but it comes from a form user the cem big  thanks to them they're the ones that made a very   easy way of doing this or a very easy way for you  to configure and add this into your home assistant   so we'll go ahead and grab all the code they  have here which use it by clicking this button   we're going to pop back over here go to stacks   add stack give it a name we're just going to paste  paste the docker compose file right here so we   will paste in the code from the docker compose  here scroll down and click deploy the stack now   this may take a minute or two depending on what  type of hardware you're running on my raspberry   pi was probably less than a minute this is a  virtual server so it should be a little bit faster   all right now the stack has been deployed and if  we click on this we'll see that it's started all   right to access the ui we need to use this port  here 8581 so you want to go to the ip address   of your home assistant instance the internal  ip address of your home assistant instance   colon 8581 so i've got the url down here below  um but of course it'll depend on which ip   address you happen to have so you can also use the  homeassistant.local colon 8581 so when we're here   you'll see this homebridge log on and it's just  admin admin for username and password and then   here we'll see home bridges up and running that's  the first step we've completed that you'll notice   that there's a code here and i'm not going to blur  this out because i'm this is my backup instance so   this code here is how you'll add this to the ios  an ios device or to your home assistant instance   later on um so now that that's done let's go ahead  and jump over and get the nest plugin installed   all right so with the humbridge ui let's click  plugins and you notice you'll have the home bridge   ui and home bridge dummy that's all we have right  now but if we go up here to the top and we search   for nest we'll get a whole bunch of different  ones what we want to use is this verified one   here at the top called home bridge nest so we'll  just click install here and we can watch the code   roll by as it does the install all right so that's  it now now we have a home bridge nest set up here   and as i said in the introduction you can use both  a nest account or a google account so either way   that you want to you can utilize that for this  particular one so we now have a functional home   bridge nest plugin installed now in the next  section we'll get a little more complicated   we get into how to actually retrieve information  for a google account so there are two different   ways of authenticating for this particular  one if you have a nest account and you haven't   converted over to the google account yet you can  follow the simple nest instructions which just   has you pull a access token from the nest account  which is pretty easy to do and the instructions   are right here i don't have a nest account so  i can't step you through that so if you look   down here there's a link that says using a nest  account you can click that and it will take you to   how to pull the code from your nest account right  here it's pretty easy you just log into your nest   account and then you add slash session to it and  then you'll see a long state here and there's   something called access token grab that token  and paste that into that field right here but   for the rest of this i'm going to show you how to  do this in a google account because this is going   to be most common since it's now required to have  a google account for your nest products when you   grab two things the issue token and the cookies  the api key you can ignore because it's not   required for this one you only need the two things  which is the issue token and cookies now these   we've pulled before and i mentioned it i think  earlier but if you follow my video in bad nest   and i'll put a link up here in the cards to it  and also um the timestamp in the video where that   section starts it's the same process so i'm going  to go through it fairly quickly on this one so for   the google account you can click the link right  here to follow these instructions so to do that   you need to open up a new private tab in chrome  so i'm gonna switch over my chrome browser real   quick so third first thing we need to do open up  an incognito tab and go down to more tools and   developer tools what we need to do is enable uh  logging for the sources so we click on the network   tab and then go to preserve log this will keep the  log of all the keys as it goes as you go through   the authentication process that way you can pull  those keys from your browser once preserve log is   turned on go to the filter box and we're going  to type in issue token now what this will do is   it'll only show entries that have this issue token  statement in there then we'll go ahead and sign in   we'll go to home.nest.com so go ahead and sign in  with your google account i'm going to go ahead and   skip through this part so you don't need to watch  me sign into my account all right so now we're   signed into our nest account uh you can see my  house everything's good there it's raining today   and then you look over here you'll see it actually  has the token we're looking for because it's it   searched it out so we'll click on the headers tab  so under general we want this entire request url   which of course part of it's been blurred out but  we'll go ahead and grab this entire url copy it and again probably paste it into notepad just so  we have a copy of it in case we need it for later   so this is the issue token so it should the last  part of the statement should say nest.com so it   should start with https on one side and end with  so we got the first so that's our issue token now   to grab the second piece which is the cookie so  we'll delete the issue token from here and we'll   change this to type in o off o a u th 2 iframe and  we want to select the bottom one down here click   that where it says request header scroll down  where it says cookie now it'll start mine starts   with a couple of underscores you want to grab this  entire thing the entire block no matter how many   other characters are in there grab that whole  block and we'll go ahead and paste that into our   notepad for safekeeping now we're done with this  chrome tab so let's so let's go ahead and flip   back into our home bridge instance back into our  home bridge instance and so we're going to paste   in our cookie and our issue token remember the  issue token starts with https and ends with   nast.com paste both those in and then we'll scroll  down and hit save now it tells you i need to go   ahead and restart home bridge so we'll use that  by pressing this power button up here at the top   so once home bridge resets we'll check our logs  to confirm that we have active nest products in   our system so if you look at the home bridge logs  we see it's starting up again you've got the code   here that we're going to need in a minute and if  you look down here at the bottom you'll see some   entries for nest so we've got nest downstairs  thermostat which is my thermostat we've also   got the occupied sensor and a temperature sensor  called bedroom so it looks like everything is   functional here in home bridge so while we're here  let's go ahead and grab this code that we had from   before and head back to home assistant so so this  next section i'm going to show you how to add the   home bridge into home assistant you can now view  your nest items so i don't have nest protects   or cameras or anything like that so one of  our discord users have reported that his   nest protects do show up so other nest products  should show up in here as well so let's click   over to home to overview go to configuration  integrations and you'll actually notice that   the home bridge controller will show up as a  discovered item so you can click here to configure   it or you can go to add integrations and just type  in homekit now you'll see i've got two different   ones here because i actually have one running  on my live instance and one running on my test   interns in instance but if you look up here at the  top you'll see the identifier for this one is 558c   so if you see multiple home bridge controllers  just check the name of the tab and that's we'll   show you what which number yours is so i'm going  to click on the second one and then take that code   remember this pairing code right here and we'll  paste it in on here and click submit and there we   go now we have a thermostat we have a temperature  sensor we have a home or away occupied sensor and   it also adds the home bridge itself in so we'll  go ahead and click finish and now i can click on   the four devices here and click on thermostat  and there we go there's my thermostat and and   the temperature sensors and everything so i'll go  ahead and add this into lovelace just so i've got   those ready to go so i can view them there we go  now we have a thermostat so quickly in this last   section i want to take you through what the  integrations components it has so again i'm   limited because i only have an s thermostat and a  temperature sensor but you would also see if you   have other nest products that show up in here so  for the thermostat specifically you have all the   normal controls the only difference is you'll  notice there's no fan control and there's no   eco switch in here that's because those are two  separate switches so it actually creates a switch   which it doesn't call it eco mode but it is the  eco mode so the switch it creates just called   the name of your thermostat this is actually the  eco mode so you'll notice if i were to flip this   switch on this is going to change over into eco  mode so i like to click on this first switch   and go ahead and call this one for most at eco  mode that way it's not confusing the second one   you'll notice is actually a fan entity and this  allows you to turn on and run the fan for your   thermostat now this will actually turn on when  the thermostat is running air conditioning or   heat obviously you can't turn this off while the  air conditioner or heater running but this allows   you to turn this on manually so you can control  it's like any other switch you would in your house   and then you see the current temperature and um  not sure why there's two separate temperature   sensors on here for the thermostat all right so  for those two are showing up there now in addition   if i go back to the integrations page and i go  back to here you'll notice home occupied is a   sensor so this is a switch that's turned on when  the home is occupied this is pulling from your   nest application so if you have multiple sensors  like you use the nest protects it's going to take   those all together and and try to find if the  home is occupied or not so this should match   up with what you see in your nest app and then  we've got the bedroom sensor which this is the   sensor that's in my upstairs bedroom right uh  it's showing the same but usually these two are   not the same just because it's a cloudy rainy  day so this is the bedroom temperature upstairs   here in my house upstairs in my bedroom so those  are the basic components that get added if you had   other nest components they would show up in this  integration as well again i'm limited because i   only have the nest thermostat and temperature  sensor so all right so there you go now you've   got a fully functional nest environment now  this is much more stable than the one that is   the official method that you can do by paying  the five dollars for the developer account   that one every single time my system rebooted  i'd lose the connection and i'd have to go in and   reestablish it and re-authenticate it every single  time which was a real pain every time i rebooted   or upgraded this one is more stable and it has  those extra elements like the switches for the fan   and you can see the upstairs sensor which  the official one does not support that so   i think this will be a much more  stable much better integration for you   thanks for watching the video have a great week  if you'd like to see more videos on home assistant   integrations you can click the playlist here or  if you'd like to have the algorithm select the   next video to watch click up here and again  if you haven't already please make sure you   subscribe by clicking our logo right here. Thanks and have a great rest your day
Info
Channel: This Smart House
Views: 5,207
Rating: undefined out of 5
Keywords: smart home, home assistant, home automation, homekit apple, homekit devices, how to, home assistant raspberry pi, homebridge setup, homebridge homekit, homebridge plugins, homekit ideas, home automation system, home automation project, home automation ideas, nest integration, nest integration home assistant, nest home assistant homebridge, home automation diy, smart home ideas, smart home tech
Id: QWlfoy5NRRw
Channel Id: undefined
Length: 16min 16sec (976 seconds)
Published: Tue Sep 07 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.