homebridge-edomoticz icon indicating copy to clipboard operation
homebridge-edomoticz copied to clipboard

Add Setpoint root type to current heating / thermostat handler

Open gkirstei opened this issue 2 years ago • 6 comments

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.

gkirstei avatar Oct 21 '23 21:10 gkirstei

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

PatchworkBoy avatar Oct 22 '23 22:10 PatchworkBoy

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

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

PatchworkBoy avatar Oct 22 '23 22:10 PatchworkBoy

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"
}

gkirstei avatar Oct 23 '23 13:10 gkirstei

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.

PatchworkBoy avatar Oct 23 '23 17:10 PatchworkBoy

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

gkirstei avatar Oct 23 '23 18:10 gkirstei

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

Bertels999 avatar Dec 08 '23 11:12 Bertels999

All changes implemented and published to npm

PatchworkBoy avatar Mar 29 '24 15:03 PatchworkBoy