KraigM / homebridge-nest

Nest plugin for HomeBridge
210 stars 72 forks source link

What is wrong with my config.json file? #183

Open AlexKLMan opened 6 years ago

AlexKLMan commented 6 years ago

Hi there, Every time I run homebridge as Root it says there is an issue: [2018-5-6 02:21:27] There was a problem reading your config.json file.

I visited the website (https://jsonlint.com/) to check what's wrong and it tells me my last line is wrong, but doesn't tell me how to fix it, coudl you help? The file is:

{ "bridge": {         "name": "Homekitbridge",         "username": "CC:22:3D:E3:CE:30",         "port": 51826,         "pin": "123-45-678"     },

"platforms": [ { "platform": "Nest", "clientId": "1bbdaa10-c8e7-49c2-8b5e-628e98de033a", "clientSecret": "cVHuJVQ72nzfFx9jBsRbEl9lK", "code": "3N1MM3J7",         "token": "", "username" : "alex@example.com", "password" : "MyNestPassword" } ]

The site is saying the ] and }is the issue, but not sure how to fix this. I am editing this in Windows Notepad then copying it via PuTTY into a Nano editor, is this the issue? I am quite new to Raspberry PI, I got it because I have always been interested in home automation, so please excuse the newby question :) Thanks!

chrisjshull commented 6 years ago

Just add another } at the end and I think you'll be fine

AlexKLMan commented 6 years ago

Thank you for the feedback, I added it, now it says somethings wrong with line 2, when I ran Homebridge it gives me this error: SyntaxError: Unexpected token   in JSON at position 14
at JSON.parse ()
at Server._loadConfig (/usr/lib/node_modules/homebridge/lib/server.js:201:19

Thank you for your help!

chrisjshull commented 6 years ago

try this:

{
    "bridge": {
        "name": "Homekitbridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "123-45-678"
    },

    "platforms": [{
        "platform": "Nest",
        "clientId": "1bbdaa10-c8e7-49c2-8b5e-628e98de033a",
        "clientSecret": "cVHuJVQ72nzfFx9jBsRbEl9lK",
        "code": "3N1MM3J7",
        "token": "",
        "username": "alex@example.com",
        "password": "MyNestPassword"
    }]
}
AlexKLMan commented 6 years ago

Hey chrisjshull, It works thank you! What was the issue formatting I asume? Being blind must have missed a space or something. I am experiencing a new issue now when I added Homebridge to my Home app, it says: "Additional setup required. Add related accessories with home assistant in the manufacturer’s app"

I tried looking on the Nest app with no luck, also tried using apps such as Insteon+ and Ezzi Home but they can't find any new devices, although Ezzi Home did find my Homebridge, but I don't see any options to get it working, just that Homebridge is running and the version history. Do you know what's wrong now? Thank you so much!

chrisjshull commented 6 years ago

Sorry, can't tell just from that. Try filing a bug report at the new repo: https://github.com/chrisjshull/homebridge-nest/issues/new/choose (be sure to fill out the requested info)

toshibochan commented 6 years ago

Please close the issue if was resolved