PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 44 forks source link

Add Setpoint root type to current heating / thermostat handler #274

Closed gkirstei closed 3 months ago

gkirstei commented 8 months ago

I am reaching out to report a compatibility issue I encountered with the homebridge-edomoticz plugin when integrating my Domoticz setup (beta version) with Apple's HomeKit. The Domoticz beta version was necessitated due to the inclusion of new OAuth authentication for the Netatmo hardware device, following changes in authentication by Netatmo.

Post this update, the setpoint thermostats in HomeKit now appear as "not supported." It seems the modifications made to the 'Thermostat Setpoint Device' in the Domoticz beta have affected the compatibility with HomeKit via your plugin. https://github.com/domoticz/domoticz/pull/5817 This feature was instrumental for me, and its malfunction impacts the system's usability significantly.

I understand that working with a beta version can introduce unforeseen issues, but since the Netatmo authentication change forced the use of the Domoticz beta version, addressing this compatibility issue would be highly beneficial to maintain the seamless HomeKit integration.

PatchworkBoy commented 8 months ago

Need a full sample json api output for a working device…

PatchworkBoy commented 8 months ago

Probably wants || this.Type == "Setpoint" adding at line 2226…

https://github.com/PatchworkBoy/homebridge-edomoticz/blob/c3bb69422b7288d5a5a829ab49d029ebfc6992f0/lib/domoticz_accessory.js#L2226

gkirstei commented 8 months ago

Here is a json from working device:

{
    "ActTime" : 1698066157,
    "AstrTwilightEnd" : "20:09",
    "AstrTwilightStart" : "06:05",
    "CivTwilightEnd" : "18:41",
    "CivTwilightStart" : "07:33",
    "DayLength" : "09:49",
    "NautTwilightEnd" : "19:25",
    "NautTwilightStart" : "06:49",
    "ServerTime" : "2023-10-23 16:02:37",
    "SunAtSouth" : "13:07",
    "Sunrise" : "08:13",
    "Sunset" : "18:01",
    "app_version" : "2023.2 (build 15607)",
    "result" : 
    [
        {
            "AddjMulti" : 1.0,
            "AddjMulti2" : 1.0,
            "AddjValue" : 0.0,
            "AddjValue2" : 0.0,
            "BatteryLevel" : 255,
            "CustomImage" : 15,
            "Data" : "20.0",
            "Description" : "",
            "Favorite" : 0,
            "HardwareDisabled" : false,
            "HardwareID" : 23,
            "HardwareName" : "Netatmo",
            "HardwareType" : "Netatmo",
            "HardwareTypeVal" : 54,
            "HaveTimeout" : false,
            "ID" : "0E14E02",
            "Image" : "Heating",
            "LastUpdate" : "2023-10-23 15:54:00",
            "Name" : "Halle",
            "Notifications" : "false",
            "PlanID" : "0",
            "PlanIDs" : 
            [
                0
            ],
            "Protected" : false,
            "SetPoint" : "20.0",
            "ShowNotifications" : true,
            "SignalLevel" : "-",
            "SubType" : "SetPoint",
            "Timers" : "false",
            "Type" : "Setpoint",
            "TypeImg" : "override_mini",
            "Unit" : 1,
            "Used" : 1,
            "XOffset" : "0",
            "YOffset" : "0",
            "idx" : "22980",
            "max" : 25.0,
            "min" : 15.0,
            "step" : 0.5,
            "vunit" : "\u00b0C"
        }
    ],
    "status" : "OK",
    "title" : "Devices"
}
PatchworkBoy commented 8 months ago

Yup, looks like copy paste suggested code from https://github.com/PatchworkBoy/homebridge-edomoticz/issues/274#issuecomment-1774219297 before the : at end of that line.

Restart homebridge. Test.

gkirstei commented 8 months ago

Solved. Thanks. Thermostat valves are responding to siri requests, again. :)

Bertels999 commented 6 months ago

and line 636:
var therm = ((this.Type == "Thermostat" || this.Type == "Setpoint") && this.subType == "SetPoint") ? true : false;

PatchworkBoy commented 3 months ago

All changes implemented and published to npm