newt10 / homebridge-broadlink-rm-enhanced

Broadlink RM Mini and Pro plugin for homebridge:
https://github.com/nfarina/homebridge
Apache License 2.0
9 stars 1 forks source link

Bugs in combined heat cool mode #13

Closed newt10 closed 3 years ago

newt10 commented 3 years ago

From kim-cam

One for you @newt10. I've been playing with the Heater Cooler accessory but hit an exception. Whenever I change the mode (off/heat/cool) I get this:

Cec 20 06:42:06 homebridge[26317]: [Broadlink RM] Heat Pump setTargetHeaterCoolerState: 1 Dec 20 06:42:06 homebridge[26317]: [Broadlink RM] Changing target state from 2 to 1 Dec 20 06:42:06 homebridge[26317]: (node:26317) UnhandledPromiseRejectionWarning: TypeError: Assignment to constant variable. Dec 20 06:42:06 homebridge[26317]: at HeaterCoolerAccessory.setTargetHeaterCoolerState (/usr/lib/node_modules/homebridge-broadlink-rm-pro/accessories/heater-cooler.js:174:39) Dec 20 06:42:06 homebridge[26317]: at HeaterCoolerAccessory.setCharacteristicValue (/usr/lib/node_modules/homebridge-broadlink-rm-pro/base/accessory.js:138:10) Dec 20 06:42:06 homebridge[26317]: at TargetHeaterCoolerState.emit (events.js:314:20) Dec 20 06:42:06 homebridge[26317]: at TargetHeaterCoolerState.EventEmitter.emit (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/EventEmitter.ts:42:22) Dec 20 06:42:06 homebridge[26317]: at TargetHeaterCoolerState.Characteristic._this.setValue (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:652:12) Dec 20 06:42:06 homebridge[26317]: at /usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1439:24 Dec 20 06:42:06 homebridge[26317]: at Array.forEach () Dec 20 06:42:06 homebridge[26317]: at Bridge.Accessory._this._handleSetCharacteristics (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1281:10) Dec 20 06:42:06 homebridge[26317]: at HAPServer.emit (events.js:314:20) Dec 20 06:42:06 homebridge[26317]: at HAPServer.EventEmitter.emit (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/EventEmitter.ts:42:22) Dec 20 06:42:06 homebridge[26317]: (node:26317) 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(). To terminate the node process on unhandled promise rejection, use the CLI flag --unhandled-rejections=strict (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 3) Dec 20 06:42:06 homebridge[26317]: [Broadlink RM] Heat Pump setActive: 1