GithubHelp home page GithubHelp logo

Comments (2)

henryblackman avatar henryblackman commented on July 25, 2024

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.

from homebridge-edomoticz.

PatchworkBoy avatar PatchworkBoy commented on July 25, 2024

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!

from homebridge-edomoticz.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.