连续发送红外信号时Homebridge崩溃
用switchRepeat连续发送红外信号时Homebridge会崩溃。

具体过程如下：

1、Homebridge正常启动，日志显示无任何异常，Mi-Acpartner及所有accessories也正常加载完成;

2、在iOS Home App点击打开switchRepeat开关，红外信号正常发送出去，但是日志显示
Oct 20 22:36:36 HC-Pi homebridge[637]: [10/20/2018, 10:36:36 PM] [XiaoMiAcPartner] [switchRepeat]Failed! TypeError: callback is not a function
Oct 20 22:36:36 HC-Pi homebridge[637]: (node:637) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): TypeError: callback is not a function
此时Homebridge还可以正常工作，其他配件也完全正常；

3、再点击switchRepeat开关，红外信号还是正常发送，Homebridge也正常工作，但日志再次显示
Oct 20 22:36:46 HC-Pi homebridge[637]: [10/20/2018, 10:36:46 PM] [XiaoMiAcPartner] [switchRepeat]Failed! TypeError: callback is not a function
Oct 20 22:36:46 HC-Pi homebridge[637]: (node:637) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): TypeError: callback is not a function

4、重复点击switchRepeat开关4次(包括前两次)，红外信号正常，Homebridge也正常，点击第5次的时候Homebridge崩溃，日志显示
Oct 20 22:37:00 HC-Pi homebridge[637]: [10/20/2018, 10:37:00 PM] [XiaoMiAcPartner] [switchRepeat]Failed! TypeError: callback is not a function
Oct 20 22:37:00 HC-Pi homebridge[637]: (node:637) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 4): TypeError: callback is not a function
Oct 20 22:37:01 HC-Pi homebridge[637]: /usr/lib/node_modules/homebridge-mi-acpartner/accessories/baseSwitch.js:53
Oct 20 22:37:01 HC-Pi homebridge[637]: this.setSwitchState(value, callback);
Oct 20 22:37:01 HC-Pi homebridge[637]: ^
Oct 20 22:37:01 HC-Pi homebridge[637]: ReferenceError: value is not defined
Oct 20 22:37:01 HC-Pi homebridge[637]: at platform.syncLock._enterSyncState (/usr/lib/node_modules/homebridge-mi-acpartner/accessories/baseSwitch.js:53:33)
Oct 20 22:37:01 HC-Pi homebridge[637]: at syncLockUtil._shift2Queue (/usr/lib/node_modules/homebridge-mi-acpartner/lib/syncLockUtil.js:20:13)
Oct 20 22:37:01 HC-Pi homebridge[637]: at syncLockUtil._exitSyncState (/usr/lib/node_modules/homebridge-mi-acpartner/lib/syncLockUtil.js:41:14)
Oct 20 22:37:01 HC-Pi homebridge[637]: at Timeout.setTimeout (/usr/lib/node_modules/homebridge-mi-acpartner/accessories/switchRepeat.js:51:44)
Oct 20 22:37:01 HC-Pi homebridge[637]: at ontimeout (timers.js:386:11)
Oct 20 22:37:01 HC-Pi homebridge[637]: at tryOnTimeout (timers.js:250:5)
Oct 20 22:37:01 HC-Pi homebridge[637]: at Timer.listOnTimeout (timers.js:214:5)
Oct 20 22:37:01 HC-Pi systemd[1]: homebridge.service: main process exited, code=exited, status=1/FAILURE
Oct 20 22:37:01 HC-Pi systemd[1]: Unit homebridge.service entered failed state.
Oct 20 22:37:11 HC-Pi systemd[1]: homebridge.service holdoff time over, scheduling restart.
Oct 20 22:37:11 HC-Pi systemd[1]: Stopping Node.js HomeKit Server...

重启Homebridge之后问题照旧。

麻烦你看看问题出在哪里，非常感谢！！！


运行环境树莓派，NPM版本6.3，nodejs版本6.14.3，Homebridge版本0.4.44
Homebridge相关的config.json如下：
{
         "platform":"XiaoMiAcPartner",
         "devices":{
            "192.168.0.24":"xxxxxx隐藏",
            "192.168.0.28":"xxxxxx隐藏",
            "192.168.0.29":"xxxxxx隐藏"
         },
         "accessories":[
            {
               "name": "IR Learner",
               "type": "learnIR",
               "deviceIp":"192.168.0.24"
            },
            {
               "name": "switchRepeat",
               "type": "switchRepeat",
               "deviceIp":"192.168.0.24",
               "sendInterval":"300",
               "data":{
                  "on":[
                         "FE000000000000000000000000070024224B003900A700E401CA03960FC913884300000000000000000101010101010101000101010100010001000000000100010542063B",
                         "FE000000000000000000000000070024224B003900A700E401CA03960FC913884300000000000000000101010101010101000101010100010001000000000100010542063B",
                         "FE000000000000000000000000070024224B003900A700E401CA03960FC913884300000000000000000101010101010101000101010100010001000000000100010542063B"
                  ],
                  "off"：["FE000000000000000000000000070024224B003900A700E401CA03960FC913884300000000000000000101010101010101000101010100010001000000000100010542063B",
                          "FE000000000000000000000000070024224B003900A700E401CA03960FC913884300000000000000000101010101010101000101010100010001000000000100010542063B",
                          "FE000000000000000000000000070024224B003900A700E401CA03960FC913884300000000000000000101010101010101000101010100010001000000000100010542063B"
                  ]
               }
            },
            {
               "name":"Living Room AC",
               "type":"climate",
               "deviceIp":"192.168.0.24",
               "maxTemp":30,
               "minTemp":16,
               "autoStart":"cool",
               "syncInterval":600000
            },
            {
               "name":"Study AC",
               "type":"climate",
               "deviceIp":"192.168.0.28",
               "maxTemp":30,
               "minTemp":16,
               "autoStart":"cool",
               "sensorSid":"lumi.158d0002091880",
               "syncInterval":600000
            },
            {
               "name":"Bedroom AC",
               "type":"climate",
               "deviceIp":"192.168.0.29",
               "maxTemp":30,
               "minTemp":16,
               "autoStart":"cool",
               "sensorSid":"lumi.158d000245f15d",
               "syncInterval":600000
            }
         ]
      }