forked from blakeblackshear/frigate-hass-integration
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use debugpy hass integration in devcontainer (blakeblackshear#302)
* Use debugpy hass integration in devcontainer * Add specific_configuration.yaml * Always display reconfigure logs * Fix package and logs debugpy * Fix debugger hanging to connect * Detect when HA debugger is up from logs
- Loading branch information
Showing
9 changed files
with
71 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
debugpy: | ||
|
||
logger: | ||
logs: | ||
homeassistant.components.debugpy: warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#!/bin/bash | ||
|
||
set -euo pipefail | ||
|
||
# This ensures the container is up and, it | ||
# won't do anything if it is already up. | ||
docker compose up --detach hass | ||
|
||
# Use docker logs instead of docker compose logs because the latter | ||
# never exits, even after container is stopped. | ||
container_id=$(docker compose ps hass --quiet) | ||
|
||
# Only get the logs since the last time the container was started, so | ||
# that we don't confuse VS Code's problem matcher. | ||
start_time=$(docker inspect --format '{{.State.StartedAt}}' "${container_id}") | ||
|
||
exec docker logs --follow "${container_id}" --since "${start_time}" |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# Taken from https://stackoverflow.com/a/48646792/12156188 | ||
|
||
set -euo pipefail | ||
|
||
echo -n "Waiting for Home Assistant Debugger to launch on 5678" >&2 | ||
|
||
sleep 5 | ||
echo | ||
|
||
echo "Home Assistant Debugger launched" >&2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters