PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 43 forks source link

always error!!! #90

Closed ai5051 closed 7 years ago

ai5051 commented 7 years ago

Hi all: My system is Raspberry+Domoticz+Homebridge+homebridge-edomoticz If not't user ~/.homebridge/config.json file ,the homebridge setup is OK! Use the file homebridge setup is always error!! 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 [2017-7-19 15:45:17] Loaded plugin: homebridge-edomoticz [2017-7-19 15:45:17] Registering accessory 'homebridge-edomoticz.eDomoticz' [2017-7-19 15:45:17] Registering platform 'homebridge-edomoticz.eDomoticz' [2017-7-19 15:45:17] --- [2017-7-19 15:45:17] There was a problem reading your config.json file. [2017-7-19 15:45:17] Please try pasting your config.json file here to validate it: http://jsonlint.com [2017-7-19 15:45:17] /usr/nodejs422/lib/node_modules/homebridge/lib/server.js:197 throw err; ^

SyntaxError: Unexpected token   in JSON at position 483 at Object.parse (native) at Server._loadConfig (/usr/nodejs422/lib/node_modules/homebridge/lib/server.js:191:19) at new Server (/usr/nodejs422/lib/node_modules/homebridge/lib/server.js:52:38) at module.exports (/usr/nodejs422/lib/node_modules/homebridge/lib/cli.js:26:16) at Object. (/usr/nodejs422/lib/node_modules/homebridge/bin/homebridge:17:22) at Module._compile (module.js:570:32) at Object.Module._extensions..js (module.js:579:10) at Module.load (module.js:487:32) at tryModuleLoad (module.js:446:12) at Function.Module._load (module.js:438:3)

~/.homebridge/config.json is as follows: { "bridge": { "name": "Homebridge", "username": "b8:27:eb:35:f1:20", "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": "eDomoticz", "name": "eDomoticz", "server": "192.168.1.16", "port": "8080", "ssl": 0, "roomid": 2, "mqtt": 1  }], "accessories": [] } Hoping to get help!!!

rswilem commented 7 years ago

Hi,

Try and overwrite your configuration JSON once again. It looks like you have a 'tab' or non breaking space character in your JSON. Hence this error: SyntaxError: Unexpected token in JSON at position 483.

Position 483 also looks like the 'end' of your file. Try and check the end of your file in particular. Looks like an invisible character.

ai5051 commented 7 years ago

thanks!