npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

model-m1

v2.1.0

Published

CLI tool and SDK for adjusting settings on the Marantz Model M1

Downloads

708

Readme

model-m1

Command line tooling and SDK for adjusting settings on the Marantz Model M1.

Features

This is intended to be a 1:1 swap for the HEOS app settings menu, complete with settings for:

  • Sound mode (direct, stereo, virtual)
  • Dialogue enhancement
  • Night mode
  • EQ adjustments
  • Digital filters
  • Dirac Live filters

Use it to create presets for gaming, home theatre, and music streaming! Or use the SDK to build your own tooling for home automation.

Installation

Install using npm:

npm install -g model-m1

Or run directly with npx:

npx model-m1

CLI Usage

help

Get help for any command:

model-m1 --help
model-m1 discover --help
model-m1 get-config --help
model-m1 set-config --help

discover

Find Marantz Model M1 devices on your network:

model-m1 discover

Filter by device name or model:

model-m1 discover --friendlyName "Living Room" --modelName "Model M1"

get-config

Retrieve the current settings from your device:

# hostname comes from model-m1 discover
model-m1 get-config --hostname 192.168.1.100

Or pipe hostname from discover:

model-m1 discover | model-m1 get-config

set-config

Set individual settings via CLI options:

model-m1 set-config --hostname 192.168.1.100 --soundMode stereo --bass 2 --treble -1

Apply a preset file:

model-m1 set-config preset.json --hostname 192.168.1.100

Pipe hostname from discover:

model-m1 discover | model-m1 set-config preset.json

SDK Usage

You can also use the SDK programmatically to control your device.

Basic Example

import net from "net";
import XMLBuilder from "fast-xml-builder";
import { XMLParser } from "fast-xml-parser";
import { createControlClient, createRenderingControlClient } from "model-m1";
import type { ISocket } from "model-m1";

const port = 60006;
const hostname = "192.168.1.100";
const host = `${hostname}:${port}`;

// Create XML parser/builder
const parser = new XMLParser({ ignoreAttributes: false });
const builder = new XMLBuilder({ ignoreAttributes: false });

// The server will disconnect with each request, so we'll wrap
// the destroy function. Internally this uses the Renewable class
// but I felt that was not worth maintaining as a package export.
// If you would prefer that pattern it may be worth copying into your
// codebase
let currentSocket = new net.Socket();
const socket = {
  connect: (onConnect) => currentSocket.connect(port, hostname, onConnect),
  off: (eventName, cb) => currentSocket.off(eventName, cb),
  on: (eventName, cb) => currentSocket.on(eventName, cb),
  write: (data) => currentSocket.write(data),
  destroy: () => {
    currentSocket.destroy();
    currentSocket = new net.Socket();
  },
} satisfies ISocket;

// Create control client
const controlClient = createControlClient({
  output: console,
  socket,
  host,
  pathname: "/ACT/control",
  build: (data) => builder.build(data),
  parse: (data) => parser.parse(data),
});

// Get audio config
const audioConfig = await controlClient("GetAudioConfig");

// Set audio config (the nesting here comes from XML serialization)
await controlClient("SetAudioConfig", {
  AudioConfig: {
    AudioConfig: {
      soundMode: "STEREO",
      highpass: 80,
      lowpass: 120,
    },
  },
});

// Create rendering control client for volume/EQ
const renderingClient = createRenderingControlClient({
  output: console,
  socket,
  host,
  pathname: "/upnp/control/renderer_dvc/RenderingControl",
  build: (data) => builder.build(data),
  parse: (data) => parser.parse(data),
});

// Get bass level
const bass = await renderingClient("X_GetBass", {
  Channel: "Master",
  InstanceID: 0,
});

Available Control Client Methods

  • GetAudioConfig / SetAudioConfig - Sound mode, crossover, digital filters
  • GetTvConfig / SetTvConfig - TV input, dialogue enhancement, night mode
  • GetLEDConfig / SetLEDConfig - Status LED brightness, touch controls
  • GetLowLatencyConfig / SetLowLatencyConfig - Audio delay settings
  • SetTranscode - Multi-room audio quality
  • SetVolumeLimit - Maximum volume limit

Available Rendering Control Client Methods

  • X_GetBass / X_SetBass - Bass EQ level
  • X_GetTreble / X_SetTreble - Treble EQ level
  • X_GetBalance / X_SetBalance - Left/right balance
  • X_GetSubwoofer / X_SetSubwoofer - Subwoofer level

Development

# Install dependencies
npm install

# Run tests
npm test

# Type check
npm run typecheck

# Run locally
npx tsx cli.ts <command>

License

GPL-3.0