ilcato / homebridge-Fibaro-HC2

Homebridge plugin for Fibaro Home Center 2 (and Home Center Lite ...)
Apache License 2.0
66 stars 27 forks source link

Pollerperiod error #133

Closed mbnn closed 5 years ago

mbnn commented 5 years ago
/homebridge/node_modules/homebridge-fibaro-hc2/src/index.ts:113
                let pollerPeriod = this.config.pollerperiod ? parseInt(this.config.pollerperiod) : defaultPollerPeriod;
                                 ^
TypeError: Cannot read property 'pollerperiod' of null
    at new FibaroHC2 (/homebridge/node_modules/homebridge-fibaro-hc2/src/index.ts:113:34)
    at Server._loadDynamicPlatforms (/usr/local/lib/node_modules/homebridge/lib/server.js:347:30)
    at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:88:8)
    at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:45:10)
    at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)

Any idea? New install with homebridge on a Synology NAS.

ilcato commented 5 years ago

Where did you put config.json?

mbnn commented 5 years ago

In the default path where the other Homebridge plugin also is:

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154"
    },
    "description": "This is an example configuration file. You can use this as a template for creating your own configuration file containing devices you actually own.",
    "accessories": [],
    "platforms": [
        {
            "platform": "homebridge-plex-sensors.Plex",
            "sensors": [
                {
                    "name": "Plex",
                    "users": [
                        "username"
                    ]
                },
                {
                    "platform": "FibaroHC2",
                    "name": "FibaroHC2",
                    "host": "192.168.1.46",
                    "username": "user",
                    "password": "pass",
                    "securitysystem": "disabled",
                    "switchglobalvariables": ""
                }
            ]
        }
    ]
}

FYI: https://github.com/oznu/homebridge-syno-spk This works fine for everything except this Fibaro module which keeps throwing that error up.

ilcato commented 5 years ago

It seems to me that you not closing correctly the ] for the property sensors for the plugin Plex.

mbnn commented 5 years ago

I'm a noob :P Placed the config wrong, my bad! It's fixed now :)