Bake smartthings-local into the dev Docker image
The dev container was relying on HA's runtime pip-install of manifest.json requirements, which only fires when the integration is set up and needs outbound network access at that exact moment; a container that had been running since before the smartthings-local migration kept the old code loaded in memory and never went through that install path, so restarting it failed once it picked up the new manifest.json. Repurpose the stale MQTT-bridge-era Dockerfile (its own code was already deleted from this repo) to build on the official HA image with smartthings-local pre-installed, and point docker-compose.yml at it via `build: .`. Verified end-to-end: rebuilt the image, recreated the container, and confirmed both live appliances (fridge, dishwasher) reconnect and discover entities with no runtime install needed.
This commit is contained in:
@@ -76,11 +76,13 @@ Entities appear under one HA device per appliance, named `Samsung Appliance (<ip
|
||||
### Docker Compose dev environment
|
||||
|
||||
```sh
|
||||
docker compose up -d
|
||||
docker compose up -d --build
|
||||
docker compose logs -f
|
||||
```
|
||||
|
||||
Runs the official `home-assistant/home-assistant:stable` image with `network_mode: host` (required, since DTLS is UDP and won't traverse Docker's bridge NAT to reach LAN appliances) and `custom_components/localthings/` bind-mounted read-only into `ha_config/custom_components/`. Bump `custom_components.localthings` to `debug` in `ha_config/configuration.yaml` for verbose protocol logging.
|
||||
The `Dockerfile` builds on the official `home-assistant/home-assistant:stable` image and pre-installs `smartthings-local`, so the dependency is present at container start instead of depending on HA's own runtime pip-install step (which needs outbound network access at exactly the moment the integration loads, and repeats on every container recreate). Re-run with `--build` whenever the pinned `smartthings-local` version changes.
|
||||
|
||||
`docker-compose.yml` sets `network_mode: host`, which is required since DTLS is UDP and won't traverse Docker's bridge NAT to reach LAN appliances, and bind-mounts `custom_components/localthings/` read-only into `ha_config/custom_components/`. Bump `custom_components.localthings` to `debug` in `ha_config/configuration.yaml` for verbose protocol logging.
|
||||
|
||||
### Tests
|
||||
|
||||
|
||||
Reference in New Issue
Block a user