iobroker的ham错误解决方法指引

为了方便大家解决使用ham中产生的问题,请认真看本指南。

同时也把自己遇到的问题,按照指引贴在本帖之下

首先对照教程核对自己的ham设置有没有问题

三个关键:

1.选择本地模式;

2.添加正确的npm模块名称;

3.勾选npm更新

其次检查ham里面的配置文件是否有问题

两个关键点

  1. bridge里面的"name"、“username”、 "port"都应该是独一无二的,不能跟其他的ham里面的配置文件相同,
    2.如果用花神的格式化工具,请点击拷贝那个按钮复制配置文件,不能直接复制代码,这样会导致格式错乱。

    再次,学会查看日志。具体步骤如图所示,如果有错误,是会报红字的

最后,如果报错,没有桥接进入homekit,请检查自己的步骤是否遗漏。还是解决不了,请把自己的ham主要设置、配置文件、日志等三个页面的完整截图在本帖留言。


一直没发设置,更新是打了勾保存的。设备是电视盒子

你的加湿器是哪个型号,截图看看?

你要给出设备的型号,有可能是设备型号跟配置文件不对应。


这里有型号,要对应


上面这款,我猜配置应该是这样的

{
    "bridge": {
        "name": "加湿器中枢",
        "username": "54:52:00:67:C0:D6",
        "port": 56231,
        "pin": "251-04-340"
    },
    "platforms": [
        {
            "accessories": [
                {
                    "accessory": "MiHumidifier",
                    "name": "MiHumidifier",
                    "ip": "192.168.31.222",
                    "token": "123456789",
                    "showTemperatureDisable": false,
                    "showTemperatureSensorName": "加湿器的温度"
                }
            ]
        }
    ]
}

ca1,我猜会不会是这一款?

{
    "bridge": {
        "name": "加湿器中枢",
        "username": "54:52:00:67:C0:D6",
        "port": 56231,
        "pin": "251-04-340"
    },
    "platforms": [
        {
            "accessories": [
                {
                    "accessory": "MiHumidifier",
                    "name": "MiHumidifier",
                    "ip": "192.168.31.222",
                    "token": "123456789",
                    "showTemperatureDisable": false,
                    "showTemperatureSensorName": "加湿器的温度"
                    "model": "ca1",
                }
            ]
        }
    ]
}

不行呀加湿器配置,错误怎么解决!

ham.5 2020-01-06 01:08:10.611 info terminating
ham.5 2020-01-06 01:08:10.599 warn Exception: TypeError: Cannot read property ‘indexOf’ of undefined
ham.5 2020-01-06 01:08:10.592 info cleaned everything up…
ham.5 2020-01-06 01:08:10.589 error at Manager.ondata (/opt/iobroker/node_modules/socket.io-client/lib/manager.js:322:16)
ham.5 2020-01-06 01:08:10.589 error at Decoder.add (/opt/iobroker/node_modules/socket.io-parser/index.js:246:12)
ham.5 2020-01-06 01:08:10.589 error at Decoder.Emitter.emit (/opt/iobroker/node_modules/component-emitter/index.js:134:20)
ham.5 2020-01-06 01:08:10.589 error at Decoder. (/opt/iobroker/node_modules/component-bind/index.js:21:15)
ham.5 2020-01-06 01:08:10.589 error at Manager.ondecoded (/opt/iobroker/node_modules/socket.io-client/lib/manager.js:332:8)
ham.5 2020-01-06 01:08:10.589 error at Manager.Emitter.emit (/opt/iobroker/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20)
ham.5 2020-01-06 01:08:10.589 error at Manager. (/opt/iobroker/node_modules/component-bind/index.js:21:15)
ham.5 2020-01-06 01:08:10.589 error at Socket.onpacket (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:236:12)
ham.5 2020-01-06 01:08:10.589 error at Socket.onack (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:312:9)
ham.5 2020-01-06 01:08:10.589 error at Socket.that.objects.getObjectView (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:2695:25)
ham.5 2020-01-06 01:08:10.589 error at adapter.getDevices (/opt/iobroker/node_modules/iobroker.ham/main.js:177:27)
ham.5 2020-01-06 01:08:10.589 error at loadExistingAccessories (/opt/iobroker/node_modules/iobroker.ham/main.js:276:39)
ham.5 2020-01-06 01:08:10.589 error at Object.start (/opt/iobroker/node_modules/iobroker.ham/lib/global-handler.js:281:12)
ham.5 2020-01-06 01:08:10.589 error at Server.run (/opt/iobroker/node_modules/iobroker.ham/node_modules/homebridge/lib/server.js:90:36)
ham.5 2020-01-06 01:08:10.589 error at Server._loadPlatforms (/opt/iobroker/node_modules/iobroker.ham/node_modules/homebridge/lib/server.js:327:45)
ham.5 2020-01-06 01:08:10.589 error at API.platform (/opt/iobroker/node_modules/iobroker.ham/node_modules/homebridge/lib/api.js:120:12)
ham.5 2020-01-06 01:08:10.589 error TypeError: Cannot read property ‘indexOf’ of undefined
ham.5 2020-01-06 01:08:10.588 error uncaught exception: Cannot read property ‘indexOf’ of undefined
ham.5 2020-01-06 01:08:04.445 info No additional Libraries to install …
ham.5 2020-01-06 01:08:04.395 info found 0 vulnerabilities
ham.5 2020-01-06 01:08:04.390 info updated 1 package and audited 6815 packages in 24.333s
ham.5 2020-01-06 01:08:04.390 info + homebridge@0.4.50
ham.5 2020-01-06 01:07:37.589 info npm install homebridge@0.4.50 --production --prefix “/opt/iobroker/node_modules/iobroker.ham” (System call)
ham.5 2020-01-06 01:07:37.587 info Need to install/update homebridge@0.4.50
ham.5 2020-01-06 01:07:37.534 info starting. Version 1.1.2 in /opt/iobroker/node_modules/iobroker.ham, node: v8.16.0
ham.5 2020-01-06 01:07:06.124 warn Exception: TypeError: Cannot read property ‘indexOf’ of undefined
ham.5 2020-01-06 01:07:06.118 info cleaned everything up…
ham.5 2020-01-06 01:07:06.116 error at Manager.ondata (/opt/iobroker/node_modules/socket.io-client/lib/manager.js:322:16)
ham.5 2020-01-06 01:07:06.116 error at Decoder.add (/opt/iobroker/node_modules/socket.io-parser/index.js:246:12)
ham.5 2020-01-06 01:07:06.116 error at Decoder.Emitter.emit (/opt/iobroker/node_modules/component-emitter/index.js:134:20)
ham.5 2020-01-06 01:07:06.116 error at Decoder. (/opt/iobroker/node_modules/component-bind/index.js:21:15)
ham.5 2020-01-06 01:07:06.116 error at Manager.ondecoded (/opt/iobroker/node_modules/socket.io-client/lib/manager.js:332:8)
ham.5 2020-01-06 01:07:06.116 error at Manager.Emitter.emit (/opt/iobroker/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20)
ham.5 2020-01-06 01:07:06.116 error at Manager. (/opt/iobroker/node_modules/component-bind/index.js:21:15)
ham.5 2020-01-06 01:07:06.116 error at Socket.onpacket (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:236:12)
ham.5 2020-01-06 01:07:06.116 error at Socket.onack (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:312:9)
ham.5 2020-01-06 01:07:06.116 error at Socket.that.objects.getObjectView (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:2695:25)
ham.5 2020-01-06 01:07:06.116 error at adapter.getDevices (/opt/iobroker/node_modules/iobroker.ham/main.js:177:27)
ham.5 2020-01-06 01:07:06.116 error at loadExistingAccessories (/opt/iobroker/node_modules/iobroker.ham/main.js:276:39)
ham.5 2020-01-06 01:07:06.116 error at Object.start (/opt/iobroker/node_modules/iobroker.ham/lib/global-handler.js:281:12)
ham.5 2020-01-06 01:07:06.116 error at Server.run (/opt/iobroker/node_modules/iobroker.ham/node_modules/homebridge/lib/server.js:90:36)
ham.5 2020-01-06 01:07:06.116 error at Server._loadPlatforms (/opt/iobroker/node_modules/iobroker.ham/node_modules/homebridge/lib/server.js:327:45)
ham.5 2020-01-06 01:07:06.116 error at API.platform (/opt/iobroker/node_modules/iobroker.ham/node_modules/homebridge/lib/api.js:120:12)
ham.5 2020-01-06 01:07:06.116 error TypeError: Cannot read property ‘indexOf’ of undefined
ham.5 2020-01-06 01:07:06.114 error uncaught exception: Cannot read property ‘indexOf’ of undefined
ham.5 2020-01-06 01:07:00.160 info No additional Libraries to install …
ham.5 2020-01-06 01:07:00.123 info found 0 vulnerabilities
ham.5 2020-01-06 01:07:00.104 info updated 1 package and audited 6815 packages in 24.081s
ham.5 2020-01-06 01:07:00.104 info + homebridge@0.4.50
ham.5 2020-01-06 01:06:33.601 info npm install homebridge@0.4.50 --production --prefix “/opt/iobroker/node_modules/iobroker.ham” (System call)
ham.5 2020-01-06 01:06:33.599 info Need to install/update homebridge@0.4.50
ham.5 2020-01-06 01:06:33.546 info starting. Version 1.1.2 in /opt/iobroker/node_modules/iobroker.ham, node: v8.16.0
ham.5 2020-01-06 01:06:02.130 info terminating
ham.5 2020-01-06 01:06:02.116 warn Exception: TypeError: Cannot read property ‘indexOf’ of undefined
ham.5 2020-01-06 01:06:02.109 info cleaned everything up…
ham.5 2020-01-06 01:06:02.107 error at Manager.ondata (/opt/iobroker/node_modules/socket.io-client/lib/manager.js:322:16)
ham.5 2020-01-06 01:06:02.107 error at Decoder.add (/opt/iobroker/node_modules/socket.io-parser/index.js:246:12)
ham.5 2020-01-06 01:06:02.107 error at Decoder.Emitter.emit (/opt/iobroker/node_modules/component-emitter/index.js:134:20)
ham.5 2020-01-06 01:06:02.107 error at Decoder. (/opt/iobroker/node_modules/component-bind/index.js:21:15)
ham.5 2020-01-06 01:06:02.107 error at Manager.ondecoded (/opt/iobroker/node_modules/socket.io-client/lib/manager.js:332:8)
ham.5 2020-01-06 01:06:02.107 error at Manager.Emitter.emit (/opt/iobroker/node_modules/socket.io-client/node_modules/component-emitter/index.js:133:20)
ham.5 2020-01-06 01:06:02.107 error at Manager. (/opt/iobroker/node_modules/component-bind/index.js:21:15)
ham.5 2020-01-06 01:06:02.107 error at Socket.onpacket (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:236:12)
ham.5 2020-01-06 01:06:02.107 error at Socket.onack (/opt/iobroker/node_modules/socket.io-client/lib/socket.js:312:9)
ham.5 2020-01-06 01:06:02.107 error at Socket.that.objects.getObjectView (/opt/iobroker/node_modules/iobroker.js-controller/lib/adapter.js:2695:25)
ham.5 2020-01-06 01:06:02.107 error at adapter.getDevices (/opt/iobroker/node_modules/iobroker.ham/main.js:177:27)
ham.5 2020-01-06 01:06:02.107 error at loadExistingAccessories (/opt/iobroker/node_modules/iobroker.ham/main.js:276:39)
ham.5 2020-01-06 01:06:02.107 error at Object.start (/opt/iobroker/node_modules/iobroker.ham/lib/global-handler.js:281:12)
ham.5 2020-01-06 01:06:02.107 error at Server.run (/opt/iobroker/node_modules/iobroker.ham/node_modules/homebridge/lib/server.js:90:36)
ham.5 2020-01-06 01:06:02.107 error at Server._loadPlatforms (/opt/iobroker/node_modules/iobroker.ham/node_modules/homebridge/lib/server.js:327:45)
ham.5 2020-01-06 01:06:02.107 error at API.platform (/opt/iobroker/node_modules/iobroker.ham/node_modules/homebridge/lib/api.js:120:12)
ham.5 2020-01-06 01:06:02.107 error TypeError: Cannot read property ‘indexOf’ of undefined
ham.5 2020-01-06 01:06:02.106 error uncaught exception: Cannot read property ‘indexOf’ of undefined
ham.5 2020-01-06 01:05:56.161 info No additional Libraries to install …
ham.5 2020-01-06 01:05:56.110 info found 0 vulnerabilities
ham.5 2020-01-06 01:05:56.104 info updated 1 package and audited 6815 packages in 24.48s
ham.5 2020-01-06 01:05:56.104 info + homebridge@0.4.50

配置为
{
“bridge”: {
“name”: “加湿器”,
“username”: “54:52:00:DA:F8:CA”,
“port”: 52991,
“pin”: “576-29-005”
},
“platforms”: [
{
“accessories”: [
{
“accessory”: “MiHumidifier”,
“name”: “MiHumid”,
“ip”: “192.168.199.171”,
“token”: “c828fd0b877dc905b22222222222226”,
“showTemperatureDisable”: false,
“showTemperatureSensorName”: “MiHumid的温度”
}
]
}
]
}

兄弟,截图 ,截全。这样的信息看起来很乱,而且看不起格式。



麻烦给点指导,谢谢

首先,你要把系统升级到最新版本,具体怎么升级,自己查找一下论坛里面的教程。
另外,你漏了一些步骤


我的教程都写的比较完整的了,请细看信息啊。

admin 升级到最新的了,ham也是

已经填写模块,还是错呀!

其他设备都正常使用!

上![jjj|690x372](uplo33333333 ad://bN4Y0RvC0lXxaje4x7gOENAgpfb.png) 传中:3333.png…

花神的配置文件可能有bug,加湿器需要根据不同的设备添加对应的型号


看作者abc的原文,配置文件应该加上型号就可以了。

调到奔溃,终究放弃呀!好了谢谢!

还是没有搞成??

我也卡在这里,没有搞成呀,配置文件启动就会报错,加上加湿器型号也不行。

按照教程走的把米家插座WiFi基础版添加到homekit 把链接生成的配置文件拷贝过来第五行显示syntax error

QQ截图20200415170828

这里回复你了。 :grinning: