Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for Homebridge 2.0 #904

Open
rionshin opened this issue Jul 21, 2024 · 6 comments
Open

Support for Homebridge 2.0 #904

rionshin opened this issue Jul 21, 2024 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@rionshin
Copy link

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

@rionshin rionshin added the enhancement New feature or request label Jul 21, 2024
@itavero
Copy link
Owner

itavero commented Jul 23, 2024

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.

@rionshin
Copy link
Author

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.

@rionshin
Copy link
Author

@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

@itavero itavero self-assigned this Aug 1, 2024
@itavero
Copy link
Owner

itavero commented Aug 12, 2024

@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

@rionshin
Copy link
Author

rionshin commented Nov 1, 2024

@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

@itavero i notice Koenkk is preparing Z2M v.2 , will that affect your plugin : Koenkk/zigbee2mqtt#24198

@itavero
Copy link
Owner

itavero commented Nov 1, 2024

i notice Koenkk is preparing Z2M v.2 , will that affect your plugin : Koenkk/zigbee2mqtt#24198

I'd have to double check the MQTT changes, but at first glance I don't see anything that would break it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants