Hernas / homebridge-panasonic-heat-pump

Apache License 2.0
7 stars 2 forks source link

Incorrect temperature in HomeKit #4

Closed pawelosin closed 8 months ago

pawelosin commented 1 year ago

Hello, I use the controller from the pump as a room thermostat after moving it from the pump to the room. After changing the pump settings, it works properly, and the temperature range of the room thermostat is in the range of 10 - 30 degrees. In order for the HomeKit version 1.3.7 to show the temperature settings correct, I modified several lines in the platformAccessory file, but after updating to 1.4.0 I can not find the right lines to modify. Which lines in this file in the current version should I modify so that the thermostat temperatures are shown in HomeKit exactly the same as in the pump application?

pawelosin commented 1 year ago

I think that I found the lines to modify. I think that are lines number: 113, 443, 444 and 445. I have modified they and now temperature shows as I expected. Could you consider additional configuration this plugin to use the pump controller as a room thermostat?

bimusiek commented 1 year ago

Could you please open the PR with mentioned changes? I would like to take a look to understand what is exactly the issue.

What setting do you have in mind? It is already working as a room thermostat more or less. Both water tank & floor heating show up as a thermostat in Homekit with additional Outside temperature sensor & 2 switches.

You want to add option to hide outside temperature sensor? There is already an option for this called enableOutdoorTempSensor.

Also you can hide Eco Mode swtich with enableEcoModeSwitch & Comfort Mode switch with enableComfortModeSwitch

pawelosin commented 1 year ago

I don't know how to open the PR, but the changed lines look like this: 113 const adjustedTemp = (parseInt(temp as string)); 443 const tempMin = Math.floor(targetTempMin); 444 const tempMax = Math.ceil(targetTempMax); 445 const tempCurrent = Math.round(targetTempSet);

I changed them because I regulate the temperature of the air in the room. image image

bimusiek commented 1 year ago

Can you send me the LOG from homebridge with device details? I think I understand what you mean, but it has to be configurable based on Panasonic response.

Something like this:

[2/22/2023, 8:40:26 PM] [PanasonicHeatPumpHomebridgePlugin] Device conf: {
    "deviceGuid": "xxx",
    "configration": [
        {
            "zoneInfo": [
                {
                    "zoneSensor": "Water temperature",
                    "coolMode": "enable",
                    "heatSensor": "Compensation curve",
                    "coolSensor": "Compensation curve",
                    "outdoorType": "STD",
                    "zoneId": 1,
                    "zoneType": "Room",
                    "zoneName": "Home"
                }
            ],
            "a2wName": "HeatPump",
            "operationMode": "Heat",
            "deviceGuid": "xxx",
            "lastErrorNumber": "",
            "bivalent": "No",
            "specialStatus": 0,
            "tankInfo": [
                {
                    "tankType": "Internal",
                    "tank": "Yes"
                }
            ],
            "firmVersion": "xxx"
        }
    ]
}

I guess your heatSensor setting will be different than Compensation curve as it works as room temp sensor.

bimusiek commented 1 year ago

Basically, for using heat pump with compensation curve, it allows to change the temperature of the heat pump heating by 5 degrees only. So lets say the compensation curve at -10 outside set temp to 40, you can only change it by -5/+5. And then you regulate temp in each room using for example Salus SQ610 thermostats.

With your setting on the heat pump, it is allowing to behave as room temp control.

pawelosin commented 1 year ago

Here it is:

[24.02.2023, 06:08:36] [@hernas/homebridge-panasonic-heat-pump] Authenticated to Aquarea Smart Panasonic [24.02.2023, 06:08:36] [@hernas/homebridge-panasonic-heat-pump] Device conf: { "deviceGuid": "XXXXXXXXXX", "configration": [ { "zoneInfo": [ { "zoneSensor": "Internal", "coolMode": "disable", "heatSensor": "Compensation curve", "coolSensor": "Compensation curve", "outdoorType": "STD", "zoneId": 1, "zoneType": "Room", "zoneName": "Grzejniki" } ], "a2wName": "Pompa", "operationMode": "Heat", "deviceGuid": "XXXXXXXXXXXXX", "lastErrorNumber": "", "bivalent": "No", "specialStatus": 0, "tankInfo": [ { "tankType": "Internal", "tank": "Yes" } ], "firmVersion": "040105" } ] } [24.02.2023, 06:08:36] [@hernas/homebridge-panasonic-heat-pump] Restoring existing accessory from cache: Pompa [24.02.2023, 06:08:36] [@hernas/homebridge-panasonic-heat-pump] Restoring existing accessory from cache: Pompa [24.02.2023, 06:08:37] [@hernas/homebridge-panasonic-heat-pump] Readings: { "temperatureNow": 23, "heatingCoolingState": 1, "targetHeatingCoolingState": 1, "outdoorTemperatureNow": 5, "tankTemperatureNow": 47, "tankTemperatureSet": 52, "tankHeatingCoolingState": 0, "tankTargetHeatingCoolingState": 0, "isActive": true, "ecoModeIsActive": false, "comfortModeIsActive": false, "tankTemperatureMax": 65, "tankTemperatureMin": 40, "targetTempSet": 24, "targetTempMin": 10, "targetTempMax": 30, "tempType": "heat" }

bimusiek commented 1 year ago

@pawelosin Hey, I just released 1.6.0 (https://github.com/Hernas/homebridge-panasonic-heat-pump/releases/tag/v1.6.0).

This takes into consideration zoneSensor parameter, and in case of internal value, it will allow to set min & max temperatures without adjusting for current temp.

miloszmich commented 11 months ago

Hi, I have a similar error. It seems that the current temp (27 degree) and the set temp (28 degree) are being added together: https://share.cleanshot.com/RNNGdTxB Version: 1.6.2

JJJMlo commented 10 months ago

Hi, have the exact same error as @miloszmich. both are add together.

bimusiek commented 9 months ago

@miloszmich & @JJJMlo Can you post logs from "Device conf"? Could be that zone settings are presented differently in your case.

JJJMlo commented 8 months ago

@miloszmich & @JJJMlo Can you post logs from "Device conf"? Could be that zone settings are presented differently in your case.

Hi, my logs looks completely empty.image

Here is attached a picture where you can see my problem. On the floor temperature shows 44º as preset.

JJJMlo commented 8 months ago

@miloszmich & @JJJMlo Can you post logs from "Device conf"? Could be that zone settings are presented differently in your case.

This is the only info that appears.

[26/02/2024, 23:44:38] [@hernas/homebridge-panasonic-heat-pump] Launched child bridge with PID 1535007 [26/02/2024, 23:44:38] Registering platform '@hernas/homebridge-panasonic-heat-pump.PanasonicHeatPumpHomebridgePlugin' [26/02/2024, 23:44:38] [@hernas/homebridge-panasonic-heat-pump] Loaded @hernas/homebridge-panasonic-heat-pump v1.6.2 child bridge successfully [26/02/2024, 23:44:38] Homebridge v1.7.0 (HAP v0.11.1) (@hernas/homebridge-panasonic-heat-pump) is running on port 42615. [26/02/2024, 23:44:40] [@hernas/homebridge-panasonic-heat-pump] Authenticated to Aquarea Smart Panasonic [26/02/2024, 23:44:40] [@hernas/homebridge-panasonic-heat-pump] Adding new accessory: DLV_CASA [26/02/2024, 23:44:40] [@hernas/homebridge-panasonic-heat-pump] Adding new accessory: DLV_CASA [26/02/2024, 23:44:40] [@hernas/homebridge-panasonic-heat-pump] This plugin generated a warning from the characteristic 'Active': Characteristic not in required or optional characteristic section for service Thermostat. Adding anyway.. See https://homebridge.io/w/JtMGR for more info.

bimusiek commented 8 months ago

You have to run the homebridge in debug mode to see "Device conf" logs.

JJJMlo commented 8 months ago

You have to run the homebridge in debug mode to see "Device conf" logs.

after resetting adaptor. [28/02/2024, 08:24:00] [@hernas/homebridge-panasonic-heat-pump] Launched child bridge with PID 1575601 [28/02/2024, 08:24:00] Registering platform '@hernas/homebridge-panasonic-heat-pump.PanasonicHeatPumpHomebridgePlugin' [28/02/2024, 08:24:00] [@hernas/homebridge-panasonic-heat-pump] Loaded @hernas/homebridge-panasonic-heat-pump v1.6.2 child bridge successfully [28/02/2024, 08:24:00] Loaded 2 cached accessories from cachedAccessories.0E2E4EEF1232. [28/02/2024, 08:24:00] [@hernas/homebridge-panasonic-heat-pump] Finished initializing platform: PanasonicHeatPumpHomebridgePlugin [28/02/2024, 08:24:00] [@hernas/homebridge-panasonic-heat-pump] accessory accessory from cache: DLV_CASA [28/02/2024, 08:24:00] [@hernas/homebridge-panasonic-heat-pump] accessory accessory from cache: DLV_CASA [28/02/2024, 08:24:00] Publishing bridge accessory (name: @hernas/homebridge-panasonic-heat-pump, publishInfo: { username: '', port: 42615, pincode: '*-*-', category: 2, bind: undefined, mdns: undefined, addIdentifyingMaterial: true, advertiser: 'avahi' }). [28/02/2024, 08:24:00] [@hernas/homebridge-panasonic-heat-pump] Executed didFinishLaunching callback [28/02/2024, 08:24:00] [@hernas/homebridge-panasonic-heat-pump] Fetching devices [28/02/2024, 08:24:00] [@hernas/homebridge-panasonic-heat-pump] Fetching devices [28/02/2024, 08:24:00] Homebridge v1.7.0 (HAP v0.11.1) (@hernas/homebridge-panasonic-heat-pump) is running on port 42615. [28/02/2024, 08:24:03] [@hernas/homebridge-panasonic-heat-pump] Authenticated to Aquarea Smart Panasonic [28/02/2024, 08:24:03] [@hernas/homebridge-panasonic-heat-pump] Device conf: { "deviceGuid": "B166795782", "configration": [ { "zoneInfo": [ { "zoneSensor": "Internal", "coolMode": "enable", "heatSensor": "Direct", "coolSensor": "Direct", "outdoorType": "STD", "zoneId": 1, "zoneType": "Room", "zoneName": "Salón" } ], "a2wName": "DLV_CASA", "operationMode": "Heat", "deviceGuid": "007B166795782", "lastErrorNumber": "", "bivalent": "No", "specialStatus": 0, "tankInfo": [ { "tankType": "Internal", "tank": "Yes" } ], "forceHeater": 0, "firmVersion": "040602" } ] } [28/02/2024, 08:24:03] [@hernas/homebridge-panasonic-heat-pump] Restoring existing accessory from cache: DLV_CASA [28/02/2024, 08:24:03] [@hernas/homebridge-panasonic-heat-pump] Restoring existing accessory from cache: DLV_CASA [28/02/2024, 08:24:03] [@hernas/homebridge-panasonic-heat-pump] Readings: { "temperatureNow": 23, "heatingCoolingState": 1, "targetHeatingCoolingState": 1, "outdoorTemperatureNow": 8, "tankTemperatureNow": 45, "tankTemperatureSet": 47, "tankHeatingCoolingState": 0, "tankTargetHeatingCoolingState": 1, "isActive": true, "ecoModeIsActive": false, "comfortModeIsActive": false, "tankTemperatureMax": 65, "tankTemperatureMin": 40, "targetTempSet": 23, "targetTempMin": 10, "targetTempMax": 30, "tempType": "heat" } [28/02/2024, 08:24:03] [@hernas/homebridge-panasonic-heat-pump] Updating: DLV_CASA [a6043e00-2438-4a19-809b-7ce6c912f6a8] [28/02/2024, 08:24:03] [@hernas/homebridge-panasonic-heat-pump] Updating TargetTemperature of Floor Heater: {"minValue":33,"maxValue":53,"minStep":1} [28/02/2024, 08:24:03] [@hernas/homebridge-panasonic-heat-pump] Updating: DLV_CASA [45de39c0-0d6d-463b-8c72-d901cf216991] [28/02/2024, 08:24:03] [@hernas/homebridge-panasonic-heat-pump] Updating outdoor temp: 8

bimusiek commented 8 months ago

@JJJMlo Can you try https://github.com/Hernas/homebridge-panasonic-heat-pump/releases/tag/v1.6.3 ? I made mistake indeed and it was not discovering proper zoneSensor (I checked for internal instead of Internal, just a capital letter)

JJJMlo commented 8 months ago

@JJJMlo Can you try https://github.com/Hernas/homebridge-panasonic-heat-pump/releases/tag/v1.6.3 ? I made mistake indeed and it was not discovering proper zoneSensor (I checked for internal instead of Internal, just a capital letter)

The sensor its now working but, the preset it's between 32 and 52 degrees.

bimusiek commented 8 months ago

Either it takes time for Apple to change presents or you have to clear this device from cache and add it again.

JJJMlo commented 8 months ago

Either it takes time for Apple to change presents or you have to clear this device from cache and add it again.

You were right. I reconnect and works perfectly. Really appreciate the work you have done. Thank you very much.