Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

EvoHome Temperature Shows Target Temp Not Actual Temp #63

Closed
henryblackman opened this issue Nov 20, 2016 · 2 comments
Closed

EvoHome Temperature Shows Target Temp Not Actual Temp #63

henryblackman opened this issue Nov 20, 2016 · 2 comments

Comments

@henryblackman
Copy link

henryblackman commented Nov 20, 2016

Hello,

I'm using the EvoHome script integration, but I'm finding that the Eve and Home apps are showing the temperature of the room as the same as the target temperature, even though the JSON coming back from Domoticz is correct. Here's an example of the JSON for a particular room:

{
"AddjMulti" : 1.0,
"AddjMulti2" : 1.0,
"AddjValue" : 0.0,
"AddjValue2" : 0.0,
"BatteryLevel" : 255,
"CustomImage" : 0,
"Data" : "16.0 C, (22.0 C), PermanentOverride",
"Description" : "",
"Favorite" : 0,
"HardwareID" : 2,
"HardwareName" : "evohome",
"HardwareType" : "Evohome via script",
"HardwareTypeVal" : 40,
"HaveTimeout" : false,
"ID" : "1769913",
"LastUpdate" : "2016-11-20 14:07:31",
"Name" : "Corner Bedroo",
"Notifications" : "false",
"PlanID" : "0",
"PlanIDs" : [ 0 ],
"Protected" : false,
"SetPoint" : 22.0,
"ShowNotifications" : true,
"SignalLevel" : "-",
"Status" : "PermanentOverride",
"SubType" : "Zone",
"Temp" : 16.030,
"Timers" : "false",
"Type" : "Heating",
"TypeImg" : "override_mini",
"Unit" : 6,
"Used" : 1,
"XOffset" : "0",
"YOffset" : "0",
"idx" : "8"
}

As you can see the 'Temp' is showing as 16.03 degrees, but Home app is showing it as 22 degrees which is the SetPoint. Any ideas, or am I doing something wrong. I'm using the script version of the evohome client in Domoticz.

Thanks,
Henry

@henryblackman
Copy link
Author

henryblackman commented Nov 20, 2016

I've been having a look through the code in domoticz_accessory.js and pardon my ignorance, but it seems that the code is always retrieving the SetPoint no matter what.

Editing the local file on my system and adding a getTargetTemperature function right beneath the getTemperature function like so:

getTargetTemperature: function(callback) {
        Domoticz.deviceStatus(this, function(json) {
            var value;
            var sArray = Helper.sortByKey(json.result, "Name");
            sArray.map(function(s) {
                var heat = (this.subType == "Zone") ? true : false;
                var therm = (this.subType == "SetPoint") ? true : false;
                value = ((heat) || (therm)) ? Helper.oneDP(Helper.cleanFloat(s.SetPoint)) : Helper.oneDP(Helper.cleanFloat(s.Temp));
            }.bind(this));
            this.platform.log("Data Received for " + this.name + ": " + value);
            callback(null, value);
        }.bind(this));
    }

and altering line 1203 to the following:
HeatingDeviceService.getCharacteristic(Characteristic.TargetTemperature).on('get', this.getTargetTemperature.bind(this)).on('set', this.setPoint.bind(this));

seems to now mean the Home and Eve apps show the right setpoint, and the right actual temperature. I should probably be ashamed of the code, but it is difficult to know exactly what's happening in the function sArray.map is using.

This works for me and EvoHome although I don't know if it would work in other scenarios.

@PatchworkBoy
Copy link
Owner

PatchworkBoy commented Nov 20, 2016

It ONLY works for you and EvoHome is the issue. For everyone else, who likely has an independent upper setpoint, independent lower setpoint, independent heating on/off switch, and independent standalone temperature per room, all as separate devices within domoticz, it doesn’t work.

This is fairly well documented and discussed both in previous issues here, and in the eDomoticz thread on the Domoticz forums.

We either have to write specific code for every variant of thermostat out there, or generic code that can be applied to multiple hardware combinations, and I’m afraid since no-one out there is going to buy myself our Ramon one of every thermostat, the generic code has to remain for now. But feel free to implement the fix locally to suit your particular device. Just remember to put it back in place whenever you update.

Note: the device status is also never really accurately reflected, as for the regular “setpoint” device in Domoticz, it provides no status and no current temperature - only a setpoint temperature value.

See various prev issues on this topic: https://github.com/PatchworkBoy/homebridge-edomoticz/issues?utf8=✓&q=is%3Aissue%20is%3Aclosed%20thermostat

Sorry!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants