Skip to content

feat: add schema 47 zniffer, utility, and broadcast commands (4/4)#1514

Merged
AlCalzone merged 2 commits into
masterfrom
feat/schema-47-zniffer-utils-broadcast
Mar 13, 2026
Merged

feat: add schema 47 zniffer, utility, and broadcast commands (4/4)#1514
AlCalzone merged 2 commits into
masterfrom
feat/schema-47-zniffer-utils-broadcast

Conversation

@raman325
Copy link
Copy Markdown
Collaborator

@raman325 raman325 commented Feb 27, 2026

Blocked by: #1513

Split from #1480 — this PR adds the remaining zniffer, utility, and broadcast commands.

Summary

  • Add zniffer Long Range commands
  • Add zniffer load_capture_from_buffer command
  • Add utility firmware commands
  • Add broadcast node Long Range support

Details

Zniffer Long Range commands

  • zniffer.get_lr_regions - Get Long Range capable regions
  • zniffer.get_current_lr_channel_config - Get current LR channel config
  • zniffer.get_supported_lr_channel_configs - Get supported LR channel configs
  • zniffer.set_lr_channel_config - Set LR channel config (800 series)

Zniffer capture commands

  • zniffer.load_capture_from_buffer - Load frames from base64 buffer

Utility commands

  • utils.guess_firmware_file_format - Guess firmware file format
  • utils.try_unzip_firmware_file - Try to extract firmware from ZIP
  • utils.extract_firmware - Extract firmware from file

Broadcast node

  • Added longRange flag for broadcasting to Long Range nodes

Test plan

  • All existing tests pass (npm test)
  • Verify new zniffer/utility/broadcast commands work end-to-end

🤖 Generated with Claude Code

Copilot AI review requested due to automatic review settings February 27, 2026 06:49
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR completes the schema 47 implementation by adding zniffer Long Range and file I/O commands, utility firmware commands, and broadcast node Long Range support. It is the final part (4/4) of a larger feature split from PR #1480, following PRs #1509, #1510, and #1513.

Changes:

  • Added zniffer Long Range commands for region/channel configuration and file I/O operations (save/load captures)
  • Added utility commands for firmware file format detection and ZIP extraction
  • Added broadcast node Long Range support via longRange flag
  • Updated package dependencies (zwave-js ^15.21.0, @types/node ^25.2.2)
  • Enhanced CI/CD workflow with OIDC publishing support
  • Updated documentation for all new commands

Reviewed changes

Copilot reviewed 38 out of 39 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/lib/zniffer/command.ts Added Long Range and file I/O command enums
src/lib/zniffer/incoming_message.ts Added incoming message interfaces for new zniffer commands
src/lib/zniffer/outgoing_message.ts Added result types for zniffer commands including Map serialization for channel configs
src/lib/zniffer/message_handler.ts Implemented handlers for Long Range and file I/O commands with proper base64 encoding
src/lib/utils/command.ts Added firmware utility command enums
src/lib/utils/incoming_message.ts Added incoming message interfaces for firmware utility commands
src/lib/utils/outgoing_message.ts Added result types for firmware utility commands
src/lib/utils/message_handler.ts Implemented handlers for firmware format detection and ZIP extraction
src/lib/broadcast_node/incoming_message.ts Added longRange optional flag to broadcast node base interface
src/lib/broadcast_node/message_handler.ts Added logic to select Long Range broadcast node based on flag
src/lib/common.ts Added parseFirmwareFile helper with automatic ZIP extraction and getFirmwareUpdateOptions helper
src/lib/state.ts Added schema 47 state properties for driver, controller, and node with proper versioning
src/lib/node/message_handler.ts Refactored firmware update to use shared helper and added link reliability check commands
src/lib/controller/message_handler.ts Added event guards and refactored firmware updates
src/lib/driver/message_handler.ts Added driver commands for bootloader, CC version, user agent, and RSSI monitoring
src/lib/forward.ts Added driver and controller event forwarding with proper schema version guards
src/util/stringify.ts Added Map to object conversion for JSON serialization
src/mock/index.ts Added mock driver properties for schema 47 state
src/test/integration.ts Updated integration test expectations for new driver state
package.json Bumped version to 3.6.0 and updated dependencies
.github/workflows/npmpublish.yml Updated to Node 22, npm latest, and OIDC publishing
README.md Comprehensive documentation for all new commands and events
API_SCHEMA.md Documented schema 47 changes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/npmpublish.yml
Comment thread .github/workflows/npmpublish.yml
@raman325 raman325 force-pushed the feat/schema-47-zniffer-utils-broadcast branch 2 times, most recently from 77d3649 to 6323685 Compare February 27, 2026 07:00
@raman325 raman325 changed the base branch from master to feat/schema-47-controller-node-endpoint February 27, 2026 07:25
@raman325 raman325 force-pushed the feat/schema-47-controller-node-endpoint branch from 0dde50c to 4a79aa4 Compare February 27, 2026 07:36
@raman325 raman325 force-pushed the feat/schema-47-zniffer-utils-broadcast branch from 6323685 to 5f4efa0 Compare February 27, 2026 07:36
@raman325 raman325 changed the base branch from feat/schema-47-controller-node-endpoint to master February 27, 2026 07:37
@raman325 raman325 marked this pull request as draft February 27, 2026 07:39
@raman325 raman325 force-pushed the feat/schema-47-zniffer-utils-broadcast branch from 5f4efa0 to e8790e5 Compare February 27, 2026 07:48
@raman325 raman325 added the enhancement New feature or request label Feb 27, 2026
@raman325 raman325 force-pushed the feat/schema-47-zniffer-utils-broadcast branch 10 times, most recently from 91d4d2b to bfaa2f2 Compare March 3, 2026 20:02
Add zniffer Long Range and file I/O commands, utility firmware
commands, and broadcast node Long Range support.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@raman325 raman325 marked this pull request as ready for review March 10, 2026 04:47
@raman325 raman325 force-pushed the feat/schema-47-zniffer-utils-broadcast branch from bfaa2f2 to 8862a23 Compare March 10, 2026 04:47
Comment thread src/lib/zniffer/command.ts Outdated
Remove save_capture_to_file and load_capture_from_file which take
server-side file paths. The buffer-based alternatives
(get_capture_as_zlf_buffer, load_capture_from_buffer) remain for
transferring data over the WebSocket instead.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@AlCalzone AlCalzone merged commit b7d2eb0 into master Mar 13, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants