Installation
Installing the ESPresense Companion is a combination of the Companion App itself and a MQTT server.
Companion deployment:
- Recommended: As an App within Home Assistant OS
- Optional: As a (composed) container elsewhere (experienced users)
MQTT setup:
Home Assistant App
Section titled “Home Assistant App”Two-step Install (Recommended!)
Section titled “Two-step Install (Recommended!)”Step 1: Add Repository
Section titled “Step 1: Add Repository”Click Add in the dialog.
Step 2: Install
Section titled “Step 2: Install”Click Install, Start, then Show in Sidebar.
Manual App Installation
Section titled “Manual App Installation”If the buttons above don’t work for you, follow these steps to add the repository and install the app manually within Home Assistant:
- Navigate to Apps: Go to
Settings>Appsin your Home Assistant UI. - Add Repository:
- Click the
Apps Storebutton (usually bottom right). - Click the three dots menu in the top right corner and select
Repositories. - Paste the following URL into the “Add repository” field:
https://github.com/ESPresense/hassio-addons
- Click
Add. - Close the repository management dialog.
- Click the
- Install ESPresense Companion:
- Refresh the Apps Store page (you might need to wait a moment or refresh your browser).
- Search for
ESPresense Companion. - Click on the
ESPresense Companionapp. - Click
Install. - Once installed, click
Start. - Optionally, enable
Show in sidebarfor easy access.
Containerized Deployment
Section titled “Containerized Deployment”Example docker-compose configuration:
services: espresense: image: espresense/espresense-companion ports: - 8267:8267 - 8268:8268 volumes: - ./data/espresense:/config/espresensePort 8268 is required for firmware updates.
MQTT Setup
Section titled “MQTT Setup”ESPresense and ESPresense Companion require MQTT to function. Here’s two ways to set it up:
Home Assistant MQTT App
Section titled “Home Assistant MQTT App”- Install the Mosquitto broker app from the official app store
- Start the app
- ESPresense Companion will automatically use these settings
External MQTT Broker
Section titled “External MQTT Broker”- Install Mosquitto or your preferred MQTT broker
- Note your configuration:
- Host
- Port (default 1883)
- Username
- Password
- You’ll need these details for the configuration step
MQTT Discovery
Section titled “MQTT Discovery”- Enable MQTT Discovery (“auto-discovered”) in your MQTT configuration
- If disabled, you’ll need to manually configure MQTT settings in the Companion’s MQTT tab
Node Configuration
Section titled “Node Configuration”After installation, configure your ESPresense nodes by setting maximum distance to zero. To modify the maximum distance, send an MQTT message (in Home Assistant, Settings->MQtt->Configure, “Publish a packet”?) :
key: espresense/rooms/*/max_distance/setvalue: 0This ensures you get all distance readings without filtering.
Next Steps
Section titled “Next Steps”Once installation is complete:
- Move on to Configuration to set up your floor plan
- Place your nodes according to the Node Placement Guide
- Start tracking your devices!
Troubleshooting Installation
Section titled “Troubleshooting Installation”Common Issues:
Section titled “Common Issues:”-
Can’t see the app in Home Assistant:
- Refresh your browser
- Verify the repository was added successfully
- Check the app store logs
-
MQTT Connection Failed:
- Verify MQTT broker is running
- Check credentials are correct
- Ensure MQTT port (1883) is not blocked
-
Docker Container Won’t Start:
- Check port 8267 is not in use
- Verify volume mount permissions
- Review container logs