homebridge-zway icon indicating copy to clipboard operation
homebridge-zway copied to clipboard

There was a problem reading your config.json file.

Open cappern opened this issue 8 years ago • 1 comments

I followed the instructions;

Created a config.json with: "platforms": [ { "platform": "ZWayServer", "url": "http://192.168.1.32:8083/", "login": "[admin]", "password": "[mypassword]" } ]

Run homebridge

Log:

admin@wave-kit:~/.homebridge $ homebridge *** WARNING *** The program 'node' uses the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node *** WARNING *** The program 'node' called 'DNSServiceRegister()' which is not supported (or only supported partially) in the Apple Bonjour compatibility layer of Avahi. *** WARNING *** Please fix your application to use the native API of Avahi! *** WARNING *** For more information see http://0pointer.de/avahi-compat?s=libdns_sd&e=node&f=DNSServiceRegister [1/21/2017, 3:34:05 PM] Loaded plugin: homebridge-zway [1/21/2017, 3:34:05 PM] Registering accessory 'homebridge-zway.ZWayServer' [1/21/2017, 3:34:05 PM] Registering platform 'homebridge-zway.ZWayServer' [1/21/2017, 3:34:05 PM] --- [1/21/2017, 3:34:05 PM] There was a problem reading your config.json file. [1/21/2017, 3:34:05 PM] Please try pasting your config.json file here to validate it: http://jsonlint.com [1/21/2017, 3:34:05 PM] /usr/local/lib/node_modules/homebridge/lib/server.js:197 throw err; ^

SyntaxError: Unexpected token : in JSON at position 11 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:556:32) at Object.Module._extensions..js (module.js:565:10) at Module.load (module.js:473:32) at tryModuleLoad (module.js:432:12) at Function.Module._load (module.js:424:3)

The linter does not like the 'platforms:' bit of the json file, but if I remove it, homebridge will not start.

Help!

cappern avatar Jan 21 '17 14:01 cappern

The JSON snippet in this plugin's readme only includes the section you add for homebridge-zway...a complete config.json would look like this:

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

    "platforms": [
        {
            "platform": "ZWayServer", 
            "url": "http://192.168.1.32:8083/", 
            "login": "[admin]", 
            "password": "[mypassword]"
        }
    ]
}

Apparently I need to modify the README because a lot of folks are having trouble with this...I think in the beginning people were finding Homebridge first (and its docs) and then finding this plugin, and now it's the reverse.

SphtKr avatar Jan 22 '17 06:01 SphtKr