Homebridge to Openluup
-
Sharing what I believe is a great way to add support to devices that used to work but since existing plugin haven't been maintain by the original authors (or any other developer in the community) have stopped working as they've abandon or moved to other platform...
Homebridge has a large and very active community and I think this type of plugin will a good way to benefit from it.
It will bring any device that have been configured in homebridge into openluup.
Currently it support, thermostat (Nest and others), Switches (Specially MyQ), Dimmers, Switches, Motion Sensors, Door Lock (Open/close) Support to other type of device can easily be added.
Homebridge2Openluup
Installation:- upload the files to /you_openluup_directory/files/
- create a new device with D_Homebridge2openluup1.xml
- Set your hombredige IP, username, password to the deivce's attributes
- Capture the uuid of the device you would like to bring from Homebridge into openluup by looking at your openluup logs when starting
- based on the device type, set DeviceList Variable
T for thermostat
D for dimmers
S for switches
G for garage doors
L for Locks
A for motion sensorsand build a string device type are delimited by a ; (semicolong) and device's uui by a , (comma) like this:
T:homebridge_thermostat1_uuid,homebridge_thermostat2_uuid;D:homebridge_dimmer1_uuid,homebridge_dimmer2_uuid etcThis still in beta, would love to add async next and support to shades and other sensors.
-
Hi Ron, thanks for that.
Not a HomeBridge user myself (yet) but it might be nice to have a version of the above information in the GitHub README file.
Hope all's well (as it can be!)
AK
-
I will add my Thanks as well. This is a great addition! I use Homekit in the other direction but I can definitely see use cases for this.
-
thanks @akbooer . I'll be adding the installation instructions to the readme file... By the way, this plugin also works for ecobee thermostat, the native ecobee lua plugin by @rafale77 works ok when there is only one thermostat in the ecobee account but when more than one, ecobee server keeps deauthorizing the plugin...
@rafale77 I also use homebridge the other way (openluup to homebridge) and is great.
I'm currently using it for:
- Nest thermostats with google accounts.
- Ecobee accounts with multiple thermostats
- AUX Mini split with built-in wifi modules
Planning on adding control for AppleTV , Ring devices, Doorbird motion detection and many more...
It will allow us to finally include many of the popular cloud based devices that own into the openluup environment...
Something really cool about homebridge is that the manual and basic automation can be done from within homekit by the end-user, but deeper logic can be done from within openluup. Thinking about bringing node-red into the mix also... anyhow... I hope it can be useful for everyone here...
-
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:
-
A bit farfetched at the moment but I just had a brainfart that I could bridge my Home Assistant components to homekit and then fetch them back into openLuup using this plugin... pretty awesome.
-
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
-
@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?
4/41