ilcato / homebridge-Fibaro-HC2

Homebridge plugin for Fibaro Home Center 2 (and Home Center Lite ...)
Apache License 2.0
67 stars 27 forks source link

Thermostat mode does not change (only after hb restart) #192

Closed evrad91 closed 3 years ago

evrad91 commented 4 years ago

Hi!

I didnt update my homebridge for a while. I have returned to the office and updated all npm's and homebridge. Now I face a problem with the thermostats mode selection from HomeKit.

The story: I have 2 thermostats: 1. Radiator thermostat: ID 124 Temperature and mode ID 125 Temperature sensor ID 126 Mode: Off, Heat, Energy save energy

2. Remotec AC thermostat: ID 120 Temperature and mode ID 121 Temperature sensor ID 122 Mode: Off, Heat, Cool, Resume, Dry air ID 123 Fan speed: Always inactive

Ather the updates their mode cannot be selected. So if the thermostat is off I cannot turn it on, and vice versa. If the thermostat is on, then I can manage the temperature from HomeKit without any problem, but cannot turn it off.

If I reset homebridge and submit config.json as a new, then it works as expected on first launch:

1. Radiator is off, I witch it to ‘Heating’ from KomeKit (the temp preset to 26): [6/11/2020, 6:32:56 PM] [FibaroHC2] Setting value to device: 124 parameter: Target Heating Cooling State [6/11/2020, 6:32:56 PM] [FibaroHC2] Command: setMode, value: 0, to: 126 [6/11/2020, 6:33:00 PM] [FibaroHC2] Setting value to device: 124 parameter: Target Heating Cooling State [6/11/2020, 6:33:00 PM] [FibaroHC2] Command: setSetpointMode, value: 1, to: 124 [6/11/2020, 6:33:00 PM] [FibaroHC2] Command: setMode, value: 1, to: 126 [6/11/2020, 6:33:00 PM] [FibaroHC2] Updating value for device: 126 parameter: Current Heating Cooling State, value: 1 [6/11/2020, 6:33:00 PM] [FibaroHC2] Updating value for device: 126 parameter: Target Heating Cooling State, value: 1

2. Changing radiator’s temp to 28: [6/11/2020, 6:39:02 PM] [FibaroHC2] Command: setMode, value: 1, to: 126 [6/11/2020, 6:39:02 PM] [FibaroHC2] Command: setSetpointMode, value: 1, to: 124 [6/11/2020, 6:39:09 PM] [FibaroHC2] Setting value to device: 124 parameter: Target Temperature [6/11/2020, 6:39:09 PM] [FibaroHC2] Command: setThermostatSetpoint, value: 1,28, to: 124 [6/11/2020, 6:39:10 PM] [FibaroHC2] Updating value for device: 124 parameter: Current Temperature, value: 28.00 [6/11/2020, 6:39:10 PM] [FibaroHC2] Updating value for device: 124 parameter: Target Temperature, value: 28.00 [6/11/2020, 6:39:10 PM] [FibaroHC2] Updating value for device: 124 parameter: Temperature Display Units, value: 28.00

3. Turning thermostat off: [6/11/2020, 6:43:59 PM] [FibaroHC2] Setting value to device: 124 parameter: Target Heating Cooling State [6/11/2020, 6:43:59 PM] [FibaroHC2] Command: setMode, value: 0, to: 126 [6/11/2020, 6:44:01 PM] [FibaroHC2] Updating value for device: 126 parameter: Current Heating Cooling State, value: 0 [6/11/2020, 6:44:01 PM] [FibaroHC2] Updating value for device: 126 parameter: Target Heating Cooling State, value: 0

Same with AC:

1. Turning it on cooling: [6/11/2020, 6:45:24 PM] [FibaroHC2] Setting value to device: 120 parameter: Target Heating Cooling State [6/11/2020, 6:45:24 PM] [FibaroHC2] Command: setMode, value: 0, to: 122 [6/11/2020, 6:45:26 PM] [FibaroHC2] Setting value to device: 120 parameter: Target Heating Cooling State [6/11/2020, 6:45:26 PM] [FibaroHC2] Command: setSetpointMode, value: 2, to: 120 [6/11/2020, 6:45:26 PM] [FibaroHC2] Command: setMode, value: 2, to: 122 [6/11/2020, 6:45:26 PM] [FibaroHC2] Updating value for device: 120 parameter: Current Temperature, value: 24.00 [6/11/2020, 6:45:26 PM] [FibaroHC2] Updating value for device: 120 parameter: Target Temperature, value: 24.00 [6/11/2020, 6:45:26 PM] [FibaroHC2] Updating value for device: 120 parameter: Temperature Display Units, value: 24.00 [6/11/2020, 6:45:27 PM] [FibaroHC2] Updating value for device: 122 parameter: Current Heating Cooling State, value: 2 [6/11/2020, 6:45:27 PM] [FibaroHC2] Updating value for device: 122 parameter: Target Heating Cooling State, value: 2

2. Turning off: [6/11/2020, 6:47:30 PM] [FibaroHC2] Setting value to device: 120 parameter: Target Heating Cooling State [6/11/2020, 6:47:30 PM] [FibaroHC2] Command: setMode, value: 0, to: 122

But after homebridge restart it does something mad and adds temperature sensor ID after setMode ID, so it makes wrong device ID and it does not work.

1. Thermostat on:

[6/11/2020, 6:48:58 PM] [FibaroHC2] Setting value to device: 124 parameter: Target Heating Cooling State [6/11/2020, 6:48:58 PM] [FibaroHC2] Command: setSetpointMode, value: 1, to: 124 [6/11/2020, 6:48:58 PM] [FibaroHC2] There was a problem sending command setMode to 126125

2. AC on: [6/11/2020, 6:52:21 PM] [FibaroHC2] Setting value to device: 120 parameter: Target Heating Cooling State [6/11/2020, 6:52:21 PM] [FibaroHC2] Command: setSetpointMode, value: 2, to: 120 [6/11/2020, 6:52:21 PM] [FibaroHC2] There was a problem sending command setMode to 122121

I also tried to install older plugin version, but Fibaro does not get found at all then: [FibaroHC2] Error getting data from Home Center: TypeError: Cannot read property 'getCharacteristic' of undefined at /usr/lib/node_modules/homebridge/src/server.ts:511:32 ....... many lines after that

They both work perfectly from HC2 and used to work perfectly before the updates even after homebridge restart.

Please advise what can I do? I ended up resetting and launching homebridge, but the thermostats will work until first homebridge restart….

Thanks a lot in advance!

oxystin commented 3 years ago

Exactly the same problem:

Homebridge Version 1.1.1 Node.js Version 12.18.2 homebridge-fibaro-hc2 v2.3.6

Logs:

There was a problem getting value from:  391390 - Err: null
There was a problem getting value from:  391390 - Err: null
Setting value to device:  389  parameter: Target Heating Cooling State
There was a problem sending command  setMode to 391390
Setting value to device:  389  parameter: Target Heating Cooling State
There was a problem sending command  setMode to 391390
Command:  setSetpointMode, value: 1, to: 389
Setting value to device:  389  parameter: Target Heating Cooling State
There was a problem sending command  setMode to 391390