-
Notifications
You must be signed in to change notification settings - Fork 8
Feature/audyssey settings #18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Feature/audyssey settings #18
Conversation
- Add zone selection (Main Zone / Zone 2) in settings UI - Add configurable power-off behavior (both zones vs selected zone) - Implement zone-specific power control functions - Add Zone2 event handling for power state changes - Volume control limited to Main Zone (denon-client limitation) - Fix issue where Zone2 remained on when powering off Main Zone 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Update node-roon-api dependency from unavailable OonihiloO/node-roon-api to official roonlabs/node-roon-api - Use latest commit hash 51258392f8bfae3fe218740dda5bc049a822872e - Resolves npm install failure due to repository not found error 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Set up Jest testing framework with coverage reporting - Create ZoneFunctions class with 100% test coverage - Add unit tests for zone helper functions (getPowerForZone, setPowerForZone, setPowerBothZones) - Add settings configuration tests with layout validation - Add integration tests covering real-world usage scenarios - Tests cover: Main Zone control, Zone2 control, dual-zone power off, error handling - Add test scripts: npm test, npm run test:watch, npm run test:coverage Test Results: - 64 tests passing - 100% coverage on zone-functions.js - Comprehensive error handling and edge case coverage 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Create GitHub Action for automated Docker builds on pushes and releases - Set up multi-architecture builds (amd64/arm64) with caching - Optimize Dockerfile with security best practices and health checks - Add .dockerignore to reduce build context size - Create docker-compose.yml with host and bridge network options - Add comprehensive DOCKER.md documentation with usage examples - Include test script for validating Docker functionality - Configure GHCR publishing for easy container access Features: - Automated builds on main/master branch pushes and releases - Multi-arch support for x64 and ARM64 (Raspberry Pi, Apple Silicon) - Security hardened with non-root user - Health checks and volume support for persistent data - Debug logging configuration options 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Add Docker installation section with quick start commands - Document zone configuration features (zone selection, dual-zone power control) - Link to comprehensive DOCKER.md documentation - Clarify Zone 2 volume control limitations 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Remove npm cache configuration to avoid cache lookup errors - Add package-lock.json for reproducible builds - Change from npm ci to npm install for flexibility 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
- Change from npm ci to npm install in Dockerfile for compatibility - Add npm caching to GitHub Actions workflow for faster builds - Resolves Docker build failure due to missing package-lock.json 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
…ands Add comprehensive project overview including: - Key architecture components and event-driven design - Multi-zone support details - State management patterns - Development commands (install, run, test, debug) - Important notes about Telnet limitations and volume calculations
…nd Reference Level Add comprehensive Audyssey control functionality: - New AudysseyControl module (src/audyssey-control.js): - Dynamic EQ toggle (On/Off) - Dynamic Volume control (Off/Light/Medium/Heavy) - Reference Level Offset (0/5/10/15 dB) - Query and set operations via Telnet protocol (PSDYNEQ, PSDYNVOL, PSREFLEV) - Settings UI integration: - New "Audyssey Settings" group in Roon configuration - Dropdown controls for all three Audyssey features - Real-time application of settings changes - Settings persist across restarts - Full test coverage: - 10 unit tests for AudysseyControl module - All tests passing (74 total in project) - Tested against live Denon receiver via Telnet - Settings automatically applied on connection and when changed in UI
…witch Ensure Audyssey settings (Dynamic EQ, Dynamic Volume, Reference Level) are applied when the user switches to this source in Roon, not just on initial connection or when settings are manually changed. This provides consistent behavior with power and input switching, ensuring the user's preferred Audyssey configuration is active whenever they use Roon with their receiver.
…s changes
The Roon Settings API creates both nested and flat properties when using
dot notation in setting names (e.g., "audyssey.dynamicEQ" creates both
audyssey.dynamicEQ and audyssey: {dynamicEQ: ...}).
This fix:
- Extracts Audyssey values from the flat properties where Roon stores them
- Compares old vs new values correctly to detect changes
- Applies changed settings immediately via Telnet to the receiver
- Normalizes back to nested format for persistence
Now changing Audyssey settings in the Roon UI properly applies them to
the receiver in real-time.
Add comprehensive debug logging throughout Audyssey flow: Settings Save/Change Flow: - Log extracted settings from Roon UI - Log old vs new values for each changed setting - Log successful application of each setting - Log when no changes detected - Log when client not initialized - Log config file save operation Convenience Switch Flow: - Log when triggered with source name - Log power state and actions - Log Audyssey application start - Log input switching actions - Log completion status (success/failure) Apply Settings Flow: - Log all settings being applied with values - Log each individual setting application - Log overall success/failure This makes it easy to trace Audyssey operations in DEBUG output.
Only update Roon when the volume_max value actually changes, rather than on every masterVolumeMaxChanged event from the receiver. This reduces unnecessary network traffic and log spam. Added detailed logging to track when values change vs when they remain the same, making debugging easier.
Added a new 'Maximum Volume Control' setting that allows users to choose between: - Dynamic mode: Uses the receiver's max volume setting (existing behavior) - Fixed mode: Caps volume at 0 dB regardless of receiver setting When in fixed mode: - Volume control initialization sets volume_max to 0 dB - masterVolumeMaxChanged events from receiver are ignored - Prevents receiver/Audyssey from changing the max volume limit This is useful for users who want to protect their speakers by capping volume at reference level (0 dB) regardless of receiver configuration.
When setup_denon_connection is called multiple times (e.g., when changing settings like maxVolumeMode), event listeners were accumulating without being removed, causing MaxListenersExceededWarning. Fixed by calling removeAllListeners() on both the client and socket before disconnect, ensuring clean reconnections.
Summary of ChangesHello @arthursoares, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request significantly enhances the Roon extension for Denon/Marantz receivers by introducing direct control over Audyssey audio settings, allowing users to fine-tune their listening experience directly from Roon. Additionally, it addresses several long-standing bugs related to volume reporting, event listener management, and unnecessary UI notifications, leading to a more stable and user-friendly experience. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This is a great pull request that adds valuable Audyssey control features and fixes several important bugs. The new features are well-implemented with corresponding UI settings and tests. The bug fixes for the track change popups, memory leaks, and excessive volume updates are all solid improvements. The code is clean, well-structured, and includes helpful debug logging.
One thing to note is that this pull request includes a large number of files in the .claude/ directory that seem unrelated to the Roon extension itself. These appear to be configuration files for an AI development tool. It would be best to remove these from this pull request to keep the changes focused on the extension's functionality.
I have one minor suggestion in app.js to improve code readability. Overall, excellent work!
| const new_audyssey = { | ||
| dynamicEQ: l.values["audyssey.dynamicEQ"] !== undefined | ||
| ? l.values["audyssey.dynamicEQ"] | ||
| : (l.values.audyssey ? l.values.audyssey.dynamicEQ : false), | ||
| dynamicVolume: l.values["audyssey.dynamicVolume"] !== undefined | ||
| ? l.values["audyssey.dynamicVolume"] | ||
| : (l.values.audyssey ? l.values.audyssey.dynamicVolume : "OFF"), | ||
| referenceLevel: l.values["audyssey.referenceLevel"] !== undefined | ||
| ? l.values["audyssey.referenceLevel"] | ||
| : (l.values.audyssey ? l.values.audyssey.referenceLevel : 5) | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic for extracting the Audyssey settings is a bit verbose. You can make it more concise and readable by using modern JavaScript features like optional chaining (?.) and the nullish coalescing operator (??).
const new_audyssey = {
dynamicEQ: l.values["audyssey.dynamicEQ"] ?? l.values.audyssey?.dynamicEQ ?? false,
dynamicVolume: l.values["audyssey.dynamicVolume"] ?? l.values.audyssey?.dynamicVolume ?? "OFF",
referenceLevel: l.values["audyssey.referenceLevel"] ?? l.values.audyssey?.referenceLevel ?? 5
};
This PR adds Audyssey control support and fixes a few bugs I ran into while using the extension. Not sure if you want to bring this in, but figured I'd share in case it's useful to others.
What's New
Audyssey Settings
Added controls for Audyssey audio features:
Settings apply automatically when connecting or switching sources. Makes it easy to toggle between listening profiles without digging into receiver menus.
Max Volume Mode
I'm not sure if this happens on all receivers, but mine kept broadcasting different max volume levels constantly, which made Roon's volume slider jitter all over the
place. Added a setting to either use the receiver's dynamic max volume (original behavior) or lock it to 0 dB.
Bonus: Also works as speaker protection if you want to cap volume at reference level.
Bug Fixes
Track Change Popup
Fixed an annoying bug where Roon showed "Starting audio playback..." on every track change. Turns out convenience_switch was sending unnecessary commands even when
already on the right input.
Memory Leak
Event listeners weren't getting cleaned up when reconnecting, causing MaxListenersExceededWarning. Now properly removes all listeners before disconnect.
Volume Updates
Was spamming Roon with max volume updates even when nothing changed. Now only updates when the value actually differs.
Testing
All 74 existing tests still pass, plus added 10 new tests for Audyssey stuff. Tested with my local Denon receiver - no more jitter, no more popups, no more warnings.