LASER-Yi / homebridge-mi-acpartner

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

[AC Partner]Sync failed! Error: Resp general error #69

Open HapCoderWei opened 5 years ago

HapCoderWei commented 5 years ago

空调伴侣2代

美的空调 Midea

Error Log:

[2019-6-11 23:13:26] Homebridge is running on port 51826.
[2019-6-11 23:13:26] [XiaoMiAcPartner] [INFO]Device 192.168.0.103 -> Connected
[2019-6-11 23:13:26] [XiaoMiAcPartner] [AC Partner]Ready
[2019-6-11 23:13:28] [XiaoMiAcPartner] [AC Partner]Sync failed! Error: Resp general error.
[2019-6-11 23:14:26] [XiaoMiAcPartner] [AC Partner]Sync failed! Error: Resp general error.
[2019-6-11 23:14:37] [XiaoMiAcPartner] [DEBUG]FastSync...
[2019-6-11 23:14:37] [Pi CPU Temperature] update currentTemperatureCharacteristic value: 47.236
[2019-6-11 23:14:37] [XiaoMiAcPartner] [AC Partner]Sync failed! Error: Resp general error.
[2019-6-11 23:14:37] [MiOutletPlatform] [MiOutletPlatform][DEBUG]MiPlugBase - Outlet - getPower: off
[2019-6-11 23:14:42] [XiaoMiAcPartner] [AC Partner]Sync failed! Error: Resp general error.
[2019-6-11 23:14:47] [XiaoMiAcPartner] [AC Partner]Sync failed! Error: Resp general error.
/usr/lib/node_modules/homebridge-mi-acpartner/lib/presetUtil.js:19
  let com_model = model.substr(0, 2) + model.substr(8, 8);
                        ^

TypeError: Cannot read property 'substr' of undefined
    at module.exports (/usr/lib/node_modules/homebridge-mi-acpartner/lib/presetUtil.js:19:25)
    at HeaterCoolerAccessory._sendCmdAsync (/usr/lib/node_modules/homebridge-mi-acpartner/accessories/baseAC.js:125:20)
    at HeaterCoolerAccessory._setCActive (/usr/lib/node_modules/homebridge-mi-acpartner/accessories/heaterCooler.js:114:14)
    at Characteristic.Active.emit (events.js:180:13)
    at Characteristic.Active.Characteristic.setValue (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:319:10)
    at Bridge.<anonymous> (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:867:22)
    at Array.forEach (<anonymous>)
    at Bridge.Accessory._handleSetCharacteristics (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:807:8)
    at HAPServer.emit (events.js:180:13)
    at HAPServer._handleCharacteristics (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:972:10)

config.json

"platforms": [{
        "platform": "MiOutletPlatform",
        "deviceCfgs": [{
            "type": "MiPlugBase",
            "ip": "192.168.0.106",
            "token": "b9d0a02cc74f374776787c57858cd4f6",
            "outletName": "living room outlet",
            "outletDisable": false,
            "temperatureName": "living room outlet temperature",
            "temperatureDisable": true,
            "switchLEDName": "living room led light switch",
            "switchLEDDisable": true
        }]
    },
        {
            "platform": "XiaoMiAcPartner",
            "devices":{
                "192.168.0.103":"02838294ae19ff3ba37a8456429dc96f"
            },
            "accessories":[
                {
                    "name": "AC Partner",
                    "type": "heaterCooler",
                    "customize": {
                    }
                }
            ]
        }]

配置文件中第一个配件是一个小米插座的,使用正常。第2个是空调伴侣的配置。

希望能给予一些帮助,感谢! Thanks for your great work, AWESOME! 🐂🍺

everpcpc commented 5 years ago

+1 空调伴侣2代遇到同样的问题,发送状态更新时的报错: 版本 0.7.1

TypeError: Cannot read property 'substr' of undefined
    at module.exports (/homebridge/node_modules/homebridge-mi-acpartner/lib/presetUtil.js:19:25)
    at HeaterCoolerAccessory._sendCmdAsync (/homebridge/node_modules/homebridge-mi-acpartner/accessories/baseAC.js:125:20)
    at HeaterCoolerAccessory._setCActive (/homebridge/node_modules/homebridge-mi-acpartner/accessories/heaterCooler.js:114:14)
    at Characteristic.Active.emit (events.js:198:13)
    at Characteristic.Active.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:321:10)
    at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:882:22)
    at Array.forEach (<anonymous>)
    at Bridge.Accessory._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:822:8)
    at HAPServer.emit (events.js:198:13)
    at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:974:10)
mwkchan commented 5 years ago

+1

[7/10/2019, 12:22:09 AM] [XiaoMiAcPartner] [INFO]Device 192.168.1.239 -> Connected (node:29949) UnhandledPromiseRejectionWarning: Error: Resp general error. at Object.reject (/usr/local/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:217:13) at Device._onMessage (/usr/local/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:108:8) at Socket.emit (events.js:197:13) at UDP.onMessage [as onmessage] (dgram.js:685:8) (node:29949) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1) (node:29949) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

LASER-Yi commented 5 years ago

这些报错是出现在最近发售的空调伴侣2代(¥79)上吗?

mwkchan commented 5 years ago

是的

On 3 Aug 2019, at 12:57 PM, Liang Yi notifications@github.com wrote:

这些报错是出现在最近发售的空调伴侣2代(¥79)上吗?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/LASER-Yi/homebridge-mi-acpartner/issues/69?email_source=notifications&email_token=AMG6EA2IUR7NW6ZH5IOT6L3QCUF4XA5CNFSM4HW7PTR2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD3PHDJA#issuecomment-517894564, or mute the thread https://github.com/notifications/unsubscribe-auth/AMG6EAYAXDXZP625R2M4ZCLQCUF4XANCNFSM4HW7PTRQ.

unpsychopass commented 5 years ago

+1,空调伴侣2代(¥79)报同样的错误 [8/4/2019, 2:14:30 PM] [XiaoMiAcPartner] [Ac Partner]Sync failed! Error: Resp general error.

appLhui commented 5 years ago

同问,我的也是 ¥79 元的 小米最新发布的空调伴侣,同样报错: Sync failed! Error: Resp general error. @LASER-Yi

j1kwen commented 5 years ago

同样的空调伴侣2,同样的空调,同样的报错,而且还会在尝试控制或修改配件后导致homebridge直接崩掉@LASER-Yi

wujunyu94 commented 5 years ago

用的空调伴侣2 同样的问题

smoothdvd commented 4 years ago
[12/14/2019, 2:06:37 PM] [XiaoMiAcPartner] [INFO]Device 192.168.1.175 -> Connected
[12/14/2019, 2:06:41 PM] [XiaoMiAcPartner] [Living room AC]Sync failed! Error: user ack timeout
[12/14/2019, 2:11:06 PM] TypeError: Cannot read property 'substr' of undefined
at module.exports (/home/alex/.config/yarn/global/node_modules/homebridge-mi-acpartner/lib/presetUtil.js:19:25)
smoothdvd commented 4 years ago

升级到最新的beta (0.7.2-6) 不会崩溃了

WGwangguan commented 4 years ago

升级到最新的beta (0.7.2-6) 不会崩溃了

刚刚试了升级到最新的 beta(0.7.2-7),还是崩溃,海尔空调

[4/14/2020, 8:39:16 PM] [XiaoMiAcPartner] [AC Partner]Sync failed! Error: user ack timeout at Object.reject (/usr/local/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:217:13) at Device._onMessage (/usr/local/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:108:8) at Socket.emit (events.js:310:20) at UDP.onMessage [as onmessage] (dgram.js:924:8) { code: -9999 }

one2freefly commented 4 years ago

升级到最新的beta (0.7.2-6) 不会崩溃了

刚刚试了升级到最新的 beta(0.7.2-7),还是崩溃,海尔空调

[4/14/2020, 8:39:16 PM] [XiaoMiAcPartner] [AC Partner]Sync failed! Error: user ack timeout at Object.reject (/usr/local/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:217:13) at Device._onMessage (/usr/local/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:108:8) at Socket.emit (events.js:310:20) at UDP.onMessage [as onmessage] (dgram.js:924:8) { code: -9999 }

我也一样,空调伴侣2。Sync failed! Error: user ack timeout [2020-6-27 5:12:45 ├F10: PM┤] [XiaoMiAcPartner] [INFO]Device#0 192.168.1.199 -> Connecting [2020-6-27 5:12:45 ├F10: PM┤] [XiaoMiAcPartner] [INFO]Device 192.168.1.199 -> Connected [2020-6-27 5:12:49 ├F10: PM┤] [XiaoMiAcPartner] [Ac Partner]Sync failed! Error: user ack timeout at Object.reject (/usr/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:217:13) at Device._onMessage (/usr/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:108:8) at Socket.emit (events.js:315:20) at UDP.onMessage (dgram.js:910:8) { code: -9999 }

YoungWilliamZ commented 4 years ago

空调伴侣2 beta0.7.2-7

[7/19/2020, 9:42:25 PM] [XiaoMiAcPartner] [INFO]Device 192.168.1.206 -> Connected
[7/19/2020, 9:42:29 PM] [XiaoMiAcPartner] [AC Partner]Sync failed! Error: user ack timeout
    at Object.reject (/usr/local/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:217:13)
    at Device._onMessage (/usr/local/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:108:8)
    at Socket.emit (events.js:315:20)
    at UDP.onMessage (dgram.js:910:8) {
  code: -9999
}
KevinDevs commented 4 years ago

[XiaoMiAcPartner] [Bedroom AC]Sync failed! Error: user ack timeout at Object.reject (/usr/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:217:13) at Device._onMessage (/usr/lib/node_modules/homebridge-mi-acpartner/node_modules/miio/lib/device.js:108:8) at Socket.emit (events.js:315:20) at UDP.onMessage (dgram.js:910:8) { code: -9999 }

YueYongDev commented 3 years ago

这个问题还有解吗?