Tailor made automations for each person - ESPresense & Home Assistant

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 มิ.ย. 2024
  • How to set up ESPresense to track people and objects in your house, to trigger customized automations.
    ESPresense is a Bluetooth based tracking system running on cheap ESP32 computers that will tell Home Assistant what room you are in as you move around your smart home. In this video, I show you What it is, how it works, how to easily set it up and how to integrate it into Home Assistant for whole house room tracking for use within Home Assistant Automations.
    Links:
    ESPresense: espresense.com/
    MQTT and Home Assistant Video: • MQTT and Home Assistant
    Chapters:
    00:00 - Intro
    00:57 - What is ESPresense and how does it work?
    01:51 - Setting up ESPresense base stations on an ESP32
    06:41 - Setting up Bluetooth tracking beacons on ESPresense and Home Assistant
    09:54 - Adding the presence sensors to Home Assistant
    10:14 - Calibrating ESPresense
    12:28 - Room Presence Automations in Home Assistant
  • แนวปฏิบัติและการใช้ชีวิต

ความคิดเห็น • 94

  • @electronron1
    @electronron1 2 ปีที่แล้ว +10

    Long before anyone thought of home automation (Early 1980's) a friend of mine automated his house. He was a software engineer and writing code for a microwave oven controller he added code to control lighting to the unused portion of ROM in the microcontroller and then he took any rejected microcontrollers and used the ones that the light controller portion still worked were incorporated into the overhead lighting of his house. He had a computer dedicated to monitoring everything and every doorway had a pair of IR sensors to count how many people entered or left the room turning on or off the lights. He modified a Speak & Spell to announce various things such as if a window was open and the garage door status.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว +2

      This is the kind of thing I wanted in the 1990s, but I was never smart enough (nor had access to the toys I needed) to make this happen. Home Assistant has made it so much easier for me!

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว +1

      Such a great story. Thanks for sharing electronron1!

  • @geovanegomes6187
    @geovanegomes6187 ปีที่แล้ว

    In time: the video was really really good. Continue like this, please!

  • @BrentMaxwellian
    @BrentMaxwellian 10 หลายเดือนก่อน

    Awesome walkthrough - thanks!

  • @patrickpaganini
    @patrickpaganini 2 ปีที่แล้ว

    Very cool stuff. I've started using espresence too recently for room automation. I've also played around with wifi passive mode for general home or away logic.

  • @MrDingleberry31
    @MrDingleberry31 ปีที่แล้ว

    Just got this going. Thanks for the great video. Appreciate you!

  • @MarkGhali
    @MarkGhali 2 ปีที่แล้ว

    Yes more presence automations! thanks alan

  • @KrastyoKrastev
    @KrastyoKrastev 2 ปีที่แล้ว

    Can't wait for the next videos in that series :)

  • @kraydy1291
    @kraydy1291 9 หลายเดือนก่อน

    Before even having seen the whole video I have to state: I like the old intro so much more it was somehow unique and special in „internet“

    • @HomeAutomationGuy
      @HomeAutomationGuy  9 หลายเดือนก่อน

      Naww thanks. It felt embarrassing to me as it was just a static image that was panning and a MS Azure voice doing text to speech 🫣

  • @rasbe6863
    @rasbe6863 2 ปีที่แล้ว +1

    Definitely going to work on this this weekend. At first I thought this was using ESP home. Which I'm glad it's not cuz I've never been able to make ESP home work. Now I have something to do with all those ESP 32s that I bought on Black Friday last year. Great video!!

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      Let us know how you get on - all the best with the project!

  • @WPGinfo
    @WPGinfo 2 ปีที่แล้ว

    Great overview! That helps! The process makes sense, but it seems quite a project compared to the install of other devices in my home.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      I agree! This is why it's taken me so long to attempt it.

  • @EricPenn1147
    @EricPenn1147 2 ปีที่แล้ว

    Great info, thanks!!

  • @larrybrown1984
    @larrybrown1984 ปีที่แล้ว

    Home Assistant!!!! (Thanks for the informative video. Amazing tech!)

  • @WoottonRivers
    @WoottonRivers 2 ปีที่แล้ว +7

    Great video. I've been playing with this for a while. First thing to say is that it's not a replacement for motion detectors. It's not fast enough. It can solve the problem of no motion leading to lights going out in an undesirable way.
    When dialing in the max distances, you may need to see what distance is reported when your beacon is in your pocket. When your body gets been the base station and the beacon the distance can go up quite a bit.
    When placing my base stations I've tried to ensure that they are as far away from each other as possible. I feel this reduces the risk of being detected in the wrong room.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      Thanks for sharing your tips! I really appreciate it

  • @chris
    @chris 2 ปีที่แล้ว +6

    First off, great overview video of the entire process. When I was setting mine up a few months ago, I wished I had such a complete and easy to understand step-by-step process. I referenced 2-3 other videos to find the info I needed. Great job--I know it wasn't easy.
    Second, I wish that you didn't make it so glamorous, comparing it to Bill Gates' home. I set up 5 ESP32's around my home and after all that work, I wish I knew better... because it really wasn't worth it. For starters, it takes an average of 30-60 seconds for everything to communicate and to register that you're in a room. That's a long time. During that time I've already sat down and started doing whatever I entered the room for. Even walking around the room with the app to calibrate (like you did at 11:30) it takes that much time for the distance to change.
    I am also challenged with having a family room downstairs with the master bedroom directly above. I've changed the max distance accordingly and also mounted the ESP32 to the back of the headboard (up as high as possible) to separate it as much as possible as the one downstairs in the family room. As hard as I try to dial in the settings, my wife (currently in the bedroom on the bed studying) registers as in the family room, then in the master, back and forth it flips almost constantly. So, this solution isn't ideal for a two story home since you can't stop the signal at the walls and floors.
    I'm still looking for a better solution, perhaps the Aqara FP1, once it becomes available.
    I love the idea of using these tiny and cheap ESP32's for room presence detection... but it just does not work.

    • @KrastyoKrastev
      @KrastyoKrastev 2 ปีที่แล้ว

      Strange that you have such delays. As per other videos it takes 2-3s and not 30

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว +4

      I'm surprised that it takes so long to register! I had the same problem with it flip/flopping between rooms initially and managed to solve it by reducing the power output on my BLE transmitter in the Home Assistant app and re-positioning all my base stations.
      It's not perfect, but then I think the ideal solution will be a trial and error combination of ESPresense, Motion Sensors and some Aqara FP1s.
      - Motion sensors to turn on the lights as soon as you enter a room.
      - Adjust certain room attributes based on the ESPresnse information, and make sure that these only change if the state is changed to another room or away for a length of time (Personal temperature preference, volume of speakers, art on your digital wall displays... I don't have these, but they'd be really cool!). These won't matter too much if they only change after 30-120 seconds
      - Then turn everything off once the FP1 detects no-one is in the room.
      That's a lot of equipment to get a great result, but we're still in the early days of all this type of technology so we need to have some patience with it.
      I've got some Aqara FP1s coming in the mail in a couple of weeks - stay tuned for a video on them!

    • @HATipsByLarry
      @HATipsByLarry 2 ปีที่แล้ว

      i had the same delays you did until i started increasing the absorption values in HA had to go up to 6 or in some cases even 7 on that value before it started responding as fast as a lot of others reported but after i did it worked well

    • @chris
      @chris 2 ปีที่แล้ว

      @@KrastyoKrastev I'm not sure what is going on... I have everything set to the defaults except for the Maximum Distance, set to 0.8 or so depending on the room.

    • @chris
      @chris 2 ปีที่แล้ว

      @@HATipsByLarry Thanks Larry. I haven't played with the absorption value at all. I'll play with this... I don't know what this value represents, however. Also should Active Scan be on or off?

  • @ADHDbuilt
    @ADHDbuilt ปีที่แล้ว

    This actually gives me some really good automation ideas. I have a dog and cat that constantly set off my motion sensors and my wife doesn't want them going off randomly during the night. So I can put one of these in the bedroom, an it can sense when we're in bed and can disable the automations. Maybe another to sense when wer're pulling into the driveway (althought might be able to detect when wifi connects...).

  • @HATipsByLarry
    @HATipsByLarry 2 ปีที่แล้ว +6

    Been using espresense for 3 months now and after calibrating them for both distance and absorption levels they do work very well indeed, even have one on my dog (its a blue charm ibeacon) very tiny and works well. FYI did you know you can have HA turn off the ibeacon transmitter in the companion app when you leave the house and then turn it back on when you get home? Just send a HA app notification to the phone with the message command_ble_transmitter and the title either turn_off or turn_on and thats it. It took a while to figure that one out. I've heard that Aqara's new FP1 presence sensor works flawlessly and they don't need any device to be on your person. Just waiting for them to become available in the states. Right now they are only available in china.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว +1

      Thank you Larry! I was trying to figure out how to turn the BLE transmitter off and j obviously wasn't good enough at googling!

  • @IceBoxFIN
    @IceBoxFIN ปีที่แล้ว

    Great video 👍
    Works with Samsung Galaxy Watch 4 💪

  • @navarrolux
    @navarrolux ปีที่แล้ว

    Just found this video as I get started using HS. Awesome video! Thank you for putting it together!
    I'm planning on buying the "AITRIP 6pcs D1 Mini NodeMCU ESP32". seems like you did as well. What enclosures are you using?

    • @HomeAutomationGuy
      @HomeAutomationGuy  ปีที่แล้ว +2

      Mine are in enclosures, they're just sitting around naked 😬

  • @AlvTellez
    @AlvTellez ปีที่แล้ว

    Hey Alan, are there any guides anywhere regarding absorption parameters? I understand what they are intended to be used for but I just don't know which values are right or not. I remember the default being 3.5 but I see that it can go all the way too 100?

  • @Nilsje
    @Nilsje 2 ปีที่แล้ว

    I'm waiting for the Aqara presence detector FP1. Nice video though!

    • @candfsolutions
      @candfsolutions 2 ปีที่แล้ว

      The FP1 will tell you that somebody is in a room, but not which somebody is in a room. If that's enough for your automations, then that's great. I'd love to have some FP1s to use for general presence, but ESPresense allows me to tailor my automations for specific people.

  • @lgbrownjr
    @lgbrownjr 2 ปีที่แล้ว +1

    If that fitbit is a inspire 2, then you should be able to track it. Enable the tile feature on that fitbit, then you'll be able to track it with espresense.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว +1

      Oh wow! I had no idea what that "Tile" option was in my Fitbit settings menu!
      Thank you so much! Looks like I'm going to be busy playing with this tonight 😂

  • @josephgeorge3204
    @josephgeorge3204 2 ปีที่แล้ว

    Good one Alan! :)
    have you tried adding the PIR and radar sensors to this setup?

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      Yep! A video about that is coming soon 😉

    • @josephgeorge3204
      @josephgeorge3204 2 ปีที่แล้ว

      @@HomeAutomationGuy wow! That's wonderful.. waiting waiting ;)

  • @Lepelot
    @Lepelot ปีที่แล้ว

    Thank you for another great video...Before I get started with this, I have a stupid question (if there is such a thing!): I already have ESP32's in some rooms, can ESPresence be added to an existing device or does it have to be a dedicated device?

    • @HomeAutomationGuy
      @HomeAutomationGuy  ปีที่แล้ว

      You can do a similar thing with ESPHome, and use it for many purposes at once. No need for a dedicated device

    • @Lepelot
      @Lepelot ปีที่แล้ว

      @@HomeAutomationGuy ok, thank you for the quick response. I'm not sure how to do this but I will give it a try. That's the idea with these projects 😃

  • @clairerovic
    @clairerovic ปีที่แล้ว

    Noticed you had the Nspanel was wondering how you implement this in HA. I have just finished using Tasmota and joBr99 implementation. This is working very well, so far ........

    • @HomeAutomationGuy
      @HomeAutomationGuy  ปีที่แล้ว +1

      I haven't implemented it into HA yet. I'm struggling to find a use case for it honestly

  • @danielorneling2831
    @danielorneling2831 ปีที่แล้ว

    Can you post a link to the stuff you bought off Amazon? New to this and don't know what to look for really :)

  • @mbp5863
    @mbp5863 ปีที่แล้ว +1

    Hey man! I setup my esp32's and everything is working. Except I can't select states of the BT watch I'm tracking, for automations.
    When I move the watch around, I can see the entity changing the states in developer tools. Problem is, when I want to use the state for automations I can only choose: state "when BT watch changes, to (optional): unavailable or unknown".
    I can't select: state "when BT watch changes, to (optional): kitchen" as a trigger for example. Anything I need to do to in order to use the state of the BT watch?

  • @ZubairIO
    @ZubairIO 2 ปีที่แล้ว

    My Fitbit broadcasts when Bluetooth is turned off, on my IPad. So I use Apple Shortcuts to turn Bluetooth off Bluetooth and turn it on every couple of hours start the Fitbit app and sync. Not perfect but good enough for now.

  • @AkaLexboi
    @AkaLexboi 2 ปีที่แล้ว

    Thanks for the detailed explanation and tutorial. I followed you step by stop and it works like a charm! However, I'm stuck at the automation part where you gave your sensor a state in "To (optional)" Can you please kindly show how to set that give your Alans Android a unique state when Alans Android is close to the esp32 in office room? In your example, it's 'alans_office'. I'm at lost now and hopefully you would help.
    Thanks in advance.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      Your device state should change To the name of the ESPresense sensor it is closest to, in my case alans_office.
      Your device should update its state in a similar way.

  • @bobmichael8735
    @bobmichael8735 หลายเดือนก่อน

    Could you make a dashboard for sstats,i would like to see hou much i stayed in each room

  • @martindinicolino8227
    @martindinicolino8227 ปีที่แล้ว

    is there a way to combine two ESP32s in one big room?

  • @kinghuzi
    @kinghuzi หลายเดือนก่อน

    Any chance you can update this guide with espresense companion

  • @KrastyoKrastev
    @KrastyoKrastev 2 ปีที่แล้ว

    Also, I am wondering if before changing nodes it can check for eligibility. For example I can not move from my living room directly to the gaming room above without first moving through two other rooms. In that case while I sit in the living room if it detect stronger signal from my gaming room it will just ignore it and will still show me as being in the living room

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      You might be able to solve this by adjusting the timeout values: www.home-assistant.io/integrations/mqtt_room/#timeout

  • @balalaika1234
    @balalaika1234 ปีที่แล้ว

    Guys, do you think it will be possible to use battery powered ESP32 for this project? To not be bound to usb power source and socket? How long will battery live? I've found on the internet ESP32 can live upto 5 years in standby mode from one CRC123 battery, but not sure if this is a case where standby mode will be used at all

  • @robhall1222
    @robhall1222 ปีที่แล้ว

    When you say "add your MQTT broker details" - is that my regular log on details for the home assistant app - where it asks for username and password?

  • @jmugoose30
    @jmugoose30 2 ปีที่แล้ว

    Any guidance on making the entities a group for automation. What I am trying to do is IF any person is in Kitchen then don’t turn off the lights. I know how to do it with a single entity but seeing if anyone is in that room is confusing me

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      Absolutely! I've been doing this with a template sensor for each room. I'll be covering this in a video I'm releasing in a few weeks. Hopefully it helps!

  • @KalvinJack
    @KalvinJack ปีที่แล้ว

    I’ve had lots of trouble today trying to get this to work I got everything up until linking my beacon device (Apple Watch) I can not find my matching ble address in the terminal and while trying to do it manually I can’t convert the password as it says it’s not covertable, help plz

  • @jamiefl
    @jamiefl ปีที่แล้ว +1

    Using the HA ibeacon on my Android phone, I am having a laggy experience and the distances are not accurate. I am planning on changing the settings up a little and that got me thi king. Is there a way with an automation, that HA can turn on/off the ibeacon based on my GPS location being home/away?

    • @HomeAutomationGuy
      @HomeAutomationGuy  ปีที่แล้ว

      Yes, it can. Check out the HA companion app documentation. It shows you how to craft a notification to the phone that turns it on and off via an automation

  • @lutzmuller5703
    @lutzmuller5703 ปีที่แล้ว

    Kann man das im Video gezeigte noch einmal nachlesen? Und hat sich die Webseite schon wieder geändert? ich kann Seite im Video 4:06 nicht finden!

    • @HomeAutomationGuy
      @HomeAutomationGuy  ปีที่แล้ว +1

      Ich habe es hier gefunden: espresense.com/terminal

    • @HomeAutomationGuy
      @HomeAutomationGuy  ปีที่แล้ว +1

      Entschuldigung - hier: espresense.com/firmware

  • @Nick_1976
    @Nick_1976 ปีที่แล้ว

    Hi, followed your guide to a tee, no matter what I do, my sensor reports as not_home and distance is null. I'm using my Samsung mob to track, checked my ID in the companion app, created the sensor in configuration file but same issue every time. Any help is appreciated. Thanks

    • @paulbacon5056
      @paulbacon5056 11 หลายเดือนก่อน +1

      Same for me. Did you ever get this sorted?

    • @Nick_1976
      @Nick_1976 11 หลายเดือนก่อน

      @paulbacon5056 Yes I did, it took awhile for the sensor to pick up my mob, now I know how long it takes for the sensor to pick up my device. Somewhere around 1min

  • @johanneskauhanen7933
    @johanneskauhanen7933 7 หลายเดือนก่อน

    Why dy we need to copy the Mac adress?

  • @trevsweb
    @trevsweb ปีที่แล้ว

    going to use this to track the locations of my cats using ble tags. the furry lil buggers like finding new hiding spaces and would be cool to track them on a house map

    • @HomeAutomationGuy
      @HomeAutomationGuy  ปีที่แล้ว

      It'll tell you what room the furry lil buggers are in, but not where they're hiding 🤣

  • @jayyovs
    @jayyovs 5 หลายเดือนก่อน

    where can I find my MQTT server and username/pswd?

  • @JBR.1974
    @JBR.1974 หลายเดือนก่อน

    piece of piss......love it...made me spit out my tea

  • @mikekappasig
    @mikekappasig 2 ปีที่แล้ว

    Im having an issue creating my phone as a sensor. Ive got the ESP32 reporting the messages in HA just fine, its online and looks good. When i connect to it and look at the web terminal, i see the beacon ID from my phone and confirmed it in the companion app settings. I created the device by adding the code to the configuration.yaml file, but even after several server and phone restarts, i dont see a new device. any suggestions? This is the yaml for my phone sensor. Android phone, S22 ultra.
    #sensors
    sensor:
    # One entry for each beacon you want to track
    - platform: mqtt_room
    device_id: "iBeacon"
    name: 'Michaels Phone Beacon'
    state_topic: 'espresense/rooms'
    timeout: 5
    away_timeout: 120 # number of seconds after which the enitity will get status not_home
    i cant figure it out, but im sure im missing something simple. Any suggestions?

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      Can you confirm you've only got one sensor: block in your configuration file?

    • @mikekappasig
      @mikekappasig 2 ปีที่แล้ว

      @@HomeAutomationGuy Yea, thats the only one. Its still a pretty new HA install and ive done everything through the GUI to this point, so my configuration.yaml file is almost empty. This was the first sensor, and the first manual addition to the file.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      @@mikekappasig That's very strange. I am not sure what could be causing the problem. Could you try adding a different sensor to the configuration.yaml file (Such as this time and date sensor - www.home-assistant.io/integrations/time_date/) and seeing if that is visible in Home Assistant?

    • @mikekappasig
      @mikekappasig 2 ปีที่แล้ว

      @@HomeAutomationGuy maybe this is user error, just from a lack of experience. Looking at entities now, i see "michaels phone beacon" as a sensor. But i see it 4 times. I created 4 different sensors in my yaml, thinking my device ID was wrong, but then deleted them, saved the config and restarted the server. I think im on the right track now, but something is still a little off. Any idea why it would show up after it was removed from my configuration.yaml? Im going to test some automations to see if it is seeing one of them, but i cant test until i get home this evening.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      ​@@mikekappasig Are you able to click on the entity, and then click the Delete button in the lower left of the modal that pops up?

  • @liminalnetworks7691
    @liminalnetworks7691 2 ปีที่แล้ว

    Great vid!
    Sadly though ESPresence is not reliable with iPhones, even with using the Rooms Assistant app.
    I've also tried Tiles and as well as being super slow, they seem to change their names.
    If anyone knows of a aliexprees credit card style beacon, Id love to hear about it :)

  • @pfurrie
    @pfurrie 2 ปีที่แล้ว

    Interesting, and thanks for the step-by-step... though, your assessment that it "turned out to be a piece of piss" seems fairly inaccurate. You said that and then went into a complicated many-step process to setup the devices and then went over all the caveats and gotchas in the implementation. Yes, you showed how to do it (thanks!) but it was *not* easy.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      It was easier than I thought it was going to be! I thought I'd have to do some soldering

  • @JonatanCastro-secondary
    @JonatanCastro-secondary 2 ปีที่แล้ว

    Based on my experience honestly this doesn't work well at all, at least with iPhone/Apple Watch. Also it can't be integrated on Esphome so I would need to duplicate my esp32 devices where I already have

  • @lewiskelly14
    @lewiskelly14 2 ปีที่แล้ว +4

    Weird intro

  • @connect-r
    @connect-r 2 ปีที่แล้ว

    Ewwwww

  • @joejoe6949
    @joejoe6949 2 ปีที่แล้ว

    The truth is its dam slow and not Accurate.

    • @HomeAutomationGuy
      @HomeAutomationGuy  2 ปีที่แล้ว

      Once I got my settings dialed in, I didnt find it slow or inaccurate at all.