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

homebridge-somfy-remote

v0.1.7

Published

Homebridge plugin that exposes a Pi-attached Somfy Telis 4 remote as HomeKit WindowCovering accessories.

Readme

homebridge-somfy-remote

Homebridge plugin that exposes a Raspberry Pi-attached Somfy Telis 4 remote (driven by somfy) as HomeKit WindowCovering accessories so Siri, the iOS Home app, and HomePod can control the blinds.

Talks to the existing somfy serve HTTP API — no changes to the Rust side. Each accessory maps a HomeKit position to POST /command:

  • Target ≥ 50 → {"command": "up", "led": "<LED>"}
  • Target < 50 → {"command": "down", "led": "<LED>"}

Current position snaps to the target immediately (no progress simulation, since the hardware gives no position feedback).

Install

Run the bootstrap script with --with-homekit to add the Homebridge apt repo, install Homebridge, and install this plugin via hb-service add:

curl -fsSL https://raw.githubusercontent.com/melkir/remote-gpio/main/install.sh | sudo bash -s -- --with-homekit

Safe to re-run on a box that already has somfy installed; somfy install is idempotent. Updates flow through the Homebridge UI at http://<pi>:8581Plugins, which polls the npm registry where CI publishes each tagged release.

For local development, mise run homebridge-pack writes a tarball to target/homebridge/ so you can sudo hb-service add /path/to/homebridge-somfy-remote.tgz into a dev Homebridge.

Config

Add to Homebridge's config.json under platforms:

{
  "platform": "SomfyRemote",
  "name": "Somfy Remote",
  "baseUrl": "http://localhost:5002"
}

Defaults provision one accessory per LED (L1–L4) plus an "All Blinds" entry that targets the remote's ALL mode. Override with a blinds array if you want custom names:

{
  "platform": "SomfyRemote",
  "baseUrl": "http://localhost:5002",
  "blinds": [
    { "name": "Living Room", "led": "L1" },
    { "name": "Kitchen", "led": "L2" },
    { "name": "All", "led": "ALL" }
  ]
}

Pair

Scan the Homebridge setup code from the Home app → Add Accessory → More Options.

Behavior

Position mapping. HomeKit models blinds on a 0–100 slider. This plugin snaps any write to either end: target ≥ 50 fires up, target < 50 fires down, and the current position updates immediately to match. There's no travel animation because the Somfy remote gives no position feedback — the Pi only knows which LED is lit.

No MY / STOP. HomeKit's WindowCovering service has no "stop" verb that a user-facing control can trigger, so the plugin only emits up / down. If you need to stop a blind mid-travel or use the Somfy MY position, use the Preact PWA, a Siri Shortcut that POSTs {"command": "stop"} to /command, or the remote itself. HoldPosition via Home automations is not wired up.

Errors. A failed or timed-out POST /command (default timeout 5s, override with requestTimeoutMs) logs an error line and throws SERVICE_COMMUNICATION_FAILURE back to HomeKit, which surfaces in the Home app as "No Response" for that accessory. The plugin does not retry — HomeKit re-issues the write if the user taps again. Non-numeric TargetPosition writes are rejected with INVALID_VALUE_IN_REQUEST rather than defaulting to down.

Troubleshooting

  • "No Response" in Home. Check ssh pi somfy doctor (GPIO + service state) and ssh pi curl -s localhost:5002/led (backend reachable). Tail journalctl -u homebridge -f for the plugin's own error lines.
  • Pairing fails. Make sure Homebridge and somfy are on the same LAN as the iPhone and that multicast (mDNS) isn't blocked by the router. The Homebridge UI at http://<pi>:8581 is the source of truth for the current setup code.
  • Remote doesn't react. The plugin always fires a SELECT chain for the configured LED before up / down. Verify the physical remote cycles through L1–L4 → ALL as expected by watching the LEDs in the PWA while triggering the accessory.