Repository navigation
Releases
Releases · cryptedx/ha-usbip-client
v1.0.8
Changed
- Restart only the affected app: Entries in
dependent_appsaccept an optionaldeviceslist with the names of the devices an app uses. After a reattach, such an app restarts only if one of those devices came back. Apps without the list still restart after every reattach. So do apps whose list names an unknown device, and the log then shows a warning. - The WebUI keeps the
deviceslist when saving or changing the dependent app selection. It does not edit the list; set it in the app options.
v1.0.6
[1.0.6] - 2026-07-07
Fixed
- Empty manifest recovery: Rebuild the USB/IP device manifest from configured devices when the monitor finds it empty, so recovered USB/IP servers can reattach devices and restart dependent apps without requiring a manual app restart.
v1.0.5
[1.0.5] - 2026-07-07
Added
- Post-reattach HTTP actions: Added optional
post_reattach_actionsso a successful USB/IP device recovery can trigger shortGETorPOSTHTTP calls, such as a Bitfocus Companion surface rescan, without restarting the dependent app. - WebUI post-reattach actions: Added a Configuration-tab editor for
post_reattach_actions.
v1.0.4
[1.0.4] - 2026-07-06
Fixed
- Dependent app restart timeout: Allow Supervisor restart requests more time to respond so slow but successful dependent app restarts are not reported as failed.
v1.0.1
[1.0.1] - 2026-04-18
Fixed
- Docker base image: Migrated base image declaration from deprecated
build.yamlintoDockerfiledirectly. Fixesbase name (${BUILD_FROM}) should not be blankbuild error when installing the app through Home Assistant Supervisor.
Changed
- WebUI direct host port: Added a Configuration-tab control for the direct WebUI host port. It updates Home Assistant's host-port mapping for
8099/tcp, while leaving Ingress on the internal app port. Leave the field blank or set it to0to disable direct host access. - WebUI host access: Direct browser access is now opt-in through explicit Home Assistant port mapping. The default manifest no longer claims host port 8099, which avoids collisions with other apps.
v1.0.1-beta.3
[1.0.1-beta.3] - 2026-04-14
Fixed
- Docker base image: Migrated base image declaration from deprecated
build.yamlintoDockerfiledirectly. Fixesbase name (${BUILD_FROM}) should not be blankbuild error when installing the app through Home Assistant Supervisor.
Changed
- WebUI direct host port: Added a Configuration-tab control for the direct WebUI host port. It updates Home Assistant's host-port mapping for
8099/tcp, while leaving Ingress on the internal app port. Leave the field blank or set it to0to disable direct host access.
v0.5.2-beta.6
[0.5.2-beta.6] - 2026-02-19
Changed
- Refactor: monitor retry logic: Deduplicated identical restart-retry loops in
monitor.pyinto a single_retry_restart()helper; addedclear_app_health_state()export for test isolation. - Refactor: server collection: Centralized USB/IP server discovery into
get_unique_servers()inconfig.py; used ininit_devices.pyand WebUI health checker, replacing scattered manual loops. - Refactor: WebUI attach/detach: Routed
api_attach()andapi_detach()throughusbip_liblibrary functions (attach_device,detach_device,is_device_id,resolve_device_id_to_bus_id) instead of direct subprocess calls. - Refactor: constants: Moved
HEALTH_INTERVAL_SECONDSand all flapping thresholds (COOLDOWN_SECONDS,FLAP_WINDOW_SECONDS,FLAP_WARNING_THRESHOLD,FLAP_CRITICAL_THRESHOLD,FLAP_CLEAR_STABLE_SECONDS) toconstants.py; removed local redefinitions inmonitor.pyandapp.py. - Refactor: logging init: Standardized
detach_devices.pyandservices.d/webui/runto usesetup_logging()fromusbip_lib.logging_setup. - Refactor: normalization: Removed redundant
normalize_notification_config()andnormalize_dependent_apps_config()calls fromsend_ha_notification(),api_config_get(), andapi_app_health(); normalization already occurs atget_app_config()read time. - Refactor: relative imports: Fixed
latency_history.pyto use package-relative imports (from .constants,from .events).
Removed
- Dead code: Removed
write_device_details_file()and its associatedDEVICE_DETAILS_FILEconstant from the public API; the legacy pipe-delimited details file is no longer written.
v0.5.2-beta.3
[0.5.2-beta.3] - 2026-02-17
Changed
- Security Defaults: Enabled AppArmor by default and aligned the profile with actual addon runtime paths and Python services.
- Privilege Hardening: Removed
full_accessand switched to explicit USB/device mappings (usbplus/dev/vhci) with required capabilities only. - API Permissions: Enabled
homeassistant_apiso notification calls to/core/apiare authorized and Supervisor permission warnings are reduced. - Service Resilience: Updated usbip finish handling to prefer automatic s6 restart behavior instead of halting the full container on transient usbip failures.
- WebUI (Ingress compatibility): Themed custom scrollbar; added internal scroll container so Home Assistant Ingress shows the add-on scrollbar; added cache-busting for
style.css; removed debug marker; updated related tests. - Config UX: Added a two-step confirmation restart action in the Config tab (
↻ RESTART APP) to apply saved settings.
Fixed
- Notification Settings Persistence: Config save now verifies notification preferences (
notifications_enabled,notification_types) were actually persisted and returns a clear API/UI error when Supervisor rejects schema fields.
Added
- Dashboard Diagnostics: Added a compact first-run diagnostics panel in the WebUI Dashboard (module loaded, usbip availability, server reachability, discoverable devices).
- Actionable API Errors: Improved USB/IP attach/detach error messages with user-facing guidance for common causes (network, timeout, missing device, permissions).
- Restart API Endpoint: Added
POST /api/system/restartto trigger add-on restart via Supervisor, including integration tests for success and failure paths.
v0.5.1-beta.1
[0.5.1-beta.1] - 2026-02-14
Added
- Pre-commit Quality Gates: Added repository-wide pre-commit hooks for linting, formatting, secret scanning, markdown checks, and full test execution.
- Version Consistency Check: Added
scripts/check_version_consistency.pyto ensure release version alignment acrossconfig.yaml,repository.yaml, and WebUI version metadata. - Developer Workflow Documentation: Added explicit pre-commit setup and usage guidance in
DEVELOPER.md.
Changed
- GitHub Release Notes Workflow: Release notes are now extracted from the matching section in
CHANGELOG.mdand published directly in GitHub Releases. - Dev Tooling: Updated
requirements-dev.txtwith current versions ofpytest,pytest-mock,pytest-cov,pre-commit,ruff, andyamllint. - Lint/Format Baseline: Applied Ruff-driven formatting and minor lint fixes in tests and Python modules to make full-repository checks pass.
Fixed
- Release Notes Quality: Prevented empty auto-generated release descriptions by enforcing changelog-backed release bodies.
v0.5.0-beta
Added
- USB Device Monitoring: Continuous monitoring of attached USB devices with automatic reattachment on failure.
- Configurable
monitor_interval(10-300s, default 30s) for health check frequency. - Configurable
reattach_retries(0-10, default 3) for device reattachment attempts. - Cooldown period (5 minutes) between failure notifications to prevent spam.
- Home Assistant notifications on device loss and recovery.
- Configurable
- Dependent Add-on Health Monitoring: Monitors health of dependent add-ons and restarts them if they enter error state.
- Configurable
dependent_addonslist withnameandslugfor each add-on. - Configurable
restart_retries(0-10, default 3) for add-on restart attempts. - Automatic restart of failed add-ons (e.g., Zigbee2MQTT, Z-Wave JS) with notifications.
- State change tracking to avoid repeated alerts for ongoing issues.
- Configurable
- Enhanced Monitor Service: New s6 service (
monitor/run) for background device and add-on health monitoring.- Runs every
monitor_intervalseconds, checking device attachment and add-on states. - Integrates with existing event logging and notification systems.
- Runs every
- Improved Error Handling: Better handling of Supervisor API errors and device attachment failures.
- Test Coverage: Increased test coverage to 93% (from 88%) with additional unit tests for error paths.
Changed
- Version Bump: Updated to 0.5.0-beta to reflect new monitoring capabilities.
- README Updates: Added documentation for new configuration options and features.
- Monitor Integration: WebUI now displays dependent add-on health status and allows selection from discovered add-ons.
Fixed
- Dependent Add-on Restart: Fixed issue where add-ons in error state were not automatically restarted. Now properly detects error states and attempts restart with retry logic.
Summary of fixes
| Severity | Count | Key points |
|---|---|---|
| Critical | 2 | Duplicate test class (duplicate tests removed); SIGTERM was swallowed (services now correctly handle SIGTERM) |
| High | 4 | Missing API authentication; version inconsistency between components; monitor module not unit-testable; misconfigured CORS* |
| Medium | 10 | Fixed log de-duplication bug; various race conditions resolved; added missing tests; removed unnecessary Linux capabilities |
| Low | 8+ | Style fixes, updated outdated documentation, cleaned import patterns, removed extraneous emojis |
*Note: The CORS fix restricts the allowed origins for the WebUI to safe values (e.g., localhost/ingress) and prevents unintended cross-origin requests.