Skip to content
This repository has been archived by the owner on Mar 5, 2022. It is now read-only.

Cannot read property 'indexOf' of undefined #47

Open
theloading123 opened this issue Aug 20, 2018 · 1 comment
Open

Cannot read property 'indexOf' of undefined #47

theloading123 opened this issue Aug 20, 2018 · 1 comment

Comments

@theloading123
Copy link

Everytime i try to launch "Homebridge" this message shows up, and i don't know what to do. Please help!!
i only have these plugins:
cmd-switch2
ps4-waker

Does anybody knows what to do?

C:\WINDOWS\system32>homebridge
[2018-8-19 16:52:36] Loaded plugin: homebridge-cmdswitch2
[2018-8-19 16:52:36] Registering platform 'homebridge-cmdswitch2.cmdSwitch2'
[2018-8-19 16:52:36] ---
[2018-8-19 16:52:36] Loaded config.json with 1 accessories and 1 platforms.
[2018-8-19 16:52:36] ---
[2018-8-19 16:52:36] Loading 1 platforms...
[2018-8-19 16:52:36] [CMD Switch] Initializing cmdSwitch2 platform...
[2018-8-19 16:52:36] Loading 1 accessories...
C:\Users*********\AppData\Roaming\npm\node_modules\homebridge\lib\api.js:50
if (name.indexOf('.') == -1) {
^

TypeError: Cannot read property 'indexOf' of undefined
at API.accessory (C:\Users*\AppData\Roaming\npm\node_modules\homebridge\lib\api.js:50:12)
at Server._loadAccessories (C:\Users*\AppData\Roaming\npm\node_modules\homebridge\lib\server.js:264:42)
at Server.run (C:\Users*\AppData\Roaming\npm\node_modules\homebridge\lib\server.js:86:38)
at module.exports (C:\Users***\AppData\Roaming\npm\node_modules\homebridge\lib\cli.js:40:10)
at Object. (C:\Users*********\AppData\Roaming\npm\node_modules\homebridge\bin\homebridge:17:22)
at Module._compile (module.js:643:30)
at Object.Module._extensions..js (module.js:654:10)
at Module.load (module.js:556:32)
at tryModuleLoad (module.js:499:12)
at Function.Module._load (module.js:491:3)

here its my config.json

{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 53892,
"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": [{}],

"platforms": [{
"platform": "cmdSwitch2",
"name": "CMD Switch",
"switches": [{
"name": "PS4",
"on_cmd": "ps4-waker",
"off_cmd": "ps4-waker standby",
"state_cmd": "ps4-waker search | grep -i '200Ok'",
"polling": true,
"interval": 5,
"manufacturer": "Sony Corporation",
"model": "CUH-1115A",
"serial": "XXXXXXXXXXX"
}]
}]

@theloading123
Copy link
Author

ps: when i remove cmdswitch off, homebridge starts normally

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant