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 #65

Open
GasCZ opened this issue Jan 13, 2018 · 6 comments
Open

problem reading config.json #65

GasCZ opened this issue Jan 13, 2018 · 6 comments

Comments

@GasCZ
Copy link

GasCZ commented Jan 13, 2018

Hello,

everytime I try to start homebridge I get "There was a problem reading your config.json file." error.

I use code as you recommended -
"platforms": [
{
"platform": "netatmo",
"name": "netatmo platform",
"ttl": 10,
"auth": {
"client_id": "XXXXX Create at https://dev.netatmo.com/",
"client_secret": "XXXXX Create at https://dev.netatmo.com/",
"username": "your netatmo username",
"password": "your netatmo password"
}
}
],

When I verified this .json on jsonlint.com site, I got another error "Error: Parse error on line 1".
So there must be something wrong with the code. I use Atom text editor to edit config.json.

Can you help me with this problem please?

Thank you in advance!

@planetk
Copy link
Owner

planetk commented Jan 14, 2018

Hi,

did you keep the rest of the config file as well? (The bridge and description entry?)
Does jsonlint tell you anything else about the reason?
you might want to remove all the content leaving just the curly brackets and then paste the inner content step by step. Be aware of the ","

Does your password contain quotation marks? if so, you need to escape them, or even better use a different password...

Did you use a program like MS-Word, Openoffice, Pages for editing? These program tend to replace Qutation marks with styled versions, which are not allowed in json.

Hope this helps...

@S474N
Copy link

S474N commented Jan 19, 2018

This is correct sample code with { and }:

{ 
  "platforms": [
        {
            "platform": "netatmo",
            "name": "netatmo platform",
            "ttl": 10,
            "auth": {
    	        "client_id": "XXXXX Create at https://dev.netatmo.com/",
                "client_secret": "XXXXX Create at https://dev.netatmo.com/",
                "username": "your netatmo username",
                "password": "your netatmo password"
            }
        }
    ]
}

@GasCZ
Copy link
Author

GasCZ commented Jan 21, 2018

@S474N Thank you, now the file is validated but the issue remains the same.

I use Atom editor, which was recommended for this purpose.

I'm really confused, any ideas?

@S474N
Copy link

S474N commented Jan 21, 2018

It's only platforms code, you must have also section "bridge". See my example at down on page:
http://www.s474n.com/apple-homekit-homebridge-netatmo/

@GasCZ
Copy link
Author

GasCZ commented Feb 9, 2018

@S474N Děkuji za odpověď a pomoc. Dovolím si upozornit, že ve vzorovém JSON file na vaší stránce je na řádku 21 čárka navíc mezi závorkami. Po jejím odstranění je JSON file validován a funkční a díky tomu se mi podařilo zprovoznit netatmo na homebridge. Ještě jednou díky za pomoc.

@S474N
Copy link

S474N commented Feb 9, 2018

Mas pravdu, vzniklo to vykopirovanim z funkcniho souboru, kde mam pochopitelne vice sekci v konfiguraku. Hned jsem to odstranil. Diky za zpetnou odezvu.

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

3 participants