Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dash Button // No device to listen // Cannot read property 'username' of undefined #8

Open
timloehrs opened this issue Nov 7, 2016 · 2 comments

Comments

@timloehrs
Copy link

timloehrs commented Nov 7, 2016

Hey Guys,
got the following problem on setting up my dash button on homebridge:

After installing the plugin, and updating the Config.json, I got two kind of errors - depending wether I start homebridge with or without sudo.

without sudo:
Error: Error: No devices to listen at create_session (/usr/local/lib/node_modules/homebridge-amazondash/node_modules/node-dash-button/index.js:16:15) at register (/usr/local/lib/node_modules/homebridge-amazondash/node_modules/node-dash-button/index.js:29:24) at DashPlatform.didFinishLaunching (/usr/local/lib/node_modules/homebridge-amazondash/index.js:54:17) at emitNone (events.js:67:13) at API.emit (events.js:166:7) at Server.run (/usr/local/lib/node_modules/homebridge/lib/server.js:90:13) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:40:10) at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10)

with sudo:
TypeError: Cannot read property 'username' of undefined at Server._loadConfig (/usr/local/lib/node_modules/homebridge/lib/server.js:199:31) at new Server (/usr/local/lib/node_modules/homebridge/lib/server.js:49:23) at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:26:16) at Object.<anonymous> (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:410:26) at Object.Module._extensions..js (module.js:417:10) at Module.load (module.js:344:32) at Function.Module._load (module.js:301:12) at Function.Module.runMain (module.js:442:10) at startup (node.js:136:18)

Homebridge itself seems to work, at least my iphone recognized it and connect it as a new device.

My Config file looks like this:
{
"bridge": {
"name": "Homebridge",
"username": "CC:22:3D:E3:CE:30",
"port": 51826,
"pin": "031-45-154"
},

"platforms":{
"platform": "AmazonDash",
"buttons": [
{
"name": "Dash Blue",
"mac": "mac-adress-of-my-dash"
}
]
}
}

@KhaosT
Copy link
Owner

KhaosT commented Nov 7, 2016

This is strange, homebridge tries to read configuration file and then crashed because there is no username field. Are you sure you placed the config.json in the right place?

@timloehrs
Copy link
Author

I guess so, everytime I changed the parameters in the config file to something strange, I got a complete error of homebridge. Once I undo this, it kind of loads normal again.

this is the path: ~/.homebridge/config.json

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

No branches or pull requests

2 participants