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

@dwimberger/homebridge-particleio

v1.0.0

Published

Particle.io plugin for homebridge: https://github.com/nfarina/homebridge

Downloads

4

Readme

Particle.io device plugin for Homebridge

This plugin for adding Particle.io devices to homebridge is based on the Particle.io SDK for node. You can install it using NPM like all other modules, using:

npm install -g homebridge-particleio.

The plugin is a platform that has to be defined in the config.json file. The plugin loads the accessories from the config.json file and creates the accessories dynamically. A sample configuration file is like:

{
  "bridge": {
    "name": "Test Homebridge",
    "username": "CC:22:3D:E3:CE:39",
    "port": 51826,
    "pin": "042-45-975"
  },
  "description": "This is an example configuration file with a Particle.io platform. It refers to a single Particle device and
  configures 2 accessories, a switch and a temperature sensor. Configure as you please.",
  "platforms": [
    {
      "platform": "ParticleIO",
      "name": "Particle Devices",
      "accessToken": "<<accessToken>>",
      "particles": [
        {
          "deviceId": "<<deviceId>>",
          "events": [
            {
              "name": "TEMPERATURES",
              "separator": ":",
              "contained": "TEMP1:TEMP2:TEMP3:TEMP4:TEMP5:TEMP6:TEMP7:TEMPIN",
              "variables": true
            },
            {
              "name": "VALVES",
              "separator": ":",
              "contained": "Valve1:Valve2:Valve3:Valve4:Valve5:Valve6"
            }
          ]
        }
      ],
      "devices": [
        {
          "name": "Bathroom Heating",
          "type": "switch",
          "deviceId": "<<deviceId>>",
          "get": {
            "type": "variable",
            "name": "VALVE6"
          },
          "set": {
            "type": "function",
            "name": "relayOnOff",
            "args": "{STATE}:6"
          }
        },
        {
          "name": "Bathroom Outflow",
          "type": "temperaturesensor",
          "deviceId": "<<deviceId>>",
          "get": {
            "type": "variable",
            "name": "TEMP6"
          }
        }
      ]
    }
  ]
}

The accessToken defines the Particle Access Token. The easiest way to create this token can be found here. I would recommend to issue a token that does not expire, or set a reminder to rotate it :)

$ particle token create --never-expires

The particles array of the platform descriptor contains the particle devices. It should hold the deviceId and an events array that will be used for subscription. You can use

  • name - The name of the event issued by the device.
  • separator - If the event contains more values (e.g. 8 temperature sensors) then this separator will be used to split them.
  • contained - Describes the variables of the values that are contained in the event; should use the separator

The idea of this is to optimize the amount handling in cases were you transport a lot of state with few events (there are limitations for free use ;).

The devices array contains all the accessories. You can see the accessory object defines following string objects:

  • name - Display name, this is the name to be displayed on the HomeKit app.
  • type - Type of the accessory. As of now, the plugin supports 3 types: switch, temperaturesensor and humiditysensor.
  • deviceId - Device ID of the Particle Device (Core, Photon or Electron). It will always be obtained from the particles array.
  • get - holds further configuration for getters.
  • set - holds further configuration for setters.

The get:

  • type - The type of getter; either event or variable
  • name - This is the name of the event or variable

The set:

  • type - The type of getter; currently only function
  • name - This is the name of the function to be called
  • args - The arguments for the function call. {STATE} will be replaced by on or off. This should be handled as command by the firmware.