Domotic+homebridge插件运行不起来,大家帮我看看

博联Broadlink RM Pro/Mini、RM Home、MP1、MP2、SP mini等
版面规则
博联Broadlink RM Pro/Mini、RM Home、MP1、MP2、SP mini等
回复
macongran
帖子: 9
注册时间: 周六 8月 12, 2017 22:27

Domotic+homebridge插件运行不起来,大家帮我看看

帖子 macongran »

大神们,谁能帮帮我,我现在Domotic装好了,也和博联连好的,现在装homebridge插件,可装上运行不了,查遍了,网上所有的帖子,装他们说的方法来做,运行出来报错,大神们帮我看看错在哪了,谢谢大神

pi@raspberrypi:~ $ homebridge
*** WARNING *** The program 'nodejs' 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=libd ns_sd&e=nodejs>
*** WARNING *** The program 'nodejs' 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=libd ns_sd&e=nodejs&f=DNSServiceRegister>
[2017-08-16 21:02:38] Loaded plugin: homebridge-edomoticz
[2017-08-16 21:02:38] Registering platform 'homebridge-edomoticz.eDomoticz'
[2017-08-16 21:02:38] ---
[2017-08-16 21:02:39] Loaded plugin: homebridge-homeassistant
[2017-08-16 21:02:39] Registering platform 'homebridge-homeassistant.HomeAssistant'
[2017-08-16 21:02:39] ---
[2017-08-16 21:02:39] There was a problem reading your config.json file.
[2017-08-16 21:02:39] Please try pasting your config.json file here to validate it: http://jsonlint.com
[2017-08-16 21:02:39]
/usr/lib/node_modules/homebridge/lib/server.js:197
throw err;
^

SyntaxError: Unexpected token   in JSON at position 2
at Object.parse (native)
at Server._loadConfig (/usr/lib/node_modules/homebridge/lib/server.js:191:19)
at new Server (/usr/lib/node_modules/homebridge/lib/server.js:52:38)
at module.exports (/usr/lib/node_modules/homebridge/lib/cli.js:26:16)
at Object.<anonymous> (/usr/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)

运行不起来,大神们帮帮我,我已经研究三四天了,都没弄好,大家帮帮我
luguiyang
帖子: 9
注册时间: 周一 8月 14, 2017 12:25

Re: Domotic+homebridge插件运行不起来,大家帮我看看

帖子 luguiyang »

config.json file错误的,你去https://jsonlint.com检查下。之前我也各种错,后来才知道编辑的时候不要用系统自带的文本软件,还是去https://jsonlint.com编辑,哪怕一个标点符号错了也不行的。
macongran
帖子: 9
注册时间: 周六 8月 12, 2017 22:27

Re: Domotic+homebridge插件运行不起来,大家帮我看看

帖子 macongran »

我的config.json配置文件,我是按网上他们发的帖子配置的,帮我看看

{
    "bridge": {
        "name": "Homebridge",
        "username": "B8:27:EB:CA:7B:C9",
        "port": 51826,
        "pin": "876-54-321"
},
    "description": "Configuration file for (e)xtended Domoticz platform.",
  "platforms": [
    {            
"platform": "eDomoticz",      
      "name": "eDomoticz",            
"server": "127.0.0.1",
       "port": "8080",
       "ssl": 0,            
"roomid": 2,
      "mqtt": 1
        }
    ],    
macongran
帖子: 9
注册时间: 周六 8月 12, 2017 22:27

Re: Domotic+homebridge插件运行不起来,大家帮我看看

帖子 macongran »

luguiyang 写了: 周三 8月 16, 2017 21:31 config.json file错误的,你去https://jsonlint.com检查下。之前我也各种错,后来才知道编辑的时候不要用系统自带的文本软件,还是去https://jsonlint.com编辑,哪怕一个标点符号错了也不行的。
能把你的.homebridge 这个文件夹,备份一份发给我好吗,我替换下试试,这个https://jsonlint.com打不开。
头像
Admin
网站管理员
帖子: 118
注册时间: 周六 2月 25, 2017 12:47
Gender:

Re: Domotic+homebridge插件运行不起来,大家帮我看看

帖子 Admin »

macongran 写了: 周三 8月 16, 2017 21:50 我的config.json配置文件,我是按网上他们发的帖子配置的,帮我看看

{
    "bridge": {
        "name": "Homebridge",
        "username": "B8:27:EB:CA:7B:C9",
        "port": 51826,
        "pin": "876-54-321"
},
    "description": "Configuration file for (e)xtended Domoticz platform.",
  "platforms": [
    {            
"platform": "eDomoticz",      
      "name": "eDomoticz",            
"server": "127.0.0.1",
       "port": "8080",
       "ssl": 0,            
"roomid": 2,
      "mqtt": 1
        }
    ],    
后面的括号呢。。。

代码: 全选

{
    "bridge": {
        "name": "Homebridge",
        "username": "CC:22:3D:E3:CE:30",
        "port": 51826,
        "pin": "031-45-154",
        "manufacturer": "@nfarina",
        "model": "Homebridge",
        "serialNumber": "0.4.20"
    },
    
    "description": "This is an example configuration file.",

    "accessories": [],

    "platforms": [
        {
            "platform": "eDomoticz",
            "name": "eDomoticz",
            "server": "127.0.0.1",
            "port": "8080",
            "ssl": 0,
            "roomid": 2,
            "mqtt": 1
        }
    ]
}
回复