Skip to content

Commit 3f7daa3

Browse files
committed
Massive improvements in docs
1 parent 9283138 commit 3f7daa3

File tree

5 files changed

+432
-93
lines changed

5 files changed

+432
-93
lines changed

companion/companion.md

Lines changed: 16 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -2,83 +2,27 @@
22
layout: page
33
title: Companion
44
permalink: /companion
5-
nav_order: 99
65
---
76

87
# Companion
98

10-
ESPresense Companion attempts to locate your Bluetooth Low Energy (BLE) items in the floorplan of your house. It also allows you to manage ESPresense nodes and settings.
9+
![GitHub release (latest by date)](https://img.shields.io/github/v/release/ESPresense/ESPresense-companion)
10+
![Docker Pulls](https://badgen.net/docker/pulls/espresense/espresense-companion)
1111

12-
## How to Use
12+
The ESPresense-companion attempts to locate your Bluetooth Low Energy (BLE) items in the floorplan of your house. It also allows you to manage ESPresense nodes.
1313

14-
ESPresense Companion provides a visual representation of your devices' locations within your house and helps troubleshoot ESPresense settings to improve automation trigger accuracy.
14+
![image](https://user-images.githubusercontent.com/1491145/208942192-d8716e50-c822-48a7-a6d3-46b53ab9373e.png)
1515

16-
The more accurate your house plan and the more base stations you include, the higher the location accuracy will be.
16+
## Quick Start
17+
1. [Install ESPresense Companion](/companion/installation)
18+
2. [Configure your floorplan](/companion/configuration)
19+
3. Place nodes at room corners plus one nearby (1-3m)
20+
4. Set node maximum distance to zero using:
21+
```markdown
22+
key: espresense/rooms/*/max_distance/set
23+
value: 0
24+
```
25+
5. Fine tune by hovering over devices and adjusting RSS@1m values
1726

18-
### Find Your Home's GPS Coordinates
19-
You can easily find coordinates using Google Maps or Google Earth:
20-
- Google Maps: Search for your address and click on the street in front of your house to get latitude and longitude
21-
- Google Earth: Search for your address and hover your mouse over your house - coordinates and elevation will display in the bottom right
22-
23-
### Draw Out Your House
24-
You'll need accurate interior dimensions for best results. There are several options:
25-
1. Create a free home plan using [MagicPlan](https://www.magicplan.app/)
26-
2. Use the [ESPresense Floorplan Creator](https://espresense.com/Floorplan-Creator/) to convert your measurements into YAML format
27-
3. Directly edit the YAML coordinates in the config file - the website will update in real-time thanks to hot reloading, allowing you to fine-tune your floorplan live
28-
29-
After using any of these methods, you'll want to save your YAML configuration. If using the Floorplan Creator, click "Convert to YAML Code" and save the generated code.
30-
31-
### Setup MQTT
32-
ESPresense and ESPresense Companion require MQTT to function. If you haven't set up MQTT yet:
33-
1. Install and configure [Mosquitto](https://mosquitto.org/)
34-
2. Note your MQTT host, port (default 1883), username, and password
35-
3. If using Home Assistant's MQTT addon, Companion will use those settings automatically
36-
4. Ensure MQTT Discovery is enabled ("auto-discovered") or you'll need to manually configure MQTT settings
37-
38-
### Install ESPresense Companion
39-
1. Add this repository to your Home Assistant add-on store: `https://github.com/ESPresense/hassio-addons`
40-
2. Reload the add-on store
41-
3. Find and install ESPresense Companion
42-
4. Don't start the add-on yet - configure it first
43-
44-
### Edit Config File
45-
Navigate to `/config/espresense/config.yaml` and configure:
46-
47-
MQTT Connection:
48-
- For Home Assistant's MQTT addon: Only username and password needed
49-
- For external MQTT: Include host and port
50-
- Set SSL to false
51-
52-
GPS Settings:
53-
- Enter latitude and longitude in decimal format
54-
- Enter elevation in meters
55-
56-
Floor Configuration:
57-
- Set ID and name as desired
58-
- Bounds: First three numbers are left/bottom starting points, second three are top/right endpoints
59-
- These bounds center your diagram
60-
61-
Rooms:
62-
- Paste the YAML from the floorplan creator
63-
64-
Nodes:
65-
- List each base station's approximate location
66-
- Each node needs a unique name
67-
- Multiple nodes can be mapped to one room
68-
69-
Devices:
70-
```yaml
71-
- id: darrels-watch
72-
name: "Darrell's Watch"
73-
```
74-
75-
Use wildcards to include multiple devices:
76-
```yaml
77-
- id: "tile:*" # Track all tiles
78-
- id: "irk:*" # Track all IRKs
79-
- id: "apple:*" # Track all Apple devices
80-
- id: "ibeacon:*" # Track all iBeacon devices
81-
- name: "*" # Track all named devices
82-
```
83-
84-
## Help write this documentation! Click the edit this page below.
27+
## Need Help?
28+
Check our [Troubleshooting Guide](/companion/troubleshooting) or contribute to this documentation by clicking "Edit this page" below.

companion/configuration.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
layout: page
3+
title: Configuration
4+
parent: Companion
5+
nav_order: 2
6+
---
7+
8+
# Configuration
9+
10+
## GPS Coordinates
11+
Find your home's coordinates:
12+
- **Google Maps**: Search your address and click the street in front of your house
13+
- **Google Earth**: Search your address and hover over your house - coordinates and elevation show in bottom right
14+
15+
## Room Measurement Guide
16+
17+
Start at the **bottom left corner** of your building/area - this serves as the **origin (0,0)**. All measurements are taken from this south-west corner. When plotting, use either clockwise or counter-clockwise direction consistently.
18+
19+
Example measurements (clockwise):
20+
21+
### Room 1
22+
1. Start point: `(0,0)`
23+
2. North wall: `(3,0)` (9 feet/3 meters)
24+
3. East wall: `(3,4)` (12 feet/4 meters)
25+
4. South wall: `(0,4)`
26+
27+
### Room 2
28+
1. Start point: `(3,0)`
29+
2. Width: `(5,0)` (6 feet/2 meters)
30+
3. Depth: `(5,3.5)` (10.5 feet/3.5 meters)
31+
4. Final corner: `(3,3.5)`
32+
33+
## Creating Your Floorplan
34+
35+
There are three ways to create your floorplan:
36+
1. Use [MagicPlan](https://www.magicplan.app/) to create a free home plan
37+
2. Use the [ESPresense Floorplan Creator](https://espresense.com/Floorplan-Creator/) to convert measurements to YAML
38+
3. Directly edit the YAML coordinates in the config file - changes update live thanks to hot reloading
39+
40+
## Node Placement
41+
42+
For optimal device location accuracy:
43+
- Place base station nodes at the corners of your floorplan
44+
- Add an additional node within 1-3 meters
45+
- Aim for 5 fixes minimum - more fixes improve accuracy
46+
- The algorithm prioritizes closest distances (40% weight using gaussian distribution)
47+
48+
## Configuration File
49+
50+
Navigate to `/config/espresense/config.yaml` and configure:
51+
52+
### MQTT Connection
53+
```yaml
54+
# For Home Assistant's MQTT addon
55+
mqtt:
56+
username: your_username
57+
password: your_password
58+
ssl: false
59+
60+
# For external MQTT, also include:
61+
host: your_host
62+
port: 1883
63+
```
64+
65+
### GPS Settings
66+
```yaml
67+
gps:
68+
latitude: your_decimal_latitude
69+
longitude: your_decimal_longitude
70+
elevation: your_elevation_in_meters
71+
```
72+
73+
### Floor Configuration
74+
```yaml
75+
floors:
76+
- id: ground
77+
name: Ground Floor
78+
bounds: [left, bottom, z, right, top, z] # Centers your diagram
79+
```
80+
81+
### Rooms
82+
```yaml
83+
# Paste output from floorplan creator or measure manually
84+
rooms:
85+
- id: living-room
86+
name: Living Room
87+
floor: ground
88+
points: [[0,0], [3,0], [3,4], [0,4]]
89+
```
90+
91+
### Nodes
92+
```yaml
93+
nodes:
94+
- id: esp32-1
95+
name: Living Room Node
96+
room: living-room
97+
coords: [2,2,1] # x,y,z coordinates within room
98+
```
99+
Note: Multiple nodes can be mapped to one room, but each needs a unique name.
100+
101+
### Devices
102+
```yaml
103+
devices:
104+
# Specific device
105+
- id: darrels-watch
106+
name: "Darrell's Watch"
107+
108+
# Using wildcards
109+
- id: "tile:*" # Track all tiles
110+
- id: "irk:*" # Track all IRKs
111+
- id: "apple:*" # Track all Apple devices
112+
- id: "ibeacon:*" # Track all iBeacon devices
113+
- name: "*" # Track all named devices
114+
```
115+
116+
## Live Updates
117+
118+
The configuration file supports hot reloading, which means:
119+
- Changes to the config file update in real-time
120+
- You can adjust room coordinates and see immediate results
121+
- Fine-tune node positions while watching the effects live
122+
- No need to restart the companion after changes
123+
124+
## Help write this documentation! Click the edit this page below.

companion/installation.md

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
---
2+
layout: page
3+
title: Installation
4+
parent: Companion
5+
nav_order: 1
6+
---
7+
8+
# Installation
9+
10+
## Home Assistant OS (HAOS)
11+
12+
### Step 1: Add Repository
13+
<div style="display: flex; align-items: center; gap: 10px; margin-bottom: 20px;">
14+
<a href="https://my.home-assistant.io/redirect/supervisor_add_addon_repository/?repository_url=https%3A%2F%2Fgithub.com%2FESPresense%2Fhassio-addons">
15+
<img src="https://my.home-assistant.io/badges/supervisor_add_addon_repository.svg" alt="Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled." />
16+
</a>
17+
<span>Click <code>Add</code></span>
18+
</div>
19+
20+
### Step 2: Install
21+
<div style="display: flex; align-items: center; gap: 10px;">
22+
<a href="https://my.home-assistant.io/redirect/supervisor_store/">
23+
<img src="https://my.home-assistant.io/badges/supervisor_store.svg" alt="Open your Home Assistant instance and show the Supervisor add-on store." />
24+
</a>
25+
<span>Click <code>Install</code>, <code>Start</code>, then <code>Show in Sidebar</code></span>
26+
</div>
27+
28+
## Home Assistant Container
29+
30+
Example docker-compose configuration:
31+
```yaml
32+
version: '3.7'
33+
services:
34+
espresense:
35+
image: espresense/espresense-companion
36+
ports:
37+
- 8267:8267
38+
volumes:
39+
- ./data/espresense:/config/espresense
40+
```
41+
42+
## MQTT Setup
43+
44+
ESPresense and ESPresense Companion require MQTT to function. Here's how to set it up:
45+
46+
### Using Home Assistant's MQTT Addon
47+
1. Install the Mosquitto broker addon from the official add-on store
48+
2. Start the addon
49+
3. ESPresense Companion will automatically use these settings
50+
51+
### Using External MQTT Broker
52+
1. Install [Mosquitto](https://mosquitto.org/) or your preferred MQTT broker
53+
2. Note your configuration:
54+
- Host
55+
- Port (default 1883)
56+
- Username
57+
- Password
58+
3. You'll need these details for the configuration step
59+
60+
### MQTT Discovery
61+
- Enable MQTT Discovery ("auto-discovered") in your MQTT configuration
62+
- If disabled, you'll need to manually configure MQTT settings in the Companion's MQTT tab
63+
64+
### Node Configuration
65+
After installation, configure your ESPresense nodes by setting maximum distance to zero:
66+
```markdown
67+
key: espresense/rooms/*/max_distance/set
68+
value: 0
69+
```
70+
This ensures you get all distance readings without filtering.
71+
72+
## Next Steps
73+
74+
Once installation is complete:
75+
1. Move on to [Configuration](/companion/configuration) to set up your floorplan
76+
2. Place your nodes according to the [Node Placement Guide](/companion/configuration#node-placement--configuration)
77+
3. Start tracking your devices!
78+
79+
## Troubleshooting Installation
80+
81+
### Common Issues:
82+
1. **Can't see the add-on in Home Assistant:**
83+
- Refresh your browser
84+
- Verify the repository was added successfully
85+
- Check the add-on store logs
86+
87+
2. **MQTT Connection Failed:**
88+
- Verify MQTT broker is running
89+
- Check credentials are correct
90+
- Ensure MQTT port (1883) is not blocked
91+
92+
3. **Docker Container Won't Start:**
93+
- Check port 8267 is not in use
94+
- Verify volume mount permissions
95+
- Review container logs

0 commit comments

Comments
 (0)