ESPresense 초기설치 작업 > phone 추기 구성 재실 센서 구성 하기
1) 크롬브라우즈에서 안되면 엣지 브라우즈
2) 케이블 변경
3) 펨웨어 초기 업후 >> wifi 설정되지 않으면 >> 스마트폰에서 espresense 의 wifi 검색 id/password 입력 설정
4) 안드로이드 폰은 home assistant 앱설치후 설정 ble송신기 전원 높음 설정
5) ESPresense 의 노드에 나오면 설정
- HAOS의 IP 주소를 입력 Port: 기본 포트를 사용 중이라면 1883을 그대로 입력
- Click here to edit other settings!
->> 필터링 먼저 설정
FiItering
lnclude only sending these ids to mqtt (eg. apple:iphone10-6 apple:iphone13-2):
iBeacon:
iBeacon:만 넣고 정보 확인
===========================
An ESP32-based presence detection node designed for localized device tracking.
Reasons to use this over other solutions:
- ESP32 nodes are cheaper and easier to use than Raspberry Pis
- Extensive fingerprint-based IDs instead of MAC addresses for tracking or counting devices others can’t
- IRK-based enrollment of Apple devices to passively locate them uniquely, even with private random addresses
- Home Assistant MQTT Discovery for easy HA configuration
- Auto-updates by downloading GitHub-released binaries (optional, with a preference to disable if desired)
- Filters measured distance with both a median pre-filter and a 1Euro filter (reduces jitter for greater accuracy)
- Companion allows for full multilateration
For the best experience, we recommend pairing ESPresense nodes with the ESPresense Companion Docker container/HA Add-on. ESPresense nodes provide distance measurements to nearby devices, and ESPresense Companion aggregates those distances from multiple nodes, using an accurate floor plan to determine each device’s location within your space (multilateration).
While this setup allows for more precise presence detection and triangulation, it requires an accurate floor plan and at least 3 nodes covering each room to work effectively.
If you prefer to stick with the Home Assistant mqtt_room component, it remains supported—though it is less capable and manually configured.
Required
Optional
- Sensors
- =======================
- << 구성 정보 >>

또는
http://192.168.0.103/

상기 구성중 > 검색 필터 조건을 추가 합니다 >>> IBeacon: 만 안드로이드에서는 넣어도 됨

조건에서 다음부분을 복사 메모 합니다 > 본구성으누 haos 앱에서 동일한 블루투스 정보 입니다

구성최종 내용

이메뉴가 나오지 않으면
http://192.168.0.103/
으로 접속 >> 접속이 않되면 휴대폰에서 wifi esprence wifi 검색 으로 접속 wifi ssid password 입력 후 ip로
접속
1) room name

- mqtt 설정은 haos의 ip 로 1883은 기본 id및 암호 ,,,나머지 기본

Filtering
Include only sending these ids to mqtt (eg. apple:iphone10-6 apple:iphone13-2):

iBeacon:
으로 설정하면 다음 네뉴에서 휴대폰 만 나옴>>


에 붙이기 합니다
중요 부분
S:\espresense\config.yaml 수정 하여 재부팅 합니다>> 메뉴 생성 됩니다.
# S:\espresense\config.yaml
# MQTT Connection, if empty will query and use hassio provided mqtt
mqtt:
host: 192.168.0.35
port: 1883
username: mqtt_user
password: mqtt_pass
ble:
scan_interval: 500ms
scan_time: 300ms
floors:
- id: first
name: First Floor
bounds: [[0, 0, 0], [17, 18, 1.5]]
rooms:
- id: entrance
name: Entrance
points: # x, y
- [0, 0]
- [14, 0]
- [14, 13]
- [0, 13]
nodes:
- name: door_esp32
point: [2.0, 1.0, 1.2]
mqtt:
topic: espresense/nodes/door_esp32
# How long before device considered stale
timeout: 30
# How long before device is considered away
away_timeout: 120
optimization:
# enabled: true
enabled: false
interval_secs: 3600
limits:
absorption_min: 2.5
absorption_max: 3.5
tx_ref_rssi_min: -70
tx_ref_rssi_max: -50
rx_adj_rssi_min: -15
rx_adj_rssi_max: 20
weighting:
algorithm: gaussian
props:
sigma: 0.10
devices:
- name: "*" # Track all named devices
- id: "tile:*" # Track all tiles
- id: "irk:*" # Track all IRKs
- id: "watch:*"
- id: "phone:*"
- id: "iBeacon:*"
- id: "iBeacon:430e608d-0ba6-41db-95fd-83d89a5a9fd3-100-40004"
- id: "iBeacon:5305a1ef-cb32-45f4-a4dd-07e1ee03433e-100-40004"
- id: "iBeacon:510216c8-8f1a-4bb8-87bc-4939dde1ba76-100-40004"
filters:
- delayed_on: 200ms
- delayed_off: 800ms
########################################################

공간 map 의 활용은 esp32의 2개 이상 구성에 활용해야 합니다
1개로 블루투스 재실만 구성 합니다
haos에서 센서 구성

# sensor:
- platform: mqtt_room
name: "espresense_door_esp32_9045"
unique_id: espresense_door_esp32_9045
device_id: "iBeacon:430e608d-0ba6-41db-95fd-83d89a5a9fd3-100-40004"
state_topic: "espresense/devices/iBeacon:430e608d-0ba6-41db-95fd-83d89a5a9fd3-100-40004"
timeout: 30
away_timeout: 60
- platform: mqtt_room
name: "espresense_door_esp32_5763"
unique_id: espresense_door_esp32_5763
device_id: "iBeacon:5305a1ef-cb32-45f4-a4dd-07e1ee03433e-100-40004"
state_topic: "espresense/devices/iBeacon:5305a1ef-cb32-45f4-a4dd-07e1ee03433e-100-40004"
timeout: 30
away_timeout: 60
- platform: mqtt_room
name: "espresense_door_esp32_8655"
unique_id: espresense_door_esp32_8655
device_id: "iBeacon:510216c8-8f1a-4bb8-87bc-4939dde1ba76-100-40004"
state_topic: "espresense/devices/iBeacon:510216c8-8f1a-4bb8-87bc-4939dde1ba76-100-40004"
timeout: 30
away_timeout: 60
설명( name 수정 )
########################################################
# sensor:
- platform: mqtt_room
# espresense에서 발행되는 MQTT "room presence" 데이터를 해석하는 플랫폼
name: espresense_ble_9045_esp32_basic
# Home Assistant에 표시되는 센서 이름 (자유 변경 가능, 동작 영향 없음)
unique_id: espresense_ble_9045_esp32_basic
# HA 내부 고유 ID (한번 등록 후 변경 비권장, MQTT 동작과 무관)
device_id: iBeacon:430e608d-0ba6-41db-95fd-83d89a5a9fd3-100-40004
# espresense가 BLE 기기를 식별하는 "절대 키"
# iBeacon:UUID-major-minor 형식
# ❌ 변경 시 mqtt_room 매칭 실패
state_topic: espresense/devices/iBeacon:430e608d-0ba6-41db-95fd-83d89a5a9fd3-100-40004
# espresense가 해당 BLE 기기에 대해 publish 하는 MQTT topic
# device_id와 반드시 1:1로 일치해야 함
# ❌ 변경 시 상태 수신 불가
timeout: 30
# 마지막 MQTT 수신 후 room 상태 유지 시간 (초)
# 이 시간이 지나면 "unknown" 상태로 전환 가능
away_timeout: 60
# 이 시간 동안 수신이 없으면 "not_home" 으로 판정
# 재실/외출 판단의 1차 기준 값
--------------------------------
로 구성
최종 소스
# sensor:
- platform: mqtt_room
name: "espresense_door_esp32_9045"
unique_id: espresense_door_esp32_9045
device_id: "iBeacon:430e608d-0ba6-41db-95fd-83d89a5a9fd3-100-40004"
state_topic: "espresense/devices/iBeacon:430e608d-0ba6-41db-95fd-83d89a5a9fd3-100-40004"
timeout: 30
away_timeout: 60
- platform: mqtt_room
name: "espresense_door_esp32_5763"
unique_id: espresense_door_esp32_5763
device_id: "iBeacon:5305a1ef-cb32-45f4-a4dd-07e1ee03433e-100-40004"
state_topic: "espresense/devices/iBeacon:5305a1ef-cb32-45f4-a4dd-07e1ee03433e-100-40004"
timeout: 30
away_timeout: 60
- platform: mqtt_room
name: "espresense_door_esp32_8655"
unique_id: espresense_door_esp32_8655
device_id: "iBeacon:510216c8-8f1a-4bb8-87bc-4939dde1ba76-100-40004"
state_topic: "espresense/devices/iBeacon:510216c8-8f1a-4bb8-87bc-4939dde1ba76-100-40004"
timeout: 30
away_timeout: 60
다음 구성후 재부팅 해 봅니다binary_sensor:
- platform: template
sensors:
espresense_presence_9045:
device_class: presence
value_template: >
{{ states('sensor.espresense_door_esp32_9045') == 'door_esp32' }}
espresense_presence_5763:
device_class: presence
value_template: >
{{ states('sensor.espresense_door_esp32_5763') == 'door_esp32' }}
espresense_presence_8655:
device_class: presence
value_template: >
{{ states('sensor.espresense_door_esp32_8655') == 'door_esp32' }}
또는 센서 구성을 unique_id 구성 합니다
template:
- binary_sensor:
- name: "espresense_presence_9045"
unique_id: espresense_presence_9045
device_class: presence
state: >
{{ states('sensor.espresense_door_esp32_9045') == 'door_esp32' }}
- name: "espresense_presence_5763"
unique_id: espresense_presence_5763
device_class: presence
state: >
{{ states('sensor.espresense_door_esp32_5763') == 'door_esp32' }}
- name: "espresense_presence_8655"
unique_id: espresense_presence_8655
device_class: presence
state: >
{{ states('sensor.espresense_door_esp32_8655') == 'door_esp32' }}