Problem installing custom plugin
Hi all

I've installed raspian homebridge image and it's working perfectly. But I'm having an issues getting it to recognise my plugin and it's also failing to recognise that rpio module is installed.

This is what the server is showing:

```
[08/12/2020, 21:34:14] [HB Supervisor] Restarting Homebridge...
[08/12/2020, 21:34:14] [HB Supervisor] Starting Homebridge with extra flags: -I
[08/12/2020, 21:34:14] [HB Supervisor] Started Homebridge v1.1.6 with PID: 2386
[08/12/2020, 21:34:21] Loaded config.json with 1 accessories and 1 platforms.
[08/12/2020, 21:34:22] ---
[08/12/2020, 21:34:29] Loaded plugin: homebridge-config-ui-x@4.35.0
[08/12/2020, 21:34:29] Registering platform 'homebridge-config-ui-x.config'
[08/12/2020, 21:34:29] ---
[08/12/2020, 21:34:29] ====================
[08/12/2020, 21:34:29] ERROR LOADING PLUGIN homebridge-treehouse:
[08/12/2020, 21:34:29] Error: Cannot find module 'rpio'
Require stack:
- /home/pi/raspberrypi-automation/accessories/TreeHouse/relay.js
- /usr/local/lib/node_modules/homebridge/lib/plugin.js
- /usr/local/lib/node_modules/homebridge/lib/pluginManager.js
- /usr/local/lib/node_modules/homebridge/lib/api.js
- /usr/local/lib/node_modules/homebridge/lib/server.js
- /usr/local/lib/node_modules/homebridge/lib/cli.js
- /usr/local/lib/node_modules/homebridge/bin/homebridge
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:880:15)
    at Function.Module._load (internal/modules/cjs/loader.js:725:27)
    at Module.require (internal/modules/cjs/loader.js:952:19)
    at require (internal/modules/cjs/helpers.js:88:18)
    at Object.<anonymous> (/home/pi/raspberrypi-automation/accessories/TreeHouse/relay.js:1:12)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
    at Function.Module._load (internal/modules/cjs/loader.js:769:14)
    at Module.require (internal/modules/cjs/loader.js:952:19)
[08/12/2020, 21:34:29] ====================
[08/12/2020, 21:34:29] Loading 1 platforms...
[08/12/2020, 21:34:29] [Config] Initializing config platform...
[08/12/2020, 21:34:29] [Config] Running in Service Mode
[08/12/2020, 21:34:29] Loading 1 accessories...
[08/12/2020, 21:34:29] Error loading accessory requested in your config.json at position 1
[08/12/2020, 21:34:31] Error: The requested accessory 'Relay' was not registered by any plugin.
    at PluginManager.getPluginForAccessory (/usr/local/lib/node_modules/homebridge/src/pluginManager.ts:198:15)
    at /usr/local/lib/node_modules/homebridge/src/server.ts:347:37
    at Array.forEach (<anonymous>)
    at Server._loadAccessories (/usr/local/lib/node_modules/homebridge/src/server.ts:330:29)
    at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:156:12)
    at cli (/usr/local/lib/node_modules/homebridge/src/cli.ts:80:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (internal/modules/cjs/loader.js:1063:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
    at Module.load (internal/modules/cjs/loader.js:928:32)
[08/12/2020, 21:34:31] Got SIGTERM, shutting down Homebridge...
[08/12/2020, 21:34:36] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[08/12/2020, 21:34:41] [HB Supervisor] Restarting Homebridge...
[08/12/2020, 21:34:41] [HB Supervisor] Starting Homebridge with extra flags: -I
[08/12/2020, 21:34:41] [HB Supervisor] Started Homebridge v1.1.6 with PID: 2414
[08/12/2020, 21:34:49] Loaded config.json with 1 accessories and 1 platforms.
[08/12/2020, 21:34:49] ---
```

I installed rpio with the following and my own module in similar way.

```
$ sudo chown -R $USER /usr/local/lib/node_modules
$ npm install -g gpio
+ gpio@0.2.10
added 1 package from 1 contributor in 4.327s

$ npm -g install
+ homebridge-treehouse@1.0.0
added 1 package from 1 contributor in 2.464s
```
My home bridge.config is 

```
{
    "bridge": {
        "name": "Homebridge A48A",
        "username": "0E:8C:D0:CE:A4:8A",
        "port": 51226,
        "pin": "638-52-781"
    },
    "accessories": [
        {
            "accessory": "Relay",
            "name": "Treehouse Light"
        }
    ],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "platform": "config"
        }
    ]
}
```

Source code for the custom plugin 

```
var rpio = require('rpio');

module.exports = (api) => {
    api.registerAccessory('Relay', LightbulbAccessory);
  };
  
  class LightbulbAccessory {
  
    constructor(log, config, api) {
        this.log = log;
        this.config = config;
        this.api = api;
  
        this.Service = this.api.hap.Service;
        this.Characteristic = this.api.hap.Characteristic;
  
        // extract name from config
        this.name = config.name;
  
        // create a new Lightbulb service
        this.service = new this.Service(this.Service.Lightbulb);
  
        // create handlers for required characteristics
        this.service.getCharacteristic(this.Characteristic.On)
          .on('get', this.handleOnGet.bind(this))
          .on('set', this.handleOnSet.bind(this));
        
        // your accessory must have an AccessoryInformation service
        this.informationService = new this.api.hap.Service.AccessoryInformation()
            .setCharacteristic(this.api.hap.Characteristic.Manufacturer, "Custom")
            .setCharacteristic(this.api.hap.Characteristic.Model, "Treehouse Relay")
            .setCharacteristic(this.api.hap.Characteristic.SerialNumber, "1.0");
    }
  
    getServices() {
        return [
          this.informationService,
          this.switchService,
        ];
    }

    /**
     * Handle requests to get the current value of the "On" characteristic
     */
    handleOnGet(callback) {
        console.log("Reading Light State");
        var state = rpio.read(11);
        var status = state == 0 ? true : false;
        callback(null, status);
    }
  
    /**
     * Handle requests to set the "On" characteristic
     */
    handleOnSet(state, callback) {
        console.log("Setting Light State");
        rpio.write(11, Number(state));
        callback(null);
    }
  
  }
```

**Environment:**

* **Homebridge Raspberry Pi Image Version**: v1.0.16
* **Node.js Version**: 14.15.1
* **NPM Version**: 6.14.9
* **Homebridge Version**: v1.1.6
* **Homebridge Config UI X Plugin Version**: v4.35.0

Thanks for any help. Much appreciated.a
