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

Sudo Homebridge doesn't work #14

Open
Will711990 opened this issue Feb 15, 2017 · 5 comments
Open

Sudo Homebridge doesn't work #14

Will711990 opened this issue Feb 15, 2017 · 5 comments

Comments

@Will711990
Copy link

Will711990 commented Feb 15, 2017

Hi,

I need your help, I installed Homebridge and updated my config.json file.
After, I write : homebridge
All my devices are detected and it's nice (so there isn't mistake in my file)

Now I wanna use my DashButton, but to use homebridge-amazondash service, I need to write sudo homebridge.
At this moment, it tells me there is a mistake in my config.json (but I know it's wrong because it works with homebridge.
It tells me too it can't read the file, so I supposed that I've got a user's right problems...

But I don't know how to do... so I can't use my DashButtons...
Do you have a solution please ?

Thank you

PS : I'm running HomeBridge on a RPi 3

`There was a problem reading your config.json file.
[2/15/2017, 9:06:13 PM] Please try pasting your config.json file here to validate it: http://jsonlint.com
[2/15/2017, 9:06:13 PM]
/usr/local/lib/node_modules/homebridge/lib/server.js:197
throw err;
^

Error: EISDIR: illegal operation on a directory, read
at Error (native)
at Object.fs.readSync (fs.js:603:19)
at Object.fs.readFileSync (fs.js:438:24)
at Server._loadConfig (/usr/local/lib/node_modules/homebridge/lib/server.js:191:28)
at new Server (/usr/local/lib/node_modules/homebridge/lib/server.js:52:38)
at module.exports (/usr/local/lib/node_modules/homebridge/lib/cli.js:26:16)
at Object. (/usr/local/lib/node_modules/homebridge/bin/homebridge:17:22)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)`

@Fienberber
Copy link

I have the exact same problem
Dit you find a solution ?

@vsidlu
Copy link

vsidlu commented Aug 14, 2017

I strugled with same problem. Homebridge worked perfectly with other plugins like - wemo - ifttt. After adding plugin homebridge-amazondash its suddenly hangs on. I realized that there is problem with privileges. The thing that helped me is -

edit file homebridge.service

sudo nano /etc/systemd/system/homebridge.service

Change User=pi to User=root

[Unit]
Description=Node.js HomeKit Server
After=syslog.target

[Service]
Type=simple
User=pi
EnvironmentFile=/etc/default/homebridge
ExecStart=/usr/lib/node_modules/homebridge/bin/homebridge $HOMEBRIDGE_OPTS
RestartSec=10
KillMode=process

[Install]
WantedBy=multi-user.target

I hope it helps you!

@LazzR1
Copy link

LazzR1 commented Aug 20, 2017

I'm having the same issue. but I don't have this file: /etc/systemd/system/homebridge.service

@vsidlu
Copy link

vsidlu commented Aug 21, 2017

I used this instruction to set up Homebride = https://docs.google.com/document/d/1k2u9Id4O4rO0v-7j8-3Yb1JuDZGAVS8ltS4cu-71U9w/edit

@Fienberber
Copy link

I managed to make it work by simply edit the config.json in the root file in /root/.homebridge.
My two config.json are the same I don't know if you can only set up the dash button in the root.
But it works for me.

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

4 participants