How To Setup ESPresence for Room Presence Detection in Home Assistant

Описание к видео How To Setup ESPresence for Room Presence Detection in Home Assistant

In this video we show you how to setup EPresence for room presence detection in Home Assistant to track BLE devices

Home Assistant will then know which rooms people are in, your rules can then check if a room is empty before turning a light off for instance and have different automations for different people in a room

=============================
SUPPORT THE CHANNEL
Donate through Paypal:
https://paypal.me/DavidMcKone
Donate through Buy Me A Coffee:
https://buymeacoffee.com/dmckone
Become a monthly contributor on Patreon:
  / dmckone  
Become a monthly contributor on YouTube:
   / @techtutorialsdavidmckone  
==============================

==============================
MEDIA LINKS:
Website - https://www.techtutorials.tv/
Twitter -   / dsmckone1  
Facebook -   / dsmckone  
Linkedin -   / dmckone  
Instagram -   / david.mckone  
==============================

Useful links:
https://espresense.com/base-stations
https://espresense.com/firmware
https://espresense.com/beacons
https://espresense.com/terminal
https://espresense.com/home_assistant
https://espresense.com/beacons/apple

Steps Taken
1) Requirements
ESPresence requires compatible hardware
Base Stations - https://amzn.to/3JaAnd1
Cables - https://amzn.to/3wqYYCE
Apple Watch - https://amzn.to/3WvKM6j
Xiaomi Mi Band 5 - https://amzn.to/3XQDiM0

NOTE: I am part of the Amazon affiliate program and may earn commission through Amazon website links if used. However, there is no additional cost to the buyer

2) Assumptions
Home Assistant is already configured with the areas the base stations will be placed in

You have the MQTT broker already installed in Home Assistant

Home Assistant has a static IP address, or one reserved in DHCP as the base stations need to connect to this and will store it in their configuration

You can edit the configuration files in Home Assistant using something like File Editor or Studio Code Server

3) Install ESPresence
Plug the ESP device into your Windows computer using a USB cable

Point Google Chrome or Microsoft Edge to the following URL
https://espresense.com/firmware

You should be able to install the firmware from here

TIP: If the device is not detected, check your cable and if needed install the correct drivers

Once installed, enter your Wi-Fi details
TIP: Refresh the browser if this take too long

4) Configure Base Station
Connect to the device, but now click Visit Device to bring up its configuration page

TIP: If the option isn't available, close the window and try to Connect again. Otherwise, try refreshing the browser (Ctrl-F5) or closing it and opening. If this still doesn't work check the device has connected to your network and obtained an IP address

Enter the room name, FQDN or IP address for your MQTT broker/Home Assistant server and also the MQTT login details

Now click Save and then click Restart device

5) Check MQTT Connectivity
Login to Home Assistant and you should see your ESPresence device on the Overview page in the room you configured it to be in

6) Identify Beacon
Check the ESPresence beacons webpage for set up details but typically you will need the device's MAC address. Usually this is found in the About page under Settings of the device

Point Google Chrome or Microsoft Edge to the following URL
https://espresense.com/terminal

From here you should look for a MAC matching your device and then copy the ID that belongs to it

If after some time it does not appear, copy the MAC address into the Known BLE mac address field of the base station, in the Scanning section. The ID should then appear as known:"mac address" once the changes are saved and the base station restarted

7) Configure Home Assistant
Create a file in Home Assistant called mysensors.yaml and paste in details like these

ESPresence One entry for each beacon you want to track
platform: mqtt_room
device_id: "known:a13d6bc8e94f"
name: 'David Fitbit'
state_topic: 'espresense/devices/known:a13d6bc8e94f'
timeout: 10
away_timeout: 120 # number of seconds after which the enitity will get status not_home

Although replace the device_id and state_topic entries with the correct ID as well as a more appropriate name

Edit the configuration.yaml file and add the following line

sensor: !include mysensors.yaml

Now restart Home Assistant and the device should show up in the Sensor section along with the room it is in

NOTE: This room name is in lowercase

Chapters
00:00 Intro
01:16 Requirements
06:56 Assumptions
08:14 Install ESPresence
17:39 Check MQTT Connectivity
19:56 Identify Beacon
25:51 Configure Home Assistant
30:55 Multiple Base Stations
32:38 Fine Tuning
34:55 Bonus Apple Watch

Credits
LoveLife | Instrumental Prod. Blue Mango | EQMUSEQ.COM by Don Da Vinci
https://soundcloud.com/eqmuseq/loveli...

Комментарии

Информация по комментариям в разработке