Open sweetw0r opened 6 years ago
I think I might messed up the accessory config...
"turnOnWhenOff":true, goes on the main part of the accessory definition. "homebridgeDirectory" is no longer needed.
Updated the config and issue description. Although it didn't solve it. Off by a scene send 'off' and right after it 'heat' HEX
I think it's something related with
"defaultHeatTemperature":32 "replaceAutoMode":"heat"
try removing them, just for a test.
Removing those gave an AssertionError when turning on:
Apr 13 20:17:00 raspberrypi homebridge[350]: [2018-4-13 20:17:00] [Broadlink RM] AC getTargetHeatingCoolingState: 1
Apr 13 20:17:00 raspberrypi homebridge[350]: (node:350) UnhandledPromiseRejectionWarning: AssertionError: #033[31m[CONFIG ERROR] #033[0m You need to provide a hex code for the following temperature:
Apr 13 20:17:00 raspberrypi homebridge[350]: #033[33m{ "temperature30": { "data": "HEXCODE", "pseudo-mode" : "heat/cool" } }#033[0m
Apr 13 20:17:00 raspberrypi homebridge[350]: or provide the default temperature:
Apr 13 20:17:00 raspberrypi homebridge[350]: #033[33m { "temperature30": { "data": "HEXCODE", "pseudo-mode" : "heat/cool" } }#033[0m
Apr 13 20:17:00 raspberrypi homebridge[350]: at AirConAccessory.getTemperatureHexData (/usr/lib/node_modules/homebridge-broadlink-rm/accessories/aircon.js:300:7)
Apr 13 20:17:00 raspberrypi homebridge[350]: at AirConAccessory.sendTemperature (/usr/lib/node_modules/homebridge-broadlink-rm/accessories/aircon.js:237:48)
Apr 13 20:17:00 raspberrypi homebridge[350]: at <anonymous>:null:null
Apr 13 20:17:00 raspberrypi homebridge[350]: (node:350) 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)
Apr 13 20:17:00 raspberrypi homebridge[350]: (node:350) [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.
Turning off doesn't have errors but the bug is still there.
I moved slider in the scene setting but left AC in mode "off" and got that same AssertionError:
Apr 13 20:22:16 raspberrypi homebridge[350]: [2018-4-13 20:22:16] [Broadlink RM] AC sendHex (10.0.0.232; 34:ea:34:51:2d:98) 26006c01a6460d3a0d170c170...160e160d160e390e000d05000000000000000000000000
Apr 13 20:22:16 raspberrypi homebridge[350]: [2018-4-13 20:22:16] [Broadlink RM] AC setCurrentHeatingCoolingState: 0
Apr 13 20:22:16 raspberrypi homebridge[350]: (node:350) UnhandledPromiseRejectionWarning: AssertionError: #033[31m[CONFIG ERROR] #033[0m You need to provide a hex code for the following temperature:
Apr 13 20:22:16 raspberrypi homebridge[350]: #033[33m{ "temperature23": { "data": "HEXCODE", "pseudo-mode" : "heat/cool" } }#033[0m
Apr 13 20:22:16 raspberrypi homebridge[350]: or provide the default temperature:
Apr 13 20:22:16 raspberrypi homebridge[350]: #033[33m { "temperature30": { "data": "HEXCODE", "pseudo-mode" : "heat/cool" } }#033[0m
Apr 13 20:22:16 raspberrypi homebridge[350]: at AirConAccessory.getTemperatureHexData (/usr/lib/node_modules/homebridge-broadlink-rm/accessories/aircon.js:300:7)
Apr 13 20:22:16 raspberrypi homebridge[350]: at AirConAccessory.sendTemperature (/usr/lib/node_modules/homebridge-broadlink-rm/accessories/aircon.js:237:48)
Apr 13 20:22:16 raspberrypi homebridge[350]: at <anonymous>:null:null
And I have realized it sends off HEX first and then it tries to set a temperature of off AC to whatever is on that slider for some unknown reason. How to disable that? Am I the only one who is experiencing this with a scene?
I ran into this because I had "off" mode and 90℉ slider level in the scene setting which is correlated to "temperature32" in my config and "defaultHeatTemperature":32 A workaround for this would be to lower slider to 89℉ in the scene setting and not having a "temperature31" HEX configured and get rid off "defaultHeatTemperature":32 That way it will keep throwing an AssertionError but the AC will stay off!
I really am out of options. just @lprhodes can help, I think.
I realise this is old, but I've just had the same issue. Fortunately, I was able to reverse recent changes and work out when it happened. My recent change was removing this line from my AC's config:
"ignoreTemperatureWhenOff": true
I've just put this line back in my config.json, and it appears to be working now.
I have the same problem
I had the same issue - apparently this cannot be done on Home app. However you can setup the scene with OFF command by using 3rd party apps - such as EVE. It's free, it does not want you to set up another account - it just uses your current HomeKit environment. Hope it helps!
@kiwi-cam Thanks, that option fixed the issue for me!
I have the same issue. @kiwi-cam's solution worked for me as well
I realise this is old, but I've just had the same issue. Fortunately, I was able to reverse recent changes and work out when it happened. My recent change was removing this line from my AC's config:
"ignoreTemperatureWhenOff": true
I've just put this line back in my config.json, and it appears to be working now.
This works perfectly for me!! Thank you so much, been wanting to do this for the longest time!!
It’s working fine via a switch but if that same switch is part of any scene it doesn’t switch. Two HEXs being sent. First "off", second "heat"
My config: