sbehrends / homebridge-bgh-smart

BGH Smart Control plugin for homebridge
20 stars 4 forks source link

Issue starting up Homebridge with the plugin installed #2

Closed ramirocaballero closed 6 years ago

ramirocaballero commented 6 years ago

Hi,

Once I have installed and setup this plugin properly, I have had issues getting HomeBridge to start. This is the error I am getting:

[2/12/2018, 11:19:21 PM] ====================
[2/12/2018, 11:19:21 PM] ERROR LOADING PLUGIN homebridge-bgh-smart:
[2/12/2018, 11:19:21 PM] SyntaxError: Unexpected token {
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:373:25)
    at Object.Module._extensions..js (module.js:416:10)
    at Module.load (module.js:343:32)
    at Function.Module._load (module.js:300:12)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge-bgh-smart/index.js:21:13)
    at Module._compile (module.js:409:26)
    at Object.Module._extensions..js (module.js:416:10)
[2/12/2018, 11:19:21 PM] ====================

Seems to be an issue with the plugin itself..

sbehrends commented 6 years ago

Hi @ramirocaballero could you check your node version?

Can't find any issues at homebridge-bgh-smart/index.js:21:13

Please check your node version and Homebridge installation.

Your config file should look like this

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },

    "description": "This is an example configuration file with one fake accessory and one fake platform. You can use this as a template for creating your own configuration file containing devices you actually own.",

    "accessories": [
        {
          "accessory": "BGH-Smart",
          "name": "Accesory Name",
          "email": "email@domain.com",
          "password": "password",
          "deviceName": "Device name in Solidmation",
          "homeId": "12345",
          "deviceId": "12345"
        }
    ]
}

And when starting Homebridge will look like this.

$ ~/ homebridge
[2/14/2018, 10:56:12 PM] Loaded plugin: homebridge-bgh-smart
[2/14/2018, 10:56:12 PM] Registering accessory 'homebridge-bgh-smart.BGH-Smart'
[2/14/2018, 10:56:12 PM] ---
[2/14/2018, 10:56:12 PM] Loaded config.json with 1 accessories and 0 platforms.
[2/14/2018, 10:56:12 PM] ---
[2/14/2018, 10:56:12 PM] Loading 1 accessories...
[2/14/2018, 10:56:12 PM] [Accesory Name] Initializing BGH-Smart accessory...
[2/14/2018, 10:56:12 PM] [Accesory Name] Accesory Name