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

Problem reading Config.json #7

Open
crosspjc opened this issue Oct 18, 2016 · 1 comment
Open

Problem reading Config.json #7

crosspjc opened this issue Oct 18, 2016 · 1 comment

Comments

@crosspjc
Copy link

I had homebridge running successfully with nest and Sonos. I then added homebridge-amazondash. When running with elevated privileges I receive the "There was a problem reading your config.json file.
Please try pasting your config.json file here to validate it: http://jsonlint.com." Error.

My config.json file is as follows and I have restyled all the quote marks in case there were any format issues.

config.json

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

"accessories": [ {
"accessory": "Sonos",
"name": "Living Room Speakers",
"room": "Living Room"
},
{
"accessory": "Sonos",
"name": "Kitchen Speakers",
"room": "Kitchen"
},
{
"accessory": "Sonos",
"name": " Bedroom Speakers",
"room": "Master Bedroom"
}
],

"platforms": [
{

"platform": "Nest",
"token" :
"Xxxxxxx",
"clientId": "xxxxx",
"clientSecret": "xxxx",
"code": "Xxxxxx",

"username" : "Xxxx",
"password" : "xxxxx"
},
{

"platform": "AmazonDash",
"buttons": [
{
"name": "Dash Blue",
"mac": "02:0f:b5:ab:73:c7"
}
]}

]
}

I have used json lint that reports no errors.

Any ideas as this is driving me nuts?!?!!?

@Will711990
Copy link

Hi,

I have the same issue that Crosspjc, but I think it's not a script error !
To use a Dash Button, Homebridge has to always listening your network, and you need to be SuperUser.

If you write $raspberry@pi : homebridge
System will execute Homebridge with config.json file in /.homebridge/

But if you write : $raspberry@pi : sudo homebridge (to listening the network as asked by homebridge)
System will execute Homebridge with the config.json file in /root/.homebridge/

The problem is when I open /root/.homebridge/config.json, it's empty, and if I try to write something in, I can't save it !
I think Homebridge can't read config.json file in /root, so we have a message that there is a mistake in this file.

I'm unsure of this, but it could be an explaination !
So if you have a solution to write in /root, and to have authorization to read in, I'll could try ! :)

thank you !!

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