{"_id":"@dwimberger/homebridge-particleio","name":"@dwimberger/homebridge-particleio","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@dwimberger/homebridge-particleio","version":"1.0.0","description":"Particle.io plugin for homebridge: https://github.com/nfarina/homebridge","keywords":["homebridge-plugin","homebridge","particle","particle photon","particle electron"],"homepage":"https://github.com/dwimberger/homebridge-particleio#readme","bugs":{"url":"https://github.com/dwimberger/homebridge-particleio/issues"},"repository":{"type":"git","url":"git+https://github.com/dwimberger/homebridge-particleio.git"},"license":"MIT","author":{"name":"Dieter Wimberger"},"type":"commonjs","main":"src/index.js","scripts":{},"dependencies":{"hashmap":"^2.4.0","particle-api-js":"^11.1.2"},"devDependencies":{"hap-nodejs":"^1.1.1","homebridge":"^1.9.0"},"engines":{"node":">=10.0.0","homebridge":">=0.4.0"},"_id":"@dwimberger/homebridge-particleio@1.0.0","gitHead":"e3c73aff58e500eeafe70c1be67181bbf06ad9c1","_nodeVersion":"22.14.0","_npmVersion":"11.2.0","dist":{"integrity":"sha512-SLlW53NDRpwduUbnCzbjojbCbwE/rurT6W+F+kw9G8CTshqKexX+cC9mwbcW3WBTZ/xkZUcUlOdVRBLnycbgiA==","shasum":"6d131d89d440d5e4efc6205614f6ffc56c3cc646","tarball":"https://registry.npmjs.org/@dwimberger/homebridge-particleio/-/homebridge-particleio-1.0.0.tgz","fileCount":14,"unpackedSize":18872,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHg4xkQzNrCoNZ6+ZDr2lXWYMHLrki5Ds+XGHdCC2EKWAiAxRNFtYYI1JFtpcS05WNeVPNA/gZmBEiLpw+LbuwQ9/A=="}]},"_npmUser":{"name":"dwimberger","email":"dieter@wimpi.net"},"directories":{},"maintainers":[{"name":"dwimberger","email":"dieter@wimpi.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/homebridge-particleio_1.0.0_1748976174143_0.27414980220192287"},"_hasShrinkwrap":false}},"time":{"created":"2025-06-03T18:42:54.030Z","1.0.0":"2025-06-03T18:42:54.361Z","modified":"2025-06-03T18:42:54.665Z"},"maintainers":[{"name":"dwimberger","email":"dieter@wimpi.net"}],"description":"Particle.io plugin for homebridge: https://github.com/nfarina/homebridge","homepage":"https://github.com/dwimberger/homebridge-particleio#readme","keywords":["homebridge-plugin","homebridge","particle","particle photon","particle electron"],"repository":{"type":"git","url":"git+https://github.com/dwimberger/homebridge-particleio.git"},"author":{"name":"Dieter Wimberger"},"bugs":{"url":"https://github.com/dwimberger/homebridge-particleio/issues"},"license":"MIT","readme":"**Particle.io device plugin for Homebridge**\n-------------------------------------\n\nThis plugin for adding Particle.io devices to homebridge is based on the Particle.io SDK for node.\nYou can install it using NPM like all other modules, using:\n\n`npm install -g homebridge-particleio`.\n\nThe 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:\n\n```JSON\n{\n  \"bridge\": {\n    \"name\": \"Test Homebridge\",\n    \"username\": \"CC:22:3D:E3:CE:39\",\n    \"port\": 51826,\n    \"pin\": \"042-45-975\"\n  },\n  \"description\": \"This is an example configuration file with a Particle.io platform. It refers to a single Particle device and\n  configures 2 accessories, a switch and a temperature sensor. Configure as you please.\",\n  \"platforms\": [\n    {\n      \"platform\": \"ParticleIO\",\n      \"name\": \"Particle Devices\",\n      \"accessToken\": \"<<accessToken>>\",\n      \"particles\": [\n        {\n          \"deviceId\": \"<<deviceId>>\",\n          \"events\": [\n            {\n              \"name\": \"TEMPERATURES\",\n              \"separator\": \":\",\n              \"contained\": \"TEMP1:TEMP2:TEMP3:TEMP4:TEMP5:TEMP6:TEMP7:TEMPIN\",\n              \"variables\": true\n            },\n            {\n              \"name\": \"VALVES\",\n              \"separator\": \":\",\n              \"contained\": \"Valve1:Valve2:Valve3:Valve4:Valve5:Valve6\"\n            }\n          ]\n        }\n      ],\n      \"devices\": [\n        {\n          \"name\": \"Bathroom Heating\",\n          \"type\": \"switch\",\n          \"deviceId\": \"<<deviceId>>\",\n          \"get\": {\n            \"type\": \"variable\",\n            \"name\": \"VALVE6\"\n          },\n          \"set\": {\n            \"type\": \"function\",\n            \"name\": \"relayOnOff\",\n            \"args\": \"{STATE}:6\"\n          }\n        },\n        {\n          \"name\": \"Bathroom Outflow\",\n          \"type\": \"temperaturesensor\",\n          \"deviceId\": \"<<deviceId>>\",\n          \"get\": {\n            \"type\": \"variable\",\n            \"name\": \"TEMP6\"\n          }\n        }\n      ]\n    }\n  ]\n}\n```\n\n The **accessToken** defines the Particle [Access Token](https://docs.particle.io/tutorials/device-cloud/authentication/#access-tokens). The easiest way to create this token can be found [here](https://docs.particle.io/reference/developer-tools/cli/#particle-token-create). I would recommend to issue a token that does not expire, or set a reminder to rotate it :)\n\n```\n$ particle token create --never-expires\n```\n\nThe  `particles` array of the platform descriptor contains the particle devices. It should hold  the `deviceId` and an `events` array \nthat will be used for subscription. You can use\n\n - **name** - The name of the event issued by the device.\n - **separator** - If the event contains more values (e.g. 8 temperature sensors) then this separator will be used to split them.\n - **contained** - Describes the variables of the values that are contained in the event; should use the `separator`\n\nThe 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 ;).\n\nThe `devices` array contains all the accessories. You can see the accessory object defines following string objects:\n\n - **name** - Display name, this is the name to be displayed on the HomeKit app.\n - **type** - Type of the accessory. As of now, the plugin supports 3 types: `switch`, `temperaturesensor` and `humiditysensor`.\n - **deviceId** - Device ID of the Particle Device (Core, Photon or Electron). It will always be obtained from the `particles` array.\n - **get** - holds further configuration for getters.\n - **set** - holds further configuration for setters.\n\nThe `get`:\n\n - **type** - The type of getter; either `event` or `variable`\n - **name** - This is the name of the event or variable\n\n The `set`:\n\n - **type** - The type of getter; currently only `function`\n - **name** - This is the name of the function to be called\n - **args** - The arguments for the function call. `{STATE}` will be replaced by `on` or `off`.  This should be handled as command by \n the firmware.\n\n\n","readmeFilename":"README.md","_rev":"1-34cd074cd5930b21667dd1bcb105227e"}