『瀚思彼岸』» 智能家居技术论坛

 找回密码
 立即注册
查看: 4583|回复: 5

Hass.io->plugin shomebridge-broadlink-rm

[复制链接]

2

主题

25

帖子

179

积分

注册会员

Rank: 2

积分
179
金钱
154
HASS币
0
发表于 2018-2-13 00:26:29 | 显示全部楼层 |阅读模式
新手小白一名
有可以指點請教一下的大大嗎?
我在加入開關燈制等一直都很順利,但一加入type"fan"時就出問題了


SyntaxError: Unexpected token { in JSON at position 904
    at JSON.parse (<anonymous>)
    at Server._loadConfig (/usr/lib/node_modules/homebridge/lib/server.js:201:19)
    at new Server (/usr/lib/node_modules/homebridge/lib/server.js:57: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:635:30)
    at Object.Module._extensions..js (module.js:646:10)
    at Module.load (module.js:554:32)
    at tryModuleLoad (module.js:497:12)
    at Function.Module._load (module.js:489:3)
*** 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? ... =DNSServiceRegister>
[2018-2-11 10:20:12] Loaded plugin: homebridge-broadlink-rm
[2018-2-11 10:20:12] Registering platform 'homebridge-broadlink-rm.BroadlinkRM'
[2018-2-11 10:20:12] ---
[2018-2-11 10:20:13] Loaded plugin: homebridge-homeassistant
[2018-2-11 10:20:13] Registering platform 'homebridge-homeassistant.HomeAssistant'
[2018-2-11 10:20:13] ---
[2018-2-11 10:20:13] There was a problem reading your config.json file.
[2018-2-11 10:20:13] Please try pasting your config.json file here to validate it: http://jsonlint.com
[2018-2-11 10:20:13]
/usr/lib/node_modules/homebridge/lib/server.js:207
    throw err;
    ^



回复

使用道具 举报

2

主题

55

帖子

497

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
497
金钱
442
HASS币
0
发表于 2018-2-13 01:58:36 | 显示全部楼层
json格式有问题,去这个网站测试一下:http://jsonlint.com

评分

参与人数 1金钱 +1 收起 理由
27hh + 1 前排合影~

查看全部评分

回复

使用道具 举报

2

主题

52

帖子

245

积分

中级会员

Rank: 3Rank: 3

积分
245
金钱
193
HASS币
0
发表于 2018-2-13 02:36:45 | 显示全部楼层
切磋学习一下
回复

使用道具 举报

40

主题

3056

帖子

1万

积分

超级版主

Nero

Rank: 8Rank: 8

积分
11149
金钱
8042
HASS币
182
发表于 2018-2-13 09:07:18 | 显示全部楼层
admin 发表于 2018-2-13 01:58
json格式有问题,去这个网站测试一下:http://jsonlint.com

活抓admin 一只
Nero
回复

使用道具 举报

0

主题

316

帖子

1732

积分

金牌会员

Rank: 6Rank: 6

积分
1732
金钱
1416
HASS币
0
发表于 2018-2-13 16:25:47 | 显示全部楼层
居然是真的admin我以为搞笑的
回复

使用道具 举报

2

主题

25

帖子

179

积分

注册会员

Rank: 2

积分
179
金钱
154
HASS币
0
 楼主| 发表于 2018-2-13 19:10:42 | 显示全部楼层
admin 发表于 2018-2-13 01:58
json格式有问题,去这个网站测试一下:http://jsonlint.com

我有用jsonlint.com check 過,但show Valid
而且也試過只run 一句也出ERROR, 但其他type "light" "lock" "window-covering"同"air-conditioner"
都沒問題,所以才想請教一下其他前輩

{
        "bridge": {
                "name": "Homebridge",
                "username": "B8:27:EB:32:64:C8",
                "port": 51826,
                "pin": "644-76-145"
        },
        "description": "Homebridge",
        "accessories": [],
        "platforms": [{
                "platform": "BroadlinkRM",
                "name": "Broadlink RM",
                "hideScanFrequencyButton": false,
                "hideLearnButton": false,
                "accessories": [{
                        "name": "MainRoomFan",
                        "type": "fan",
                        "data": {
                                "on": "b2058403180d0c190c19190d0c19180d0c19190d0c19180d180d180d180e0c19180d180d180d0c190c190c19190d0c190c19190d180d180d180d0c190c00012fa134180d0c19180d190d180c0d19180d0c1a0c190c19180d180d0c190c19190d0c19190c0c19190d0b1a180d180d180d180d0c1a180d180d180d0c190d190c18190d0d180c19190c190d180d180d0c190c000133a233180d0c19190d180d180c0d19180d0c1a0c190c19180d180d0c190d18190d0c19180d0c19190c0d19180d180d180d180e0c19180d180d180d0c190c190c19190d0c190c19190c190d0c190c19180d18000115a234180d0c19180d180d190c0c1a180d0c190c190d18190d180d0c190c19180d0c1a180d0c19180d0c19190d180d180d180d0c19190c190d180d0c190c190c19190d0c190c19190c180e0c180d19180d18000119a333180d0c19190c190d180d0c19180d0c1a0c190c19180d180d0c190c19190d0c19190c0c1a180d0c19180d180d180d180e0c19180d180d190c0c190c1a0c19180d0d190c19180d180d0c190d18190d18000126a234180d0c19180d180d180d0c1a180d0c190c190c1a180d180d0c190c19180d0c1a180d0c19180d0c1a180d180d180d180d0d19180d180d180d0d180c190c19190d0c190c19180e180d180d180d0c190c000127a234180d0c19190c190c190c0d19180d0c190d190c19180d180d0c190c19190c0d19180d0d18180e0c19180d180d180d190d0c19180d180d180d0c190d190c19180d0c1a0c19180d180d180d180d0c190c000124a234180d0c19180d180d190c0d19180d0c190c1a0c19180d180d0c190c19190c0d19180d0c19190c0c19190d180d180d180d0c1a180d180d180d0c190c190c19190d0c190c19190d180d180d180d0c190c00012ca234180d0c19180d190c190c0d19180d0c190c190d19180d180d0c190c19180d0c1a180d0c19180d0c19190d180d180d180d0c1a180d180d180d0c190c190c19190d0c190c19180d190c180d190c0c1a0c00012fa234180d0c19180d190c190c0d19180d0c190c1a0c19180d180d0c190c19190d0c19180d0c19190d0c18190d180d180d180d0c1a180d180d180d0c190c190c19190d0c190c1a180d180c190d180d0c190c000127a234180d0c19180d190c180d0d19180d0c190c190d19180d180d0c190c19180d0d19180d0c19190c0d19180d180d180d180d0c1a180d180d180d0c190c190c19190d0c190c19190c190d180d180c0d190c0005dc00000000",
                                "off": "b2009c000c19180d0c1a0c190c19180d180e0b1a0b1a180d0c1a170e0b1a180d0c19180d180e170d180e0c19180d180e170d0c1a0b1a0c19180e0b1a180d0c19180d0c1a170e0b1a17000128a233180e0b1a180d180d180d0c19180d0c1a0c190c19180d180e0b1a0b1a180d0c1a170e0c19180d0c19180d180e170e170e0c19180e170d180e0b1a0b1a0c19180e0b1a180d0c19180d0c19180d0c1a180005dc000000000000000000000000"
                        }
                }]

        }]
}
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Archiver|手机版|小黑屋|Hassbian

GMT+8, 2024-11-23 06:51 , Processed in 0.241369 second(s), 28 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表