Open rionshin opened 1 month ago
Did you already check if there are incompatibilities? Looking at the deprecated APIs, there may be a few (but to be honest, I haven't actively developed on the plugin recently, so I'm not sure).
Overall, I think the needed changes seem limited.. The only thing is that I do not yet know when I'll have time to go over them and test it.
Did you already check if there are incompatibilities? Looking at the deprecated APIs, there may be a few (but to be honest, I haven't actively developed on the plugin recently, so I'm not sure).
Overall, I think the needed changes seem limited.. The only thing is that I do not yet know when I'll have time to go over them and test it.
@itavero i can fork it and check and let you know my findings.
@itavero - I review the code , you already using the correct classes and no where in the code i can find the old syntax that is obsoleted. So in some moment you can update package.json that "engines" is 2.0 ready.
Instead of const Units = Characteristic.Units; you will need to use const Units = api.hap.Units; (z2m is using api.hap.Units ) Instead of const Formats = Characteristic.Formats; you will need to use const Formats = api.hap.Formats; (z2m is using api.hap.Format) Instead of const Perms = Characteristic.Perms; you will need to use const Perms = api.hap.Perms; (z2m is using api.hap.Perms ) Characteristic.getValue() has been removed in favour of Characteristic.value (Characteristic.value is used) Accessory.getServiceByUUIDAndSubType() has been removed: Instead of accessory.getServiceByUUIDAndSubType(Service, 'some-name'); you can simply use accessory.getService('some-name'); - (can't find it in code) accessory.updateReachability() has been removed - reachability in general is no longer supported - can't be found in code
@rionshin Thanks for checking. I also just did a check and tried to actually run the plugin.. Did find some things already that need fixing, which I'm working on in #920
Problem description
homebridge will be releasing version 2.0 which will have breaking changes to existing plugins
Suggested solution
Make it HB 2.0 compatible . @itavero What is the plan for supporting Homebridge 2.0 - will the plugin be impacted and will it be easy to make it compatible with 2.0.
Alternative solutions
No response
Additional context / information
https://github.com/homebridge/homebridge/wiki/Updating-To-Homebridge-v2