Home Assistant & trigBoard (Ultra Low Power Sensors) Full Tutorial - New Favorite IoT Platform!

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
so i've made a lot of videos now about the trig board and its amazing low power capabilities with support right out of the box for services like pushover push safer if this than that messaging over udp tcp mqtt and you're monitoring things like windows doors um you know hook it up to the garage door the the mailbox the doorbell you can even monitor for water leaks uh motion sensing the smoke detector the list goes on and on and on i've made a lot of videos about this which is why i think it is the ultimate battery-powered iot device so at this point it really only makes sense to talk about home assistant which is supported right out of the box and i'm going to show you how to do that in this video now and if you haven't heard about home assistant i think you should really check it out because it really will take your home automation system to the next level so let's take a quick peek here and everything i'm going to talk about in this video is up here on the docs page go over to the home assistant guide here and this goes through step by step how to get everything here up and running so if you're a little bit more advanced you can go here and just kind of blast through these instructions otherwise stay tuned i'm going to go through all of this here and explain how it all works and one of my favorite things with home assistant is the ability to plot and visualize data very easily with influx db and grafana so you know here's this gorgeous dashboard i created you know very easily and this is all part of a test i'm running on a solar powered trig board actually so you know we're pulling in the voltage we're automating lights to charge and discharge the panels and all kinds of very cool stuff here which i'll talk about in a future video but i just wanted to kind of tease it here so let's go now over and look at this trig board i've got on the bench and i will show you how to set all this up but just to give you a quick demo here on an automation so right now the door is closed and then we'll open the door up and you see that it went from closed to open here in the dashboard very simple now let's create an automation based on that and we're going to create the ultimate home security system here we've got a google little home assistant speaker thingy whatever here and we'll go down here to configuration automations and i've already started this but just to show you this setup here real quick we're going to set the trigger up for the state of that front door so when it goes from close to open we're going to fire an action here and it's going to be tts text to speech to that google assistant family room speaker here and let's go ahead and turn this on and i'll show you what it does so somebody breaks into the house opens the front door i don't know who you are i don't know what you want but what i do have are a very particular set of skills skills i have acquired over a very long career skills that make me a nightmare for people like you if you leave now that'll be the end of it i will not look for you i will not pursue you but if you don't i will look for you i will find you and i will kill you so how cool is that right so you can do a lot of stuff with this in fact let's just i just want to show you something so there's a ton of uh tutorials on youtube about home assistant but just like look at this guy's dashboard here i mean it's just crazy and if we kind of skim through this a little bit like what look at what you can do with this thing it's unbelievable and uh you know it's all supported right out of the box from trigboard very easy because i support mqtt so it's all very straightforward very easy to set up we don't need to re-flash the trig board with anything it's all part of the configurator and that's what i'm going to show you now is how easy it is to get up and running with it okay so first step to setting this up is obviously you need home assistant and you probably if you're watching this and are interested in this you probably already have this setup but you head over to the home assistant installation page i have mine running on a raspberry pi so i just downloaded the image and flashed it right over hooked it up to ethernet and i was good to go okay so that was a piece of cake then once you've got that set up and on your network you just go to homeassistant.localcolon8123 and boom you're in your dashboard well actually it's going to ask you to set up an account so make sure that you write down your username and password that you set up to log into home assessment because we're going to need that for the trig board in a couple things to do real quick just to make things easy we'll go down to your user name here to the bottom left and make sure that we're in advanced mode then we'll go to supervisor we'll go to system and take note of the ip address here that your home assistant server is running on okay then you'll go to the add-on store and make sure that you have the mosquito broker installed so we just search mqtt i already have it installed here so you'll go to the mosquito broker right here you'll see install once that's done then you start it and here's my configuration you'll note that our port we're going to use is 1883. now this part here is important you have to go now to configuration integrations you'll look for the mqtt here when you click on it a little pop-up you'll see a little pop-up and you just click submit and i actually grabbed a screenshot it looks like this and you hit submit and then you're good to go so now let's set up the trig board okay so let's first start by waking the trig board up we'll press and hold the wake button until we see the blue led flashing there we go we'll let go and now it's in configuration mode so we'll go over to the docs go to configurator we'll launch the configurator within google chrome here we'll click connect to connect to it via bluetooth pair it up and here we are with all of the factory defaults so the first thing we want to do is connect this to the same network that you have your home assistant on so we'll go ahead and do that now okay when we save and connect we get an ip address we're connected so that is good now with home assistant we need to make some changes here we can't have any spaces here so we're just going to call this test trig board like that no spaces save that we're going to wake on both open and close but what we have to do is open no space and you can name these anything you want you just can't have any spaces same thing with the button so just button like that that'll be good save after each one and then with the timer we'll wake every 60 minutes that's cool and we're going to check and we'll check if either one opens actually so contact's still open we can't have that we can go still open just like that and still closed and then i'm going to actually lower the battery voltage down to one because we're gonna let home assistant manage the low battery alerts now one of the cool things with with the trig board is that you can have multiple services running all at the same time so you could have it still send a push notification via you know push over push safer or whatever and also send to your home assistant you would just have multiple services here enabled and that's totally fine but for now let's just talk about mqtt so we'll go here mqtt and you're going to use the same username that you use to log into home assistant with okay and same password and then the port is 1883 like we saw and then the ip address is the same one we pulled out there from the system uh tab there so let's put that in here and then give it a topic and this needs to be unique for every trig board so we'll call this test trig board and then make sure you save this because we're going to need this on the configuration side for home assistant so let's go ahead and save that and we're done we'll go ahead and disconnect and let's go test this out okay we'll go back to configuration integrations we'll go down to mqtt we'll click configure and let's listen to that topic and see what comes in so that same topic you just had start listening and now let's open the door cool message received test trig board open so it works okay great so now let's create a sensor that listens on that topic so we'll stop listening so we need a way to edit the configuration file within home assistant and i use file editor and you can get that by going to supervisor go to the add-on store and you want to install the file editor and you'll see the same kind of thing install start and i like to keep this in the sidebar because i'm always going to it so now we can see it right here so then we go to file editor we want to make sure that we can edit this configuration.yaml file so you'll go here and make sure that you have this one so you see here in my file i've got a lot of other trig boards set up but door they're all set up under sensor here and these are all trig boards all the way down here so each one of these is an entity that we can go in and use within home assistance so you see i've got the front door set up there the front door battery and then a couple other trig boards here so let's just set this up fresh with the one we just created that test trig board and again if you go over to the docks you'll see all of this stuff set up and when i created these docs i was doing it completely from scratch so this is how it would look if you were setting it up for the first time so i'm going to leave my existing stuff there and we'll just create the new one here at the top so sensor and you got to be really careful with all of your spaces here within this yaml file okay mqtt and then space space and then we're going to set the topic here i'm going to do a lot of copy and paste here okay now i'm just going to paste it right in from my docs page and then we'll just change the topic to the one we just created there in the trig board configurator the topic is test trig board just like that and then we'll give it an entity name that's you know somewhat human readable within home assistance so this will be the we'll just call it the test trig trig board just like that and we can even give it an icon too so if you go to so if you search mdi icons any of these will work so there's like a million icons in here so if you want you can just choose let's just pick a random one how about this one right here and this is called bow tie so we'll actually copy and paste that and use that as our icon we can also give it a unit of measurement now we're going to use this for now as the state so let's just leave this alone for now okay let's go ahead and save the file and these settings are not going to take effect until you do this let's go to configuration all the way down server controls and then manually configured mqttnt entities so we'll go ahead and select that so within developer tools here we can look at any of the entities here and explore the states we can go over to template and actually start working on how we're going to parse things out so we're just doing this for now just to get familiar with how all of this is going to work so let's look for the test trig board but before we do that let's just wake the trig board up so i'm going to open the door there okay so it sent the new message across and if i go to test trig board you see there the test trig board open with the battery voltage so let's copy and paste this entity and we're going to go over to template and start experimenting a little bit so let's put in the double curly brackets there and then we're going to put this in right like that and it doesn't know what this is because we need to get the states from it states dot this and then dot state okay there we go okay so we're pulling the state out of this entity and displaying it right here now we can start figuring out how we're going to parse this out so this is very cool we can do is do a split and we can split by the space character cool so there we have the name test trig board open and then the battery voltage so let's say we want to pull out the open right there okay so we're going to create an entity for this for this trig board here and it's going to be this state and it should be open closed still open still closed whatever that part of the message is is what we're going to use so now it's a very easy thing to do but we we see that there's a comma right there as well so what we have to do is first select this part of in the array which will be check this out it'll be one open but all we have to do is split again by a comma this time okay and then we're going to choose the first part of that array open pretty sweet now we're going to close the door i'm just going to put the magnet over by there so i just there there we go change from open to close i'll open again and there it goes to open i'll press the button just so you can see it button so now we figured out how to parse this out and we can do this very easily with value templates now this same thing works with the voltage as well so all we do instead of one is a two and then we don't really want to separate out by a comma but instead let's strip off the v there so we'll split by v and choose the first part and now we have the voltage and as i continue to open and close this you see the voltage measurement there changes so i just wanted to show you that because this is how we're going to create the two entities for the default trig board which will be the open and close part of the message and the battery voltage so let's go back now to the file editor and for the test trig board here what we're going to do is add a value template and i'm just going to copy what i've done already down here and this is in the docs page too so you can copy it out as well let's make sure that we have the right indentation so it's just the value we're splitting by spaces and then we're splitting off the comma and now we have an entity for that state status and what we'll do is just copy and paste this entire thing again because we need two entities or two sensors one for the state and one for the voltage so this one will be what i just showed you where we're splitting off the v at the end and let's give it some cool icon how about the transmission tower over here from mdi and then a unit of measurement for the voltage v okay very good so now let's save that we'll reload the mqtt all right so now we can go to developer tools let's just make sure we've got both of these entities they're the test trig board state there and the voltage so now let's go to overview uh let's just create a new card here we're going let's just grab the entities yeah let's get rid of some of these and the test trig board and then a new one the test trig board voltage and we'll save that and right here let's just get rid of this one okay exit out so there we have test trig board there it is open the test trig board voltage so now if we close the door there it is close we open it and it goes to open and we also have the voltage readout so from here now you can create your entire home automation system tie this in with it create those automations scripts alerts alarms blah blah blah you can plot things out and i think i'll probably make another video on setting up the influx db and grafana though if you're curious on how to do all that i've got that here in the docs page if you go over to home assistant here plotting with grafana and influx db so setting all of that up it's very straightforward this is a step-by-step guide and maybe i'll make another video on that let me know all right so now we've got the trig board tied in with home assistant you saw how easy that was you have this stay down you know what states are possible so you could set up conditional cards so that if the state here you know switches from open to closed or equals open equals closed or still open still close the button blah blah blah whatever you wanted to do you could build out your home automation sequence you can you know create the alerts alarms you can plot things out you can do a lot of stuff here so the last thing i want to talk about real quick here is now custom sensors and this is very very easy actually because i just walked through how to parse things out and if we go over to the docs page for a second and you go to custom sensors so within the trig board base of firmware and i've got a little snippet here here's an example of me checking a digital pin and whether it's high or low all i do is add a comma 1 or a comma 0 based on that state and because we're so good at parsing things out splitting by commas within home assistant this 0 or 1 is very easily parsed out so you see here what i did was add a new entity here for the trig solar state which is the state of this pin right here digital read 25 and it's just a comma separated value so you see the first is the voltage which is what i picked out here for the voltage and then i added this one or zero comma separated which would be the next value in the array and that's it so very very very cool and then here's another one this is actually plotting temperature so what i did was the same deal again i just added to the push mess the push message a comma first and then the actual temperature string that comes in and this also by the way i have a full example of if you're interested in that and then the same deal as before we pull it out it's all comma separated so split by commas and then there it is the temperature value and if you're interested in that go over here to temperature logging and i do it two ways one with corelessis and one with home assistant so if we go to the home assistant method you'll see exactly how that's set up and how i have that baked into a dashboard here to plot it out over time and by the way this is done with the mcp9808 temperature sensor i've got a little adafruit breakout board wires right over into the trig board very uh cool easy to set up project all right there you have it trig board with home assistant so guys tell me what do you think about this uh let me know how this works out for you even if you're not interested in home assistant i think you should at least try it out if you got a raspberry pi laying around throw an image of this on there test it out it's just so cool to play around with you know i was thinking as i was sort of playing here you know that this really does obsolete a lot of the iot videos i've made in the past and you know possibly as a future project would be to support mqtt discovery right out of the box or esp home or something like that but even now just with using that simple mqtt message and then parsing it out with a value template that's pretty good actually and i don't know how much further we need to go with it so and that's all i've got for this video so thanks for watching
Info
Channel: Kevin Darrah
Views: 4,650
Rating: undefined out of 5
Keywords: trigBoard, iot, sensor, home assistant, esp32, tutorial, home automation, low power, battery
Id: Fs0_ihgrvKA
Channel Id: undefined
Length: 20min 47sec (1247 seconds)
Published: Mon May 03 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.