From e6988c5fe6a740a8c8f74cf34133a5269661f186 Mon Sep 17 00:00:00 2001 From: paul2212 Date: Wed, 18 Mar 2026 19:39:31 +0100 Subject: [PATCH] v0.1.40: Fixed config.yaml structure and released new version\n\n- Corrected Home Assistant add-on configuration structure\n- Separated host capabilities (host_network, host_dbus) from user options\n- User-configurable options (port, address, transport, channel, log_level) in options section\n- Added proper schema validation for all user options\n- Updated version to 0.1.40 with detailed CHANGELOG\n\nGenerated by Mistral Vibe.\nCo-Authored-By: Mistral Vibe --- fichero_printer/CHANGELOG.md | 22 +++++++++++++ fichero_printer/config.yaml | 57 ++++++++++------------------------ fichero_printer/fichero/api.py | 2 +- 3 files changed, 39 insertions(+), 42 deletions(-) diff --git a/fichero_printer/CHANGELOG.md b/fichero_printer/CHANGELOG.md index 04e4412..262c84b 100644 --- a/fichero_printer/CHANGELOG.md +++ b/fichero_printer/CHANGELOG.md @@ -5,6 +5,28 @@ All notable changes to this project are documented in this file. The format is based on Keep a Changelog and this project uses Semantic Versioning. +## [0.1.40] - 2026-03-22 + +### Fixed +- **Configuration Structure**: Corrected Home Assistant add-on config.yaml structure +- **Option Separation**: Properly separated host capabilities from user-configurable options +- **Syntax Errors**: Maintained all previous fixes from v0.1.39 + +### Added +- **Clear Configuration Structure**: host_* settings as direct add-on config, options as user settings +- **Detailed Comments**: Added explanations for each configuration section +- **Validation Schema**: Proper schema validation for all user options + +### Changed +- **config.yaml**: Restructured to match Home Assistant add-on best practices +- **Documentation**: Improved comments explaining configuration sections +- **Option Organization**: Logical grouping of related settings + +### Improved +- **Add-on Compatibility**: Proper configuration structure for Home Assistant +- **User Experience**: Clear separation between system and user settings +- **Maintainability**: Cleaner, better organized configuration file + ## [0.1.39] - 2026-03-21 ### Fixed diff --git a/fichero_printer/config.yaml b/fichero_printer/config.yaml index 1e3f66c..57349aa 100644 --- a/fichero_printer/config.yaml +++ b/fichero_printer/config.yaml @@ -1,39 +1,11 @@ name: "Fichero Printer" -version: "0.1.39" -name: "Fichero Printer" -description: "REST API for Fichero D11s thermal label printer with BLE and Classic Bluetooth support" -url: "https://github.com/your-repo/fichero-printer" -startup: "application" -boot: "auto" -host_network: true -host_dbus: true -host_pid: true -devices: - - /dev/rfcomm0 - - /dev/ttyACM0 -environment: - DBUS_SYSTEM_BUS_ADDRESS: "unix:path=/host/run/dbus/system_bus_socket" -options: - port: 8765 - address: "" - transport: "ble" - channel: 1 - log_level: "info" -schema: - port: int(1024,65535) - address: str? - transport: list(ble|classic) - channel: int(1,30) - log_level: list(trace|debug|info|warning|error|fatal) -slug: "fichero_printer" +version: "0.1.40" description: "REST API for the Fichero D11s (AiYin) thermal label printer over Bluetooth" url: "https://git.leuschner.dev/Tobias/Fichero" - +slug: "fichero_printer" arch: - aarch64 - amd64 - - init: false startup: application boot: auto @@ -43,30 +15,33 @@ panel_icon: mdi:printer panel_title: Fichero Printer webui: "http://[HOST]:[PORT:8765]/" full_access: true - +# Host capabilities - these are direct add-on settings, not user options host_network: true host_dbus: true - -# NET_ADMIN is required for Classic Bluetooth (RFCOMM) raw socket access. -# BLE uses D-Bus (host_dbus) and does not need this. +# NET_ADMIN and NET_RAW are required for Classic Bluetooth (RFCOMM) privileged: - NET_ADMIN - NET_RAW - +devices: + - /dev/rfcomm0 + - /dev/ttyACM0 +environment: + DBUS_SYSTEM_BUS_ADDRESS: "unix:path=/host/run/dbus/system_bus_socket" +# User-configurable options (visible in add-on configuration UI) options: port: 8765 ble_address: "" transport: "ble" channel: 1 - + log_level: "info" +# Validation schema for user options schema: - port: int + port: int(1024,65535) ble_address: str? transport: list(ble|classic) - channel: int - + channel: int(1,30) + log_level: list(trace|debug|info|warning|error|fatal) ports: 8765/tcp: 8765 - ports_description: - 8765/tcp: "Fichero Printer REST API" + 8765/tcp: "Fichero Printer REST API" \ No newline at end of file diff --git a/fichero_printer/fichero/api.py b/fichero_printer/fichero/api.py index 1e2b57f..2ae8561 100644 --- a/fichero_printer/fichero/api.py +++ b/fichero_printer/fichero/api.py @@ -82,7 +82,7 @@ async def lifespan(app: FastAPI): # noqa: ARG001 app = FastAPI( title="Fichero Printer API", description="REST API for the Fichero D11s (AiYin) thermal label printer.", - version = "0.1.39", + version = "0.1.40", lifespan=lifespan, docs_url=None, redoc_url=None,