KhaosT / homebridge-amazondash

Amazon Dash Button plugin for Homebridge
58 stars 14 forks source link

There was a problem reading your config.json file #11

Closed saqoos closed 7 years ago

saqoos commented 7 years ago

hello there, It is my first time using node js, can anyone help me with this issue. when i type homebridge on my terminal i get this message:

[12/6/2016, 1:30:09 PM] Loaded plugin: homebridge-harmonyhub [12/6/2016, 1:30:09 PM] Registering platform 'homebridge-harmonyhub.HarmonyHub' [12/6/2016, 1:30:09 PM] --- [12/6/2016, 1:30:09 PM] There was a problem reading your config.json file. [12/6/2016, 1:30:09 PM] Please try pasting your config.json file here to validate it: http://jsonlint.com [12/6/2016, 1:30:09 PM] /usr/local/lib/node_modules/homebridge/lib/server.js:197 throw err; ^

SyntaxError: Unexpected token “ at Object.parse (native) at Server._loadConfig (/usr/local/lib/node_modules/homebridge/lib/server.js:191:19) 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) at Function.Module._load (module.js:300:12) at Function.Module.runMain (module.js:441:10) at startup (node.js:139:18) at node.js:974:3

I have succesfully installed homebridge and and harmonyhub plug ins as u can see. And i have placed my config.json file in /usr/local/lib/node_modules/homebridge and i have validated the file on http://jsonlint.com.

my config.json file:

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

"platforms": [{
    "platform": "HarmonyHub",
    "name": "Harmony Hub"
}]

}

I cant find the issue here, if anyone had this before can you please help me.

kolossboss commented 7 years ago

I think this is the wrong repository! But if you installed Homebridge with user pi, the config.json is located /home/pi/.homebridge

saqoos commented 7 years ago

hey there thanks for the fast reply, i went to /home/pi/.homebridge there are no files there, should i move my node_modules there ?

just to clarify Im installing homebridge on macos Sierra and using atom for text edit. my homebridge file is in node_modules (exact path /usr/local/lib/node_modules/).

kolossboss commented 7 years ago

hey ok sorry I was to fast :-) On macos normally the config is located ~/.homebridge/config.json Did you follow this installation

https://github.com/nfarina/homebridge/wiki/Install-Homebridge-on-OSX

Your config looks right and homebridge tried to load the plugin. Maybe you ask in the homebridge repository and not amazon dash ^^ https://github.com/nfarina/homebridge

saqoos commented 7 years ago

sorry i have just realised, im gona post it there now.

thanks for your response