tommasomarchionni / homebridge-openHAB

Homebridge plugin for openHAB
Apache License 2.0
49 stars 18 forks source link

Error when running homebridge #46

Open ollisier opened 6 years ago

ollisier commented 6 years ago

When I launch homebridge with the plugin installed i get this error:

[2017-12-18 20:13:17] Loaded plugin: homebridge-openhab [2017-12-18 20:13:17] Registering platform 'homebridge-openhab.openHAB' [2017-12-18 20:13:17] --- [2017-12-18 20:13:17] Loaded config.json with 1 accessories and 1 platforms. [2017-12-18 20:13:17] --- [2017-12-18 20:13:17] Loading 1 platforms... [2017-12-18 20:13:17] [openHAB] Initializing openHAB platform... [2017-12-18 20:13:17] [openHAB] Platform - Fetching OpenHAB devices. [2017-12-18 20:13:17] [openHAB] Platform - Connecting to http://10.0.1.32:8080/rest/sitemaps/home?type=json [2017-12-18 20:13:18] Loading 1 accessories... /usr/lib/node_modules/homebridge/lib/api.js:50 if (name.indexOf('.') == -1) { ^

TypeError: Cannot read property 'indexOf' of undefined at API.accessory (/usr/lib/node_modules/homebridge/lib/api.js:50:12) at Server._loadAccessories (/usr/lib/node_modules/homebridge/lib/server.js:264:42) at Server.run (/usr/lib/node_modules/homebridge/lib/server.js:86:38) at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:40:10) at Object. (/usr/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:660:30) at Object.Module._extensions..js (module.js:671:10) at Module.load (module.js:573:32) at tryModuleLoad (module.js:513:12) at Function.Module._load (module.js:505:3)

this is my config file:

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

"description": "",

"accessories": [
    {
    }
],

"platforms": [
    {
    "platform": "openHAB",
    "name": "openHAB",
    "host": "10.0.1.32",
    "port": "8080",
    "sitemap": "home",
    "useLabelForName": true
    }
]

}

Any idea what the problem is?