LASER-Yi / homebridge-mi-acpartner

XiaoMi AC Partner plugins for HomeBridge(https://github.com/nfarina/homebridge).
MIT License
263 stars 36 forks source link

更新0.7.1后,与mi-aqara一起运行仍然会出现超时错误 #45

Closed Raccooon closed 6 years ago

Raccooon commented 6 years ago
[7/24/2018, 12:58:26 PM] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"ctrl_neutral1","sid":"158d00016146c9","short_id":7781,"data":"{\"channel_0\":\"on\"}"}
[7/24/2018, 12:58:26 PM] [MiAqaraPlatform] [DEBUG][Send]{"cmd":"write","model":"ctrl_neutral1","sid":"158d00016146c9","data":"{\"channel_0\":\"on\", \"key\": \"7e2bd4b3324484429629d6782f52cfd4\"}"}
[7/24/2018, 12:58:26 PM] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"ctrl_neutral1","sid":"158d00016146c9","short_id":7781,"data":"{\"channel_0\":\"on\"}"}
[7/24/2018, 12:58:27 PM] [MiAqaraPlatform] [DEBUG][Send]{"cmd":"write","model":"ctrl_neutral1","sid":"158d00016146c9","data":"{\"channel_0\":\"on\", \"key\": \"7e2bd4b3324484429629d6782f52cfd4\"}"}
[7/24/2018, 12:58:28 PM] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"write","model":"ctrl_neutral1","sid":"158d00016146c9","data":"{\"channel_0\":\"on\", \"key\": \"7e2bd4b3324484429629d6782f52cfd4\"}"}
[7/24/2018, 12:58:28 PM] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"write","model":"ctrl_neutral1","sid":"158d00016146c9","data":"{\"channel_0\":\"on\", \"key\": \"7e2bd4b3324484429629d6782f52cfd4\"}"}
    at Timeout.setInterval (/usr/lib/node_modules/homebridge-mi-aqara/index.js:399:27)
    at ontimeout (timers.js:386:11)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5)
[7/24/2018, 12:58:32 PM] [MiAqaraPlatform] [DEBUG][Send]{"cmd":"write","model":"ctrl_neutral1","sid":"158d00016146c9","data":"{\"channel_0\":\"off\", \"key\": \"7e2bd4b3324484429629d6782f52cfd4\"}"}
[7/24/2018, 12:58:33 PM] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"ctrl_neutral1","sid":"158d00016146c9","short_id":7781,"data":"{\"channel_0\":\"off\"}"}
[7/24/2018, 12:58:33 PM] [MiAqaraPlatform] [DEBUG][Send]{"cmd":"write","model":"ctrl_neutral1","sid":"158d00016146c9","data":"{\"channel_0\":\"off\", \"key\": \"7e2bd4b3324484429629d6782f52cfd4\"}"}
[7/24/2018, 12:58:34 PM] [MiAqaraPlatform] [DEBUG][Revc]{"cmd":"report","model":"ctrl_neutral1","sid":"158d00016146c9","short_id":7781,"data":"{\"channel_0\":\"off\"}"}
[7/24/2018, 12:58:34 PM] [MiAqaraPlatform] [DEBUG][Send]{"cmd":"write","model":"ctrl_neutral1","sid":"158d00016146c9","data":"{\"channel_0\":\"off\", \"key\": \"7e2bd4b3324484429629d6782f52cfd4\"}"}
[7/24/2018, 12:58:35 PM] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"write","model":"ctrl_neutral1","sid":"158d00016146c9","data":"{\"channel_0\":\"off\", \"key\": \"7e2bd4b3324484429629d6782f52cfd4\"}"}
[7/24/2018, 12:58:35 PM] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"write","model":"ctrl_neutral1","sid":"158d00016146c9","data":"{\"channel_0\":\"off\", \"key\": \"7e2bd4b3324484429629d6782f52cfd4\"}"}
    at Timeout.setInterval (/usr/lib/node_modules/homebridge-mi-aqara/index.js:399:27)
    at ontimeout (timers.js:386:11)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5)

插件能正确加载了 使用一次后,还是会报超时错误 超时后就瘫痪了

单独运行没问题

LASER-Yi commented 6 years ago

完全删除此插件并删除单独的miio,然后重新安装试试看。要保证miio版本是0.14.1

Raccooon commented 6 years ago

完全删除插件和miio,重新安装

zdyang@zdyang-ThinkPad-X61:~/.homebridge$ sudo npm install -g homebridge-mi-acpartner
/usr/lib
└─┬ homebridge-mi-acpartner@0.7.1
  └─┬ miio@0.14.1
    ├── appdirectory@0.1.0
    ├─┬ chalk@1.1.3
    │ ├── ansi-styles@2.2.1
    │ ├── escape-string-regexp@1.0.5
    │ ├─┬ has-ansi@2.0.0
    │ │ └── ansi-regex@2.1.1
    │ ├── strip-ansi@3.0.1
    │ └── supports-color@2.0.0
    ├─┬ debug@2.6.9
    │ └── ms@2.0.0
    ├── minimist@1.2.0
    └─┬ mkdirp@0.5.1
      └── minimist@0.0.8

加载的时候报了这个错误,不过能正常运行,是不是没有单独安装miio的关系

[7/27/2018, 12:59:49 AM] ====================
[7/27/2018, 12:59:49 AM] ERROR LOADING PLUGIN homebridge-mi-ac-partner:
[7/27/2018, 12:59:49 AM] Error: Cannot find module 'miio'
    at Function.Module._resolveFilename (module.js:476:15)
    at Function.Module._load (module.js:424:25)
    at Module.require (module.js:504:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/usr/lib/node_modules/homebridge-mi-ac-partner/index.js:1:74)
    at Module._compile (module.js:577:32)
    at Object.Module._extensions..js (module.js:586:10)
    at Module.load (module.js:494:32)
    at tryModuleLoad (module.js:453:12)
    at Function.Module._load (module.js:445:3)

超时问题依旧存在

[7/27/2018, 1:00:41 AM] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"write","model":"ctrl_neutral1","sid":"158d00016146c9","data":{"channel_0":"on", "key": "fab28af90983e7051326b47963c324c2"}"}
[7/27/2018, 1:02:14 AM] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"write","model":"gateway","sid":"7811dcdc2a79","data":"{\"rgb\":889170516, \"key\": \"aa9dd259ea69646813f0779ada2ecc0d\"}"}
[7/27/2018, 1:02:14 AM] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"write","model":"gateway","sid":"7811dcdc2a79","data":"{\"rgb\":889170516, \"key\": \"aa9dd259ea69646813f0779ada2ecc0d\"}"}
[7/27/2018, 1:02:17 AM] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"write","model":"gateway","sid":"7811dcdc2a79","data":"{\"rgb\":0, \"key\": \"aa9dd259ea69646813f0779ada2ecc0d\"}"}
[7/27/2018, 1:02:17 AM] [MiAqaraPlatform] [ERROR]Error: timeout: {"cmd":"write","model":"gateway","sid":"7811dcdc2a79","data":"{\"rgb\":0, \"key\": \"aa9dd259ea69646813f0779ada2ecc0d\"}"}
LASER-Yi commented 6 years ago

ERROR LOADING PLUGIN homebridge-mi-ac-partner 这个错误是因为安装了homebridge-mi-ac-partner这个插件的原因。请问下插件的具体环境,是在docker中还是树莓派。一直无法复现这个问题。

Raccooon commented 6 years ago

报错设备是一台老旧笔记本thinkpad x61 折腾很久,依旧报错

迁移整套homebridge到了Mac mini上 无报错,运行良好

感谢帮助