PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 43 forks source link

Opentherm Gateway #14

Closed arcidodo closed 8 years ago

arcidodo commented 8 years ago

hello,

here is some information about the opentherm gateway i sea the heating item now as a switch in Eve. is it possible to support this?

{ "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 0, "Data" : "16.0", "Description" : "", "Favorite" : 1, "HardwareID" : 1, "HardwareName" : "OpenTherm Gateway", "HardwareType" : "OpenTherm Gateway USB", "HardwareTypeVal" : 18, "HaveTimeout" : false, "ID" : "0000005", "LastUpdate" : "2016-02-15 23:46:43", "Name" : "Room Setpoint", "Notifications" : "false", "PlanID" : "3", "PlanIDs" : [ 3, 12 ], "Protected" : false, "SetPoint" : "16.0", "ShowNotifications" : true, "SignalLevel" : "-", "SubType" : "SetPoint", "Timers" : "true", "Type" : "Thermostat", "TypeImg" : "override_mini", "Unit" : 0, "Used" : 1, "XOffset" : "0", "YOffset" : "0", "idx" : "17" },

{ "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 15, "Data" : "Off", "Description" : "", "Favorite" : 0, "HardwareID" : 1, "HardwareName" : "OpenTherm Gateway", "HardwareType" : "OpenTherm Gateway USB", "HardwareTypeVal" : 18, "HaveDimmer" : true, "HaveGroupCmd" : true, "HaveTimeout" : false, "ID" : "0000071", "Image" : "Heating", "IsSubDevice" : false, "LastUpdate" : "2016-02-15 23:12:43", "Level" : 0, "LevelInt" : 0, "MaxDimLevel" : 15, "Name" : "FlameOn", "Notifications" : "false", "PlanID" : "0", "PlanIDs" : [ 0 ], "Protected" : true, "ShowNotifications" : true, "SignalLevel" : "-", "Status" : "Off", "StrParam1" : "", "StrParam2" : "", "SubType" : "AC", "SwitchType" : "On/Off", "SwitchTypeVal" : 0, "Timers" : "false", "Type" : "Lighting 2", "TypeImg" : "lightbulb", "Unit" : 1, "Used" : 1, "UsedByCamera" : false, "XOffset" : "0", "YOffset" : "0", "idx" : "11" },

{ "AddjMulti" : 1.0, "AddjMulti2" : 1.0, "AddjValue" : 0.0, "AddjValue2" : 0.0, "BatteryLevel" : 255, "CustomImage" : 0, "Data" : "18.6 C", "Description" : "", "Favorite" : 1, "HardwareID" : 1, "HardwareName" : "OpenTherm Gateway", "HardwareType" : "OpenTherm Gateway USB", "HardwareTypeVal" : 18, "HaveTimeout" : false, "ID" : "0008", "LastUpdate" : "2016-02-15 23:46:43", "Name" : "Room Temperature", "Notifications" : "false", "PlanID" : "3", "PlanIDs" : [ 3, 12 ], "Protected" : false, "ShowNotifications" : true, "SignalLevel" : "-", "SubType" : "TFA 30.3133", "Temp" : 18.60, "Timers" : "false", "Type" : "Temp", "TypeImg" : "temperature", "Unit" : 8, "Used" : 1, "XOffset" : "0", "YOffset" : "0", "idx" : "18" },

PatchworkBoy commented 8 years ago

Am guessing you want idx 17 (Type “Thermostat”) to show up as a temperature reading, whereas idx 18 already shows up correctly as a temperature reading and idx 11 already shows up correctly as a switch?

PatchworkBoy commented 8 years ago

OK - VERY experimental support added in https://github.com/PatchworkBoy/homebridge-eDomoticz/commit/737339188e456022554601affa8242ca5426b956 - I’ve got no way to test this one at all! It should read the current setPoint and allow you to change it also (have assumed that OpenTherm sensors use the same endpoint as EvoHome sensors within the Domoticz JSON API for control)

Let me know how you get on!

arcidodo commented 8 years ago

thanks for helping me out here! but this is whats happend,

`Loaded config.json with 0 accessories and 1 platforms.

Loading 1 platforms... [eDomoticz] Initializing eDomoticz platform... [eDomoticz] Fetching Domoticz lights and switches... Loading 0 accessories... [eDomoticz] Initializing platform accessory 'Arco Iphone'... [eDomoticz] Initializing platform accessory 'Gang'... [eDomoticz] Initializing platform accessory 'Keuken'... [eDomoticz] Initializing platform accessory 'Keuken afzuigkap'... [eDomoticz] Initializing platform accessory 'Keuken eettafel'... [eDomoticz] Initializing platform accessory 'Keuken kast'... [eDomoticz] Initializing platform accessory 'Keuken spotjes'... [eDomoticz] Initializing platform accessory 'Room Setpoint'... events.js:197 throw new TypeError('listener must be a function'); ^

TypeError: listener must be a function at addListener (events.js:197:11) at Object.eDomoticzAccessory.getServices (/usr/local/lib/node_modules/homebridge-edomoticz/index.js:1217:99) at Server._createAccessory (/usr/local/lib/node_modules/homebridge/lib/server.js:235:36) at Server. (/usr/local/lib/node_modules/homebridge/lib/server.js:221:32) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:15:19 at callbackLater (/usr/local/lib/node_modules/homebridge-edomoticz/index.js:423:37) at Object. (/usr/local/lib/node_modules/homebridge-edomoticz/index.js:453:17) at Request.self.callback (/usr/local/lib/node_modules/homebridge-edomoticz/node_modules/request/request.js:198:22) at emitTwo (events.js:87:13) at Request.emit (events.js:172:7) `

IDX type 17 is the setpoint of the thermostat IDX type 18 is the actual temperature of the room, but indeed thats shows up correctly IDX type 11 is a switch if the boiler is on or off

PatchworkBoy commented 8 years ago

Is that after a full update of the plugin via npm? That issue was fixed in a release later on yesterday....

PatchworkBoy commented 8 years ago

(0.1.18 onwards)

arcidodo commented 8 years ago

ahh ok, its working indeed but it shows up like this:

image

PatchworkBoy commented 8 years ago

Update to v0.1.21 and give it another try please...!

arcidodo commented 8 years ago

image

image

much better but it's not setting the setpoint in domoitcz.

PatchworkBoy commented 8 years ago

I had to guess at the json.htm url to send the command to - hence it being experimental support. Obvs I got it wrong! Will check the wiki.

PatchworkBoy commented 8 years ago

Just pushed 0.1.22 with some tweaks to the URL - try that...

arcidodo commented 8 years ago

image

whaaat! its working! thanks man!!

PatchworkBoy commented 8 years ago

Awesome! Enjoy!!