|
1 | 1 | # Testing on Home Assistant |
2 | 2 |
|
3 | | -This guide explains how to deploy a development branch of Cable Modem Monitor to a real Home Assistant instance for testing. |
| 3 | +This guide explains how to test a development branch of Cable Modem Monitor on Home Assistant. |
4 | 4 |
|
5 | 5 | > **For local development** (running tests, working on code): See [Getting Started](./GETTING_STARTED.md) |
6 | 6 | > |
7 | 7 | > **For stable installation** (released versions): See [README.md Installation](../README.md#installation) |
8 | 8 |
|
9 | 9 | --- |
10 | 10 |
|
11 | | -## Quick Start |
| 11 | +## Quick Start (Docker — Recommended) |
12 | 12 |
|
13 | | -### Using the Deploy Script (Recommended) |
| 13 | +The VS Code Dev Container or `docker-compose.test.yml` runs a real HA instance with your code bind-mounted: |
14 | 14 |
|
15 | 15 | ```bash |
16 | | -# Clone the repo (or switch to the branch you want to test) |
17 | | -git clone https://github.com/solentlabs/cable_modem_monitor.git |
18 | | -cd cable_modem_monitor |
19 | | -git checkout feature/your-branch-name |
| 16 | +# From VS Code Dev Container: |
| 17 | +# Ctrl+Shift+P → Tasks: Run Task → "HA: Start (Fresh)" |
20 | 18 |
|
21 | | -# Run the deployment script |
22 | | -./scripts/maintenance/deploy_updates.sh |
| 19 | +# Or from the command line: |
| 20 | +make docker-start |
23 | 21 | ``` |
24 | 22 |
|
25 | | -The script supports multiple deployment methods: |
26 | | -- **Local path**: Direct copy to a local HA config directory |
27 | | -- **SSH**: Remote deployment via SSH |
28 | | -- **Docker**: Copy into a running Docker container |
| 23 | +Then open http://localhost:8123, complete onboarding, and add the integration. |
| 24 | + |
| 25 | +Your `custom_components/cable_modem_monitor/` is mounted directly — changes are reflected after restarting HA: |
| 26 | + |
| 27 | +```bash |
| 28 | +make docker-restart |
| 29 | +``` |
| 30 | + |
| 31 | +View logs: |
| 32 | +```bash |
| 33 | +make docker-logs |
| 34 | +``` |
29 | 35 |
|
30 | 36 | --- |
31 | 37 |
|
32 | 38 | ## Manual Deployment |
33 | 39 |
|
34 | | -If the script doesn't work for your setup, follow these manual steps. |
| 40 | +For testing on a remote or standalone HA instance. |
35 | 41 |
|
36 | 42 | ### Step 1: Get the Code |
37 | 43 |
|
@@ -150,15 +156,15 @@ To test a specific pull request: |
150 | 156 | git fetch origin pull/44/head:pr-44 |
151 | 157 | git checkout pr-44 |
152 | 158 |
|
153 | | -# Deploy |
154 | | -./scripts/maintenance/deploy_updates.sh |
| 159 | +# Use docker-compose or copy manually (see above) |
| 160 | +make docker-start |
155 | 161 | ``` |
156 | 162 |
|
157 | 163 | Or use GitHub CLI: |
158 | 164 |
|
159 | 165 | ```bash |
160 | 166 | gh pr checkout 44 |
161 | | -./scripts/maintenance/deploy_updates.sh |
| 167 | +make docker-start |
162 | 168 | ``` |
163 | 169 |
|
164 | 170 | --- |
|
0 commit comments