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

airmx

v0.0.1

Published

Control AIRMX Pro with JavaScript.

Downloads

6

Readme

Control AIRMX Pro with JavaScript

The package utilizes the MQTT protocol to communicate with your AIRMX devices. Once connected to the server, it constantly monitors the status updates from your machines. Additionally, it provides a set of useful APIs to facilitate smooth control of your devices.

Installation

The package can be installed via NPM:

npm i airmx

Usage

First of all, we need to initialize an AIRMX client before we can monitor or control our machines:

import mqtt from 'mqtt'

const airmx = new Airmx({
  mqtt: mqtt.connect('mqtt://<YOUR-MQTT-SERVER>'),
  devices: [
    { id: <YOUR-DEVICE-ID>, key: '<YOUR-DEVICE-KEY>' }
  ]
})

You can register a handler when an AIRMX Pro sends us its latest status.

airmx.onEagleUpdate((status: EagleStatus) => {
  console.log(`🎈 AIRMX: ${status.deviceId}  ${status.power ? 'on' : 'off'}`)
})

Sending commands directly to your machines is simple with the control API. Just provide the device ID and control data.

airmx.control(1, {
  power: 1, // 1 indicates on
  mode: 0, // 0 indicates manual control
  cadr: 47, // CADR accepts a number range from 0 - 100
  denoise: 0, // 0 indicates off
  heatStatus: 0, // 0 indicates off
})

Dealing with the control API's fixed data structure can be tedious. That's why we built a semantic and fluent API for easier device control. Its method names are so intuitive, you'll instantly grasp their function.

// Turn on the machine
airmx.device(1).on()

// Turn off the machine
airmx.device(1).off()

// Turn on heat mode
airmx.device(1).heatOn()

// Turn off heat mode
airmx.device(1).heatOff()

// Turn on noise cancelling mode
airmx.device(1).denoiseOn()

// Turn off noise cancelling mode
airmx.device(1).denoiseOff()

// Adjust the CADR value (fan speed)
airmx.device(1).cadr(47)

The library replicates the built-in modes available in the official mobile applications:

  • AI Mode: Automatically adjusts CADR (Clean Air Delivery Rate) based on data from a paired air monitor.
  • Silent Mode: Reduces fan speed to minimize noise output.
  • Turbo Mode: Maximizes the device's purification capability, operating at 100% fan speed for rapid air cleaning.
airmx.device(1).ai()
airmx.device(1).slient()
airmx.device(1).turbo()

Whenever a device sends an update or you request its current state, you'll get an EagleStatus object with all the latest information.

airmx.device(1).status()

AIRMX Pro Status Reference

// Determine the device's power status
//
// Data type: boolean

status.isOn()
status.isOff()

// Determine if the machine is set to silent mode
//
// Data type: boolean

status.isSilentMode()

// Determine if noise cancelling is enabled
//
// Data type: boolean

status.isDenoiseOn()
status.isDenoiseOff()

// Determine if AUX heat is enabled
//
// Data type: boolean

status.isHeaterOn()
status.isHeaterOff()

// The current Clean Air Delivery Rate
//
// Data type: number (0 - 100)

status.cadr

// The filter identifications
//
// Data type: string

status.g4Id
status.carbonId
status.hepaId

// The usage percentage for the filters
//
// Data type: number
// Value range: 0 - 100
//
// 0 indicates the filter is brand new
// 100 indicates the filter is run out, and should be replaced

status.g4Percent
status.carbonPercent
status.hepaPercent

License

This package is released under the MIT license.