Homebridge to Openluup
-
Hi ronluna
Great to see more stuff supporting openLuup and the like. If you feel like adding the plugin to the Alt App Store; I can add it to the list of available plugins:
-
My thermostats show values in Fahrenheit, is there a way to change to Celsius?
I found this in the log but doesn't seem to have any effect.homebridge2openluup debug: Engine Global Temperature Unit = C
-
My thermostats show values in Fahrenheit, is there a way to change to Celsius?
I found this in the log but doesn't seem to have any effect.homebridge2openluup debug: Engine Global Temperature Unit = C
-
Just added some fixes for Celsius @crille Please test the latest update from the github repo.
-
Just added some fixes for Celsius @crille Please test the latest update from the github repo.
-
@ronluna I cannot change setpoint though.
Homebridge:[string "L_Homebridge2openluup1.lua"]:83: attempt to compare number with string
-
Hi ronluna
Great to see more stuff supporting openLuup and the like. If you feel like adding the plugin to the Alt App Store; I can add it to the list of available plugins:
-
@ronluna I reinstalled the plugin from altappstore but still can't change setpoint. It's sending the wrong characteristicType
2021-03-19 08:47:29.288 luup_log:17: homebridge2openluup debug: Homebridge Put device VALUE = 23 2021-03-19 08:47:29.288 luup_log:17: homebridge2openluup debug: request_body for everything else = {"characteristicType":"HeatingThresholdTemperature","value":"23"} 2021-03-19 08:47:29.288 luup_log:17: homebridge2openluup debug: PUT Auth = Bearer XXXXXXXXXX 2021-03-19 08:47:29.288 luup_log:17: homebridge2openluup debug: PUT Request Body = {"characteristicType":"HeatingThresholdTemperature","value":"23"} 2021-03-19 08:47:29.288 luup_log:17: homebridge2openluup debug: PUT Request Length = 65 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: URL request result: r = 1 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: URL request result: c = 400 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: URL request result: h = table: 0x55b66e8b2910 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: PUT Access Token = XXXXXXXXXX 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: response_body PUT 1 = {"statusCode":400,"message":"Invalid characteristicType. Valid types are: 'TargetHeatingCoolingState', 'TargetTemperature', 'TemperatureDisplayUnits', 'RotationSpeed', 'TargetHorizontalTiltAngle', 'TargetVerticalTiltAngle'.","error":"Bad Request"} 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: HTTP 400 Bad Request: JSON parse error
-
@ronluna I reinstalled the plugin from altappstore but still can't change setpoint. It's sending the wrong characteristicType
2021-03-19 08:47:29.288 luup_log:17: homebridge2openluup debug: Homebridge Put device VALUE = 23 2021-03-19 08:47:29.288 luup_log:17: homebridge2openluup debug: request_body for everything else = {"characteristicType":"HeatingThresholdTemperature","value":"23"} 2021-03-19 08:47:29.288 luup_log:17: homebridge2openluup debug: PUT Auth = Bearer XXXXXXXXXX 2021-03-19 08:47:29.288 luup_log:17: homebridge2openluup debug: PUT Request Body = {"characteristicType":"HeatingThresholdTemperature","value":"23"} 2021-03-19 08:47:29.288 luup_log:17: homebridge2openluup debug: PUT Request Length = 65 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: URL request result: r = 1 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: URL request result: c = 400 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: URL request result: h = table: 0x55b66e8b2910 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: PUT Access Token = XXXXXXXXXX 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: response_body PUT 1 = {"statusCode":400,"message":"Invalid characteristicType. Valid types are: 'TargetHeatingCoolingState', 'TargetTemperature', 'TemperatureDisplayUnits', 'RotationSpeed', 'TargetHorizontalTiltAngle', 'TargetVerticalTiltAngle'.","error":"Bad Request"} 2021-03-19 08:47:29.303 luup_log:17: homebridge2openluup debug: HTTP 400 Bad Request: JSON parse error
@crille I thought there were only two type of temperature controller (Thermostat and HeaterCooler) in homebridge/homekit but apparently I'm wrong. I also thought homebridge/homekit (depending on the device type) would force device to share the same characteristicType ... Seems like I was wrong again... so depending on the plugin being used on homebridge the author may very well define the characteristicType somewhat differently to other plugin-ins...
What kind of thermostat is configured on your homebridge setup? Brand / model . Can you please share the json response when the plug-in is updating the device’s values.. similar to this:
2021-03-21 07:24:20.861 luup_log:83: homebridge2openluup debug: concat_response_body 1 = {"aid":339,"iid":8,"uuid":"0000004A-0000-1000-8000-0026BB765291","type":"Thermostat","humanType":"Thermostat","serviceName":"My ecobee","serviceCharacteristics":[{"aid":339,"iid":10,"uuid":"0000000F-0000-1000-8000-0026BB765291","type":"CurrentHeatingCoolingState","serviceType":"Thermostat","serviceName":"My ecobee","description":"Current Heating Cooling State","value":0,"format":"uint8","perms":["ev","pr"],"maxValue":2,"minValue":0,"minStep":1,"canRead":true,"canWrite":false,"ev":true},{"aid":339,"iid":11,"uuid":"00000033-0000-1000-8000-0026BB765291","type":"TargetHeatingCoolingState","serviceType":"Thermostat","serviceName":"My ecobee","description":"Target Heating Cooling State","value":0,"format":"uint8","perms":["ev","pr","pw"],"maxValue":3,"minValue":0,"minStep":1,"canRead":true,"canWrite":true,"ev":true},{"aid":339,"iid":12,"uuid":"00000011-0000-1000-8000-0026BB765291","type":"CurrentTemperature","serviceType":"Thermostat","serviceName":"My ecobee","description":"Current Temperature","value":24.3667,"format":"float","perms":["ev","pr"],"unit":"celsius","maxValue":37.77777777777778,"minValue":-73.33333333333333,"minStep":0.1,"canRead":true,"canWrite":false,"ev":true},{"aid":339,"iid":13,"uuid":"00000035-0000-1000-8000-0026BB765291","type":"TargetTemperature","serviceType":"Thermostat","serviceName":"My ecobee","description":"Target Temperature","value":23.8556,"format":"float","perms":["ev","pr","pw"],"unit":"celsius","maxValue":26.666666666666664,"minValue":15.555555555555555,"minStep":0.1,"canRead":true,"canWrite":true,"ev":true},{"aid":339,"iid":14,"uuid":"00000036-0000-1000-8000-0026BB765291","type":"TemperatureDisplayUnits","serviceType":"Thermostat","serviceName":"My ecobee","description":"Temperature Display Units","value":1,"format":"uint8","perms":["ev","pr","pw"],"maxValue":1,"minValue":0,"minStep":1,"canRead":true,"canWrite":true,"ev":true}],"accessoryInformation":{"Manufacturer":"ecobee","Model":"nikeSmart","Name":"My ecobee","Serial Number":"Vera ID: 173","Firmware Revision":"0.8.3-beta.12"},"values":{"CurrentHeatingCoolingState":0,"TargetHeatingCoolingState":0,"CurrentTemperature":24.3667,"TargetTemperature":23.8556,"TemperatureDisplayUnits":1},"instance":{"name":"homebridge","username":"0E:10:83:81:C6:A5","ipAddress":"10.1.11.21","port":51706,"services":[],"connectionFailedCount":0},"uniqueId":"240d0198fc8289b3b5a77315b7e4ec132096ddbd6e6beb5e4c174a6a84908e8d"}
-
@crille I thought there were only two type of temperature controller (Thermostat and HeaterCooler) in homebridge/homekit but apparently I'm wrong. I also thought homebridge/homekit (depending on the device type) would force device to share the same characteristicType ... Seems like I was wrong again... so depending on the plugin being used on homebridge the author may very well define the characteristicType somewhat differently to other plugin-ins...
What kind of thermostat is configured on your homebridge setup? Brand / model . Can you please share the json response when the plug-in is updating the device’s values.. similar to this:
2021-03-21 07:24:20.861 luup_log:83: homebridge2openluup debug: concat_response_body 1 = {"aid":339,"iid":8,"uuid":"0000004A-0000-1000-8000-0026BB765291","type":"Thermostat","humanType":"Thermostat","serviceName":"My ecobee","serviceCharacteristics":[{"aid":339,"iid":10,"uuid":"0000000F-0000-1000-8000-0026BB765291","type":"CurrentHeatingCoolingState","serviceType":"Thermostat","serviceName":"My ecobee","description":"Current Heating Cooling State","value":0,"format":"uint8","perms":["ev","pr"],"maxValue":2,"minValue":0,"minStep":1,"canRead":true,"canWrite":false,"ev":true},{"aid":339,"iid":11,"uuid":"00000033-0000-1000-8000-0026BB765291","type":"TargetHeatingCoolingState","serviceType":"Thermostat","serviceName":"My ecobee","description":"Target Heating Cooling State","value":0,"format":"uint8","perms":["ev","pr","pw"],"maxValue":3,"minValue":0,"minStep":1,"canRead":true,"canWrite":true,"ev":true},{"aid":339,"iid":12,"uuid":"00000011-0000-1000-8000-0026BB765291","type":"CurrentTemperature","serviceType":"Thermostat","serviceName":"My ecobee","description":"Current Temperature","value":24.3667,"format":"float","perms":["ev","pr"],"unit":"celsius","maxValue":37.77777777777778,"minValue":-73.33333333333333,"minStep":0.1,"canRead":true,"canWrite":false,"ev":true},{"aid":339,"iid":13,"uuid":"00000035-0000-1000-8000-0026BB765291","type":"TargetTemperature","serviceType":"Thermostat","serviceName":"My ecobee","description":"Target Temperature","value":23.8556,"format":"float","perms":["ev","pr","pw"],"unit":"celsius","maxValue":26.666666666666664,"minValue":15.555555555555555,"minStep":0.1,"canRead":true,"canWrite":true,"ev":true},{"aid":339,"iid":14,"uuid":"00000036-0000-1000-8000-0026BB765291","type":"TemperatureDisplayUnits","serviceType":"Thermostat","serviceName":"My ecobee","description":"Temperature Display Units","value":1,"format":"uint8","perms":["ev","pr","pw"],"maxValue":1,"minValue":0,"minStep":1,"canRead":true,"canWrite":true,"ev":true}],"accessoryInformation":{"Manufacturer":"ecobee","Model":"nikeSmart","Name":"My ecobee","Serial Number":"Vera ID: 173","Firmware Revision":"0.8.3-beta.12"},"values":{"CurrentHeatingCoolingState":0,"TargetHeatingCoolingState":0,"CurrentTemperature":24.3667,"TargetTemperature":23.8556,"TemperatureDisplayUnits":1},"instance":{"name":"homebridge","username":"0E:10:83:81:C6:A5","ipAddress":"10.1.11.21","port":51706,"services":[],"connectionFailedCount":0},"uniqueId":"240d0198fc8289b3b5a77315b7e4ec132096ddbd6e6beb5e4c174a6a84908e8d"}
@ronluna I thought so as well. That’s why I thought any device configured as a thermostat in homebridge would have the same characteristics and your plugin would support it.
My “thermostat” is another homebridge plugin for MELCloud (Mitsubishi cloud for my WiFi connected inverters).Here is the json response:
luup_log:17: homebridge2openluup debug: concat_response_body 1 = {"aid":60,"iid":8,"uuid":"0000004A-0000-1000-8000-0026BB765291","type":"Thermostat","humanType":"Thermostat","serviceName":"Övervåningen","serviceCharacteristics":[{"aid":60,"iid":10,"uuid":"0000000F-0000-1000-8000-0026BB765291","type":"CurrentHeatingCoolingState","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Current Heating Cooling State","value":1,"format":"uint8","perms":["pr","ev"],"maxValue":2,"minValue":0,"canRead":true,"canWrite":false,"ev":true},{"aid":60,"iid":11,"uuid":"00000033-0000-1000-8000-0026BB765291","type":"TargetHeatingCoolingState","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Target Heating Cooling State","value":1,"format":"uint8","perms":["pr","pw","ev"],"maxValue":3,"minValue":0,"canRead":true,"canWrite":true,"ev":true},{"aid":60,"iid":12,"uuid":"00000011-0000-1000-8000-0026BB765291","type":"CurrentTemperature","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Current Temperature","value":23,"format":"float","perms":["pr","ev"],"unit":"celsius","maxValue":100,"minValue":0,"minStep":0.1,"canRead":true,"canWrite":false,"ev":true},{"aid":60,"iid":13,"uuid":"00000035-0000-1000-8000-0026BB765291","type":"TargetTemperature","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Target Temperature","value":22,"format":"float","perms":["pr","pw","ev"],"unit":"celsius","maxValue":38,"minValue":10,"minStep":0.1,"canRead":true,"canWrite":true,"ev":true},{"aid":60,"iid":14,"uuid":"00000036-0000-1000-8000-0026BB765291","type":"TemperatureDisplayUnits","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Temperature Display Units","value":0,"format":"uint8","perms":["pr","pw","ev"],"maxValue":1,"minValue":0,"canRead":true,"canWrite":true,"ev":true},{"aid":60,"iid":15,"uuid":"00000029-0000-1000-8000-0026BB765291","type":"RotationSpeed","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Rotation Speed","value":60,"format":"float","perms":["pr","pw","ev"],"unit":"percentage","maxValue":100,"minValue":0,"minStep":1,"canRead":true,"canWrite":true,"ev":true},{"aid":60,"iid":16,"uuid":"0000006C-0000-1000-8000-0026BB765291","type":"CurrentHorizontalTiltAngle","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Current Horizontal Tilt Angle","value":0,"format":"int","perms":["pr","ev"],"unit":"arcdegrees","maxValue":90,"minValue":-90,"minStep":1,"canRead":true,"canWrite":false,"ev":true},{"aid":60,"iid":17,"uuid":"0000007B-0000-1000-8000-0026BB765291","type":"TargetHorizontalTiltAngle","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Target Horizontal Tilt Angle","value":0,"format":"int","perms":["pr","pw","ev"],"unit":"arcdegrees","maxValue":90,"minValue":-90,"minStep":1,"canRead":true,"canWrite":true,"ev":true},{"aid":60,"iid":18,"uuid":"0000006E-0000-1000-8000-0026BB765291","type":"CurrentVerticalTiltAngle","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Current Vertical Tilt Angle","value":-45,"format":"int","perms":["pr","ev"],"unit":"arcdegrees","maxValue":90,"minValue":-90,"minStep":1,"canRead":true,"canWrite":false,"ev":true},{"aid":60,"iid":19,"uuid":"0000007D-0000-1000-8000-0026BB765291","type":"TargetVerticalTiltAngle","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Target Vertical Tilt Angle","value":-45,"format":"int","perms":["pr","pw","ev"],"unit":"arcdegrees","maxValue":90,"minValue":-90,"minStep":1,"canRead":true,"canWrite":true,"ev":true}],"accessoryInformation":{"Manufacturer":"Mitsubishi","Model":"Default-Model","Name":"Övervåningen","Serial Number":"1805118279","Firmware Revision":"0.3.4"},"values":{"CurrentHeatingCoolingState":0,"TargetHeatingCoolingState":0,"CurrentTemperature":0,"TargetTemperature":10,"TemperatureDisplayUnits":0,"RotationSpeed":0,"CurrentHorizontalTiltAngle":-90,"TargetHorizontalTiltAngle":-90,"CurrentVerticalTiltAngle":-90,"TargetVerticalTiltAngle":-90},"instance":{"name":"homebridge","username":"CC:22:3D:E3:CE:43","ipAddress":"127.0.0.1","port":51826,"services":[],"connectionFailedCount":0},"uniqueId":"8f37721c51dc9fd6b15aad7024d6a8460038b1ee7e6fb23c732f1abc5bcfb8fd"}
-
@ronluna I thought so as well. That’s why I thought any device configured as a thermostat in homebridge would have the same characteristics and your plugin would support it.
My “thermostat” is another homebridge plugin for MELCloud (Mitsubishi cloud for my WiFi connected inverters).Here is the json response:
luup_log:17: homebridge2openluup debug: concat_response_body 1 = {"aid":60,"iid":8,"uuid":"0000004A-0000-1000-8000-0026BB765291","type":"Thermostat","humanType":"Thermostat","serviceName":"Övervåningen","serviceCharacteristics":[{"aid":60,"iid":10,"uuid":"0000000F-0000-1000-8000-0026BB765291","type":"CurrentHeatingCoolingState","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Current Heating Cooling State","value":1,"format":"uint8","perms":["pr","ev"],"maxValue":2,"minValue":0,"canRead":true,"canWrite":false,"ev":true},{"aid":60,"iid":11,"uuid":"00000033-0000-1000-8000-0026BB765291","type":"TargetHeatingCoolingState","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Target Heating Cooling State","value":1,"format":"uint8","perms":["pr","pw","ev"],"maxValue":3,"minValue":0,"canRead":true,"canWrite":true,"ev":true},{"aid":60,"iid":12,"uuid":"00000011-0000-1000-8000-0026BB765291","type":"CurrentTemperature","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Current Temperature","value":23,"format":"float","perms":["pr","ev"],"unit":"celsius","maxValue":100,"minValue":0,"minStep":0.1,"canRead":true,"canWrite":false,"ev":true},{"aid":60,"iid":13,"uuid":"00000035-0000-1000-8000-0026BB765291","type":"TargetTemperature","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Target Temperature","value":22,"format":"float","perms":["pr","pw","ev"],"unit":"celsius","maxValue":38,"minValue":10,"minStep":0.1,"canRead":true,"canWrite":true,"ev":true},{"aid":60,"iid":14,"uuid":"00000036-0000-1000-8000-0026BB765291","type":"TemperatureDisplayUnits","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Temperature Display Units","value":0,"format":"uint8","perms":["pr","pw","ev"],"maxValue":1,"minValue":0,"canRead":true,"canWrite":true,"ev":true},{"aid":60,"iid":15,"uuid":"00000029-0000-1000-8000-0026BB765291","type":"RotationSpeed","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Rotation Speed","value":60,"format":"float","perms":["pr","pw","ev"],"unit":"percentage","maxValue":100,"minValue":0,"minStep":1,"canRead":true,"canWrite":true,"ev":true},{"aid":60,"iid":16,"uuid":"0000006C-0000-1000-8000-0026BB765291","type":"CurrentHorizontalTiltAngle","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Current Horizontal Tilt Angle","value":0,"format":"int","perms":["pr","ev"],"unit":"arcdegrees","maxValue":90,"minValue":-90,"minStep":1,"canRead":true,"canWrite":false,"ev":true},{"aid":60,"iid":17,"uuid":"0000007B-0000-1000-8000-0026BB765291","type":"TargetHorizontalTiltAngle","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Target Horizontal Tilt Angle","value":0,"format":"int","perms":["pr","pw","ev"],"unit":"arcdegrees","maxValue":90,"minValue":-90,"minStep":1,"canRead":true,"canWrite":true,"ev":true},{"aid":60,"iid":18,"uuid":"0000006E-0000-1000-8000-0026BB765291","type":"CurrentVerticalTiltAngle","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Current Vertical Tilt Angle","value":-45,"format":"int","perms":["pr","ev"],"unit":"arcdegrees","maxValue":90,"minValue":-90,"minStep":1,"canRead":true,"canWrite":false,"ev":true},{"aid":60,"iid":19,"uuid":"0000007D-0000-1000-8000-0026BB765291","type":"TargetVerticalTiltAngle","serviceType":"Thermostat","serviceName":"Övervåningen","description":"Target Vertical Tilt Angle","value":-45,"format":"int","perms":["pr","pw","ev"],"unit":"arcdegrees","maxValue":90,"minValue":-90,"minStep":1,"canRead":true,"canWrite":true,"ev":true}],"accessoryInformation":{"Manufacturer":"Mitsubishi","Model":"Default-Model","Name":"Övervåningen","Serial Number":"1805118279","Firmware Revision":"0.3.4"},"values":{"CurrentHeatingCoolingState":0,"TargetHeatingCoolingState":0,"CurrentTemperature":0,"TargetTemperature":10,"TemperatureDisplayUnits":0,"RotationSpeed":0,"CurrentHorizontalTiltAngle":-90,"TargetHorizontalTiltAngle":-90,"CurrentVerticalTiltAngle":-90,"TargetVerticalTiltAngle":-90},"instance":{"name":"homebridge","username":"CC:22:3D:E3:CE:43","ipAddress":"127.0.0.1","port":51826,"services":[],"connectionFailedCount":0},"uniqueId":"8f37721c51dc9fd6b15aad7024d6a8460038b1ee7e6fb23c732f1abc5bcfb8fd"}
-
@ronluna Sorry, but it does not work.
I believe the MELCloud plugin only accepts "TargetTemperature" for changing Setpoint
luup_log:17: homebridge2openluup debug: response_body PUT 1 = {"statusCode":400,"message":"Invalid characteristicType. Valid types are: 'TargetHeatingCoolingState', 'TargetTemperature', 'TemperatureDisplayUnits', 'RotationSpeed', 'TargetHorizontalTiltAngle', 'TargetVerticalTiltAngle'.","error":"Bad Request"}
and not
luup.variable_set:: 18.urn:upnp-org:serviceId:TemperatureSetpoint1_Heat.CurrentSetpoint was: 22 now: 18 #hooks:0
This is only if you want to support the MELCloud provisioned thermostat, otherwise do not put to much energy in to it.
For me it would be at great way to control my temperature triggered by house modes since there is no MELCloud plugin for openLuup.
-
@ronluna Sorry, but it does not work.
I believe the MELCloud plugin only accepts "TargetTemperature" for changing Setpoint
luup_log:17: homebridge2openluup debug: response_body PUT 1 = {"statusCode":400,"message":"Invalid characteristicType. Valid types are: 'TargetHeatingCoolingState', 'TargetTemperature', 'TemperatureDisplayUnits', 'RotationSpeed', 'TargetHorizontalTiltAngle', 'TargetVerticalTiltAngle'.","error":"Bad Request"}
and not
luup.variable_set:: 18.urn:upnp-org:serviceId:TemperatureSetpoint1_Heat.CurrentSetpoint was: 22 now: 18 #hooks:0
This is only if you want to support the MELCloud provisioned thermostat, otherwise do not put to much energy in to it.
For me it would be at great way to control my temperature triggered by house modes since there is no MELCloud plugin for openLuup.
-
@crille said in Homebridge to Openluup:
TargetTemperature
That's characteristicType the plugin is trying to set for your plugin. Can your share what are the Manufacturer, Model and Type variables set to?
-
@crille are you certain you are using the latest L_Homebridge2openluup1.lua from github?
line 813 should read:
elseif thermostatManu == "Mitsubishi" and thermostatModel == "Default-Model" then -- FOR Mitsubishi