Home automation dashboard tutorial using Home Assistant, InfluxdB and Grafana

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey it's Joe Farah with cake toolkit and today we're going to talk about how to build a home automation dashboard we're gonna use something called Gravano which makes it look really pretty here's another look at what that looks like and the data on the back end of this is something called in flux DB so we're gonna do two add-ons - home assistant to get us a dashboard that looks something like one of these here first thing I want to talk about is this climate is something I built with the ecobee video I made and you've got this temperatures here this is five different temperature sensors throughout my house and what I want to do is we're gonna build this right here as a dashboard first thing we need to do is go and get the add-on so just go to the add-on store you're looking for one called Griff fauna it's GRA FA na it looks like that you're looking for another one called influx DB as typical click on them and click the install button when you get them installed the first thing I want to do with both is turn off the SSL it doesn't work on one of them if I recall right and the other one you would need to have your certain file connected if you do have your certs figured out then go ahead and hook that in once you have Griffin and influx influx is going to be our database one that we're gonna want to configure gravano will be the UI that renders the influx database so we're gonna want to go down here and then I'm gonna go and add these both to the show and sidebar and they'll end up over here when you click on the influx DB if you get a 502 error give it a while it took me about five minutes before mine actually popped up I did have to reboot also okay once you do that you'll end up here and you're gonna want to go to influx DB admin we're gonna want to create a database where and call it home assistant and now I've got a home assistant database that we can put data into we're also gonna need a user and I'm gonna just call that user home assistant and do a pas wrd password by default the permissions will be none so make sure you go back and give this all and apply this is probably one of the most common things that people miss from what I've seen okay so now we've got the user permissions created things are updated I've got a home assistant database here the next thing we want to do is add this to our config files so we're gonna go to let's say I've got the file edit or add on this makes this really easy I can go to the configuration yamo and edit that right in place on the add on page for influx DB if you scroll down it's gonna show you the add-on sample here and they'll tell you what all the settings are but if you go down a bit further this right here is what you're gonna want now this is for configuring it if you use with the what used to be called haseo and again the other thing you want to make sure right here that this is a - I have an underline I don't know where I got it from I've seen a couple other people that have done this with an underline and you get a terrible error that's very hard to debug so make sure that's a - password I did password here but if you've been following the tutorial you'll see that the database name I gave was home assistant that matches up the username i gave us home assistant and this password this gives us all of the info that's needed for home assistant to talk to in flux DB and start putting data in I'm gonna look for the green check mark here this is important that shows that this is rendered correctly and that we don't have any typos here and I'm just gonna hit save there okay back to the supervisor system and let's reboot now that we've rebooted we're gonna go down to the Griffin ax and now what we want to do is hook the UI that we have a Griffin o2 in flux DB so we're going to add a data source and the type is an influx DB data source we're gonna give it a name and then we're gonna go to HV this here which we use before in our settings our configuration port 8086 we're gonna go down to database and remember that was called home assistant you should probably have a user name password by now and we're gonna test it out all right we're good okay so we're gonna build out our first graph but before we do I'm gonna show you some tricks real quick if you're going to developer tools and you click on entities or states here you can search for something like for instance I search for humidity and I'm just gonna set it to 49 and I'll just set it back to 48 but what that does is that register as a state change and when I go to influx DB here basically just kind of hacking it so that I get see and now this shows out the humidity this wasn't here before as the states changed throughout home assistant they will all end up showing up in here but I'm doing that's it for the demo and also if you're setting this up you want to set up a dashboard you don't want to wait for a state to change that's a cool hack to get things going so now we can go to graph fauna and we'll set up our dashboard here so we're gonna say build a dashboard we'll add a query and the first thing we do is our temperature so we'll add a fairing height where the domain is equal to sensor and then we've got dots over here we're gonna change the fill to none and that gets this line this line is all of the sensors put together so we need to regroup them so we're going to say group by tag entity ID and now I've got my five temperature sensor showing up as lines and things are starting to look pretty now I'm certain to get happy if I mouse over I can actually see the values and I can see that my upstairs and downstairs are about four or five degrees apart right now which is kind of cool info to know it's why I'm doing this it's also just looks pretty thing is these names are terrible and so the way to fix that there's an alias trick that you can do you can do dollar sign tag underscore and then whatever I put after here it will a Leah sees I want to alias them by the entity ID name so I'm gonna go into T underscore ID and click away and now that cleaned all of these up it also when I mouse over it cleans up the names here they all look great so it's my wife's office downstairs master everything showing up as entity IDs right now I can deal with so that was adding the group by make sure fill is none to get the lines to connect if you don't do none you will end up with dots like this and then tag any the ID to group them separate them out if I click down here to visualization I can start changing these two different charts and graphs we'll talk about that more in a second the axes I can do names and I mean any if you've done any charting you can name the axes you can remove the legend if I get rid of show it goes away here if I do as table it will vertically stack it so you can kind of change everything how you want it to look these values are really handy because I can click on average and it will add them next to the temperatures and then I can very quickly see what the average temperature is in any of the rooms you can do same with men's Macs and such or even current the setting here panel title is important because of course I want to be labeled and make it transparent just because I think it looks a little bit nicer and you can set up alerts so let's see I'm gonna save the dashboard here temperatures or actually they just call it home and there's my dashboard started out so we've got temperatures now let's create a new one here we're gonna add another query and we're gonna go to % we're gonna go after the humidity so where the domain is sensor and there's our humidity actually let's see if we change us to edit Eid equals home humidity there we go field value meantime we'll do none to make that connect when it starts registering type in humidity there it goes all right so maybe the humidity looks better as a number or maybe as a chart let's see here we'll just we'll do it as a graph that's fine we can graph the humidity and we want to go down to settings call this one humidity okay we'll save that off and now we can drag these around so we can do this and we'll add another panel now we're gonna get into networking and I'll show you how to stack them so this is bytes per second outgoing I believe just say bytes per second and now if I click on the add query here I'm actually adding another chart on the same graph and that's super super handy so let's say that one was byte still do kilobytes per second you yeah and so now I've got kind of a database thing let's see for the router let's see if yeah that looks much whoa by three seconds a bit large I can fix that but this is showing my network usage and you know just for an example this works out well we'll just call this network usage drag this down and place it wherever you want it and so now we've got some home climate charts going on we've got a network usage chart that's a bit of a mess but just kind of shows the concept and this is how you would build a home dashboard you basically just kind of keep adding to this let me know what you think let me know what you make I really appreciate you watching this video I really was excited when I first saw these dashboards and had a really hard time getting things set up so I'm glad that was able to walk through this fairly quickly for you hope you enjoy it and if you want to see more videos like this like and subscribe the next video we should be getting this onto the magic mirror appreciate everyone watching and subscribing appreciate the likes in the great comments thank you so much and until next time on Joe faire with geek toolkit
Info
Channel: GeekToolkit
Views: 87,245
Rating: 4.9164491 out of 5
Keywords: home automation, home assistant, tutorial, Grafana, Influxdb, Dashboard, beginners
Id: rKIHoqxxMek
Channel Id: undefined
Length: 11min 35sec (695 seconds)
Published: Sat Mar 07 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.