Approaches
Approach 1: mqtt_room (Simple Room Presence)
Section titled “Approach 1: mqtt_room (Simple Room Presence)”Best for: Room-based automations like “turn on kitchen lights when I enter”
| mqtt_room | |
|---|---|
| Question Answered | ”Which room is my device in?” |
| Output | Room name (e.g., “kitchen”) |
| Nodes Needed | 1 per room |
| Setup | Simple |
Your device connects to the single nearest ESPresense node. The node’s configured room name is reported to Home Assistant.
Phone → "I'm 2m from Living Room node" → HA sees "Phone is in Living Room"Requirements:
- Place one node per room where you want detection
- Each node = one room in your automation
- No floor plan required
When to use: Turning lights on/off per room, playing announcements, basic presence detection. Start here if you’re new.
Approach 2: Companion (Precise Positioning)
Section titled “Approach 2: Companion (Precise Positioning)”Best for: Precise location tracking like “find my phone on the floor plan”
| Companion | |
|---|---|
| Question Answered | ”Where exactly is my device on the floor?” |
| Output | X,Y coordinates on floor plan |
| Nodes Needed | 5-8 per floor |
| Setup | More complex |
Multiple nodes measure distance to your device simultaneously. Using multilateration, Companion calculates precise coordinates.
Phone → 3m from Node A, 5m from Node B, 4m from Node C → Companion: Phone is at (X,Y)Additional requirements:
- 5-8 nodes per floor (depending on square footage)
- Perimeter nodes help most - provide strongest positioning
- Avoid collinearity - don’t place nodes in straight lines
- Requires accurate floor plan
- Obstacles (walls, furniture) drastically affect accuracy
When to use: Finding exact location on a floor plan, tracking movement paths, room-level presence isn’t enough.