As you all know in the new version of Homebridge, the plugin architecture is changed. In new Homebridge, plugins are published through NPM with name starts with homebridge-. Users can install the plugin using NPM.
You can install it using NPM like all other modules, using:
npm install -g homebridge-particle-io
.
In this version, I have made some changes from the older version. Mainly the plugin is now a Homebridge Platform. Also in this version accessories are defined in config.json
file. The plugin loads the accessories from the config.json
file and create accessory dynamically. A sample configuration file is like:
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:39",
"port": 51826,
"pin": "031-45-154"
},
"description": "This is an example configuration file with one Particle platform and 3 accessories, two lights and a temperature sensor. You should replace the access token and device id placeholder with your access token and device id",
"platforms": [
{
"platform": "ParticleIO",
"name": "Particle Devices",
"access_token": "<<access token>>",
"cloud_url": "https://api.particle.io/v1/devices/",
"devices": [
{
"name": "Bedroom Light",
"type": "lightbulb",
"device_id": "<<device id>>"