Skip to content

dax66 fix#6

Open
RustyBower wants to merge 158 commits into
rsnodgrass:masterfrom
RustyBower:master
Open

dax66 fix#6
RustyBower wants to merge 158 commits into
rsnodgrass:masterfrom
RustyBower:master

Conversation

@RustyBower
Copy link
Copy Markdown

This should fix dax66 integrations, specially around the zone status issues.

When the TCP socket to a serial-to-IP adapter drops, the protocol now
detects the disconnection and automatically reconnects with exponential
backoff (5s to 60s). This eliminates the need to restart the HA
integration after transient network or adapter failures.
@mesa-dot-dev
Copy link
Copy Markdown

mesa-dot-dev Bot commented Apr 23, 2026

Mesa Description

TL;DR

Major refactor and modernization of the pyxantech library to standardize amplifier control protocols, expand device support across multiple brands (including a fix for DAX66 zone status issues), and significantly enhance development tooling and CI/CD pipelines.

What changed?

  • Core Library Refactoring:
    • pyxantech/__init__.py: Modernized syntax, enhanced serial communication robustness, improved protocol flexibility, and refined ZoneStatus logic.
    • pyxantech/config.py: Refined import logic, adjusted file opening, refactored get_with_log, and standardized string literals.
    • pyxantech/protocol.py: Introduced automatic serial port reconnection, encapsulated command throttling, improved error handling, and deferred serial connection creation to a thread pool.
  • Amplifier Protocol Definitions:
    • pyxantech/protocols/README.md: Added overview of YAML-based protocol files.
    • pyxantech/protocols/*.yaml: Added or significantly updated YAML protocol definitions for Acurus, DAX66, Dayton, Monoprice, Sonance, Xantech, and ZPR68, specifying connection parameters, command/response formats, and control limits.
  • Amplifier Series Configurations:
    • pyxantech/series/acurus.xml: New XML config for Acurus M4 and M8 models, including IP/RS232 control and zone/source mappings.
    • pyxantech/series/*.yaml: New or updated YAML configurations for Dax66, Dax88, Monoprice6, Sonance6, Xantech8, and ZPR68-10 series, defining operational parameters, zone/source counts, RS232 settings, and audio limits.
  • CI/CD, Development Environment, and Tooling:
    • .envrc: Added for automated project environment setup (Python deps, pre-commit, PYPI_API_TOKEN).
    • .github/FUNDING.yml: Added various project funding options.
    • .github/dependabot.yml: Added Dependabot config for weekly pip and github-actions updates.
    • .github/workflows/black.yml.old: Added (disabled) Black linting workflow.
    • .github/workflows/ci.yml: New CI workflow with unit-test and mypy-test jobs.
    • .github/workflows/pypi-publish.yml: New workflow to automate PyPI publishing on release.
    • .github/workflows/release.yml: New workflow for building and deploying Python packages to PyPI.
    • .gitignore: Updated with new ignore patterns for generated files and IDE configs.
    • .pre-commit-config.yaml: New file introducing pre-commit hooks for code quality, formatting (ruff), linting, and modernization.
    • pyproject.toml: New project-wide configuration for pycln, refurb, and ruff.
    • setup.cfg: Significantly updated with comprehensive package metadata, dependencies, and MyPy/Pytest configurations.
    • setup.py: Updated to require Python 3.10+, incremented version to '0.9.0', and streamlined setup() call.
  • Documentation:
    • README.md: Major overhaul with generalized title, expanded compatibility, new 'Support'/'Roadmap' sections, updated Xantech example, and pinout info.
    • docs/dax88-rs232.txt: New file documenting DAX88 RS232 serial control protocol.
  • Examples and Tests:
    • example-async.py, example.py: Code cleanup, reformatting, and addition of amp.all_off() in async example.
    • tests/__init__.py, tests/test_monoprice.py, tests/test_xantech8.py: Minor stylistic changes and formatting improvements.

Description generated by Mesa. Update settings

ZoneStatus.from_string() crashed with AttributeError when the response
didn't match the zone_status pattern. Move the None check before
groupdict() so it returns None gracefully instead of crashing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants