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

flaks-node-hon

v1.1.2

Published

CommonJS Node.js client for hOn auth and air conditioner controls

Readme

hOn Node.js AC Controls

A CommonJS Node.js module for hOn authentication and air conditioner controls.

Advantages

  • Speed: cached AC preset runs take about 1 second.
  • CLI: easy to set up and use.
  • Module: easy to reuse in other projects.

About This Project

This project is a Node.js port of Andre0512/pyhOn, which was originally developed by Andre0512 under the MIT License.

All credit for the original implementation goes to Andre0512. This version reimplements the library in Node.js and may differ in API and functionality to better suit the JavaScript ecosystem.

Install From NPM

After this package is published, install it globally:

npm install -g node-hon

Then create a working config in the installed package folder or run from a checkout that has config.js, presets, and cache files available.

Global CLI Setup From This Repo

  1. Clone or download this repository.

  2. Install dependencies:

npm install
  1. Create your local config:
cp config_example.js config.js
  1. Edit config.js and set your hOn account values.

  2. Install this checkout as a global npm command:

npm install -g .
  1. Confirm the CLI is available:
node-hon list

CLI Usage

List available air conditioners:

node-hon list

Apply a preset by MAC address:

node-hon apply xx-xx-xx-xx-xx-xx preset_fan

Apply a preset by AC name:

node-hon apply Bedroom preset_fan

Turn an AC off:

node-hon apply bedroom off

Generate a preset interactively from live hOn capabilities:

node-hon generate-preset

Purge cached session and appliance command data:

node-hon purge-cache

The AC identifier can be a MAC address, unique ID, or nickname. Nickname lookup is case-insensitive, so Bedroom and bedroom can both match the same AC.

Generated and bundled presets live in presets/. Preset names are passed without .json, for example preset_fan loads presets/preset_fan.json.

Runtime cache files live under cache/ by default, including session and appliance command cache data. Run node-hon purge-cache, or set forceApplianceCacheRefresh: true in config.js, when the appliance command model changes or a preset cannot find a parameter that exists in the app.

Development CLI

You can also run the CLI scripts directly from the repository:

node cli/show_my_ac_devices.js
node cli/ac_generate_preset.js

ac_generate_preset.js loads the latest AC capabilities from the hOn API. You can set AC_ID or PRESET_NAME to preselect the air conditioner or output preset name.

Tests

npm test

Publishing

Before publishing, make sure you are logged in:

npm login
npm whoami

Verify the package:

npm test
npm run typecheck
npm pack --dry-run

Publish:

npm publish --access public

License

This project is released under the MIT License.
The original Python library is also MIT-licensed. See the LICENSE file for details and attribution.