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

@mrsmartuk/node-red-ihost-rotary

v0.3.1

Published

Mr Smart multi-target rotary-knob controller for eWeLink CUBE / SONOFF iHost

Readme

Mr Smart iHost Rotary Controller

A local Node-RED node for SONOFF iHost / eWeLink CUBE that maps compatible Zigbee rotary knobs to one or more dimmable/CCT lights.

What it does

  • Single press → group power toggle
  • Rotate → brightness up/down
  • Press + rotate → colour-temperature up/down on compatible targets
  • One rotary knob can control multiple target lights
  • Synchronized group mode keeps targets together
  • Relative group mode preserves per-light differences
  • Multi-target checkbox picker with Select All / Clear
  • Per-target capability detection for CCT
  • Local CUBE Open API + SSE; no cloud dependency for normal operation
  • Installer-adjustable brightness and CCT step sizes
  • Works with Node.js 16+ and Node-RED 3+

Tested hardware

  • SONOFF iHost
  • Tuya/MOES TS004F-compatible Zigbee rotary knob
  • GLEDOPTO GL-C-006P CCT controller
  • GLEDOPTO / iHost-mapped single-channel dimmer (tested as GL-C-009P profile)

Third-party Zigbee devices can expose incomplete or stale metadata through iHost. The node therefore keeps its own per-target state cache and tolerates incomplete brightness capability reporting.

Install on iHost (offline)

  1. Open Node-RED on iHost.
  2. Open Menu → Manage palette → Install.
  3. Press the local package upload button.
  4. Select the supplied .tgz file.
  5. Install the package.
  6. Restart the Node-RED add-on if prompted.
  7. The Mr Smart → Rotary → Lights node appears in the palette.

First-time setup

  1. Drag Rotary → Lights onto a flow.
  2. Create/select an iHost configuration.
  3. Enter the local iHost address.
  4. Press Get Token, approve the request on iHost, then press Get Token again if required.
  5. Deploy the iHost config once.
  6. Reopen the Rotary node and press Refresh Devices.
  7. Select one Rotary Knob.
  8. Open Target Lights and tick one or more lights.
  9. Select Synchronized or Relative group mode.
  10. Adjust Brightness Step / CCT Step if needed.
  11. Deploy.

Group modes

Synchronized

  • Power: group is unified ON/OFF.
  • Brightness: selected targets move to one shared brightness.
  • CCT: compatible targets move to one shared CCT value.

Relative

  • Power: each target toggles from its own current state.
  • Brightness: each target moves by the configured step from its own current value.
  • CCT: compatible targets move by the configured step from their own current value.

Defaults

  • Brightness Step: 3%
  • CCT Step: 15%
  • Profile: Auto Detect
  • Group Mode: Synchronized

Compatibility notes

The node is intentionally tolerant of third-party Zigbee devices whose iHost REST metadata is incomplete. Brightness commands are attempted on all installer-selected targets; unsupported targets fail independently without stopping the rest of the group. CCT commands are sent only to targets detected as CCT-capable unless a future profile explicitly overrides that behaviour.

Security

The iHost Open API token is stored as a Node-RED credential. Do not commit exported runtime credentials, tokens or production flow secrets to GitHub.

Development / release status

v0.3.0 is the first UI-polished multi-target test release. Validate on representative iHost firmware and mixed light-controller types before publishing as v1.0.0 or adding the node-red npm keyword for broad discovery.

License

MIT