Homebridge to Openluup
-
@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
-
This post is deleted!
-
@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 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?
-
ronlunareplied to Crille on Mar 24, 2021, 11:51 AM last edited by ronluna Mar 24, 2021, 7:52 AM
@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
-
@ronluna Yes, but I think I found the issue.
I uploaded to /cmh-ludl/files/ first install and manual update but the AltAppstore version runs from /cmh-ludl?
where I get a permission denied when trying to replace the files. -
That looks like a permissions issue due to the folder structure having been created undera different user from the one that you're running under now. A quick fix should be to open up the permissions in that folder tree.
-
@akbooer just to be sure. Plugin files that resides in "cmh-ludl/" have a higher priority then "cmh-luld/files" right? in case the plugin was manually transferred but later installed from the AltUI app store and the user forgot to delete the plugin's file in "cmhd-ludl/files"
-
@ronluna said in Homebridge to Openluup:
Plugin files that resides in "cmh-ludl/" have a higher priority then "cmh-luld/files" right?
Here's the ground truth on search path order lifted straight from the openLuup file loader...
local f = open "openLuup/" -- 2016.06.18 look in openLuup/ (for AltAppStore) or open "./" -- current directory (cmh-ludl/) or open "../cmh-lu/" -- look in 'cmh-lu/' directory or open "files/" -- 2016.06.09 also look in files/ or open "www/" -- 2018.02.15 also look in www/ or open ("built-in/", vfs) -- 2019.05.29 also look in built-in/ for 'last chance' files
-
@crille said in Homebridge to Openluup:
THERMOSTAT_uuid
That's odd... It shouldn't do that...
is your deviceList Variable ending with a semicolon ";" after your uuid ?
-
@crille I've been renaming renaming devices on my end without experiencing what you are describing. Are both Mitsubishi thermostat? Do you mind sharing an entire log output after an engine reload, additional 5 second log for the first device've value refresh and log output while rename a homebridge device from within openluup?
20/41