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-http-environment-controller

v1.1.0

Published

Homebridge plugin to expose HTTP environment sensors (temperature, humidity) and control a PWM fan via HomeKit

Readme

homebridge-http-environment-controller

Plugin Homebridge pour exposer les données d'une station météo Arduino en tant qu'accessoires HomeKit.

Deux accessoires distincts sont disponibles :

| Accessoire | Service HomeKit | Usage | |---|---|---| | HttpTemperatureHumiditySensor | TemperatureSensor + HumiditySensor | Lecture capteurs | | HttpFanController | Fanv2 | Contrôle ventilateur PWM |

Conçu pour fonctionner avec un Arduino MKR WiFi 1010 mais compatible avec tout endpoint HTTP retournant le bon format JSON.


Installation

Via l'interface Homebridge UI ou en ligne de commande :

npm install -g homebridge-http-environment-controller

Accessoire 1 — Capteur température & humidité

Paramètres

| Paramètre | Description | Défaut | Requis | |---|---|---|---| | accessory | HttpTemperatureHumiditySensor | — | oui | | name | Nom de l'accessoire dans HomeKit | — | oui | | url | URL complète de l'endpoint capteurs | — | oui | | refresh | Intervalle de rafraîchissement (secondes) | 30 | non | | disableHumidity | Désactiver le service humidité | false | non | | manufacturer | Fabricant affiché dans HomeKit | HttpTemperatureHumidity | non | | model | Modèle affiché dans HomeKit | Default | non | | serial | Numéro de série affiché dans HomeKit | 18981898 | non |

Format de réponse attendu

{
  "temperature": 24.5,
  "humidity": 45.2
}

Exemple de configuration

{
  "accessory": "HttpTemperatureHumiditySensor",
  "name": "Rack Temp",
  "url": "http://192.168.1.10/weather/status",
  "refresh": 30
}

Accessoire 2 — Contrôleur ventilateur

Expose un service Fanv2 HomeKit avec :

  • Auto / Manuel (TargetFanState) — toggle principal
  • Vitesse (RotationSpeed) — slider 0-100% (actif en mode Manuel)
  • Actif (Active) — grisé automatiquement si l'Arduino est hors ligne

Comportements :

  • Ajuster le slider de vitesse bascule automatiquement en mode Manuel
  • Appuyer sur "éteindre" dans l'app Home repasse en Auto (le rack ne s'arrête jamais)

Paramètres

| Paramètre | Description | Défaut | Requis | |---|---|---|---| | accessory | HttpFanController | — | oui | | name | Nom de l'accessoire dans HomeKit | — | oui | | url | URL complète de l'endpoint ventilateur | — | oui | | refresh | Intervalle de synchronisation (secondes) | 30 | non | | manufacturer | Fabricant affiché dans HomeKit | Arduino | non | | model | Modèle affiché dans HomeKit | MKR WiFi 1010 | non | | serial | Numéro de série affiché dans HomeKit | 00000001 | non |

Appels HTTP effectués

| Action HomeKit | Requête | |---|---| | Lecture état | GET /fan | | Passer en Auto | POST /fan {"mode":"auto"} | | Passer en Manuel | POST /fan {"mode":"manual","speed_pct":N} | | Changer la vitesse | POST /fan {"mode":"manual","speed_pct":N} |

Format de réponse attendu (GET /fan)

{
  "mode": "auto",
  "speed_pct": 42,
  "temperature": 34.1
}

Exemple de configuration

{
  "accessory": "HttpFanController",
  "name": "Rack Fan",
  "url": "http://192.168.1.10/fan",
  "refresh": 30
}

Configuration complète

{
  "bridge": {
    "name": "Homebridge",
    "username": "CD:22:3D:E3:CE:30",
    "port": 51826,
    "pin": "031-45-156"
  },
  "accessories": [
    {
      "accessory": "HttpTemperatureHumiditySensor",
      "name": "Rack Temp",
      "url": "http://192.168.1.10/weather/status",
      "refresh": 30
    },
    {
      "accessory": "HttpFanController",
      "name": "Rack Fan",
      "url": "http://192.168.1.10/fan",
      "refresh": 30
    }
  ]
}