homebridge / plugins

Information and resources for Homebridge plugins.
https://homebridge.io/w/Verified-Plugins
GNU General Public License v3.0
368 stars 17 forks source link

homebridge-gree-ac #575

Closed eibenp closed 1 year ago

eibenp commented 1 year ago

Link To GitHub Repo

https://github.com/eibenp/homebridge-gree-airconditioner

Link To NPM Package

https://www.npmjs.com/package/homebridge-gree-ac

github-actions[bot] commented 1 year ago

:white_check_mark: Pre-checks completed successfully.

bwp91 commented 1 year ago

Hi @eibenp

Nothing to do with verification, but I wonder if this could be published under a simpler name in npm.

What I have tried to do recently is get in contact with maintainers of old stale plugins to see if we can get maintainership of nice npm names, to avoid having so many plugins published to npm.

For example, Im assuming your plugin (havent had a proper look) is just a plugin for Gree air conditioners, so my initial thought is homebridge-gree-ac and whilst this name is taken on npm (https://www.npmjs.com/package/homebridge-gree-ac) I could try and get in contact with the dev on github to see if they would be willing to transfer the ownership of the name.

Is this something you'd be willing to try and wait for?

eibenp commented 1 year ago

Yes, this is ok for me2023. szept. 21. dátummal, 23:31 időpontban Ben @.***> írta: Hi @eibenp Nothing to do with verification, but I wonder if this could be published under a simpler name in npm. What I have tried to do recently is get in contact with maintainers of old stale plugins to see if we can get maintainership of nice npm names, to avoid having so many plugins published to npm. For example, Im assuming your plugin (havent had a proper look) is just a plugin for Gree air conditioners, so my initial thought is homebridge-gree-ac and whilst this name is taken on npm (https://www.npmjs.com/package/homebridge-gree-ac) I could try and get in contact with the dev on github to see if they would be willing to transfer the ownership of the name. Is this something you'd be willing to try and wait for?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

bwp91 commented 1 year ago

Yes, this is ok for me

Thanks, have created a request here https://github.com/duculete/homebridge-gree-ac/issues/6

Will see if I get a reply here.

bwp91 commented 1 year ago

Hi @eibenp

First of all thanks for your patience on the 'name change' issue, I think we are almost there but waiting for the other user to transfer the names over.

Anyway thought I would take the time to review the plugin anyway.

A few comments:

1

[30/09/2023, 21:27:28] The plugin "homebridge-gree-airconditioner" requires Node.js version of ^18.15.0 which does not satisfy the current Node.js version of v20.6.1. You may need to upgrade your installation of Node.js - see https://homebridge.io/w/JTKEF

A lot of users will be updating to node 20 now, so I would allow this in your package json (my recommendation would be to set it to "node": "^18.18.0 || ^20.8.0",, so disallow 'odd' versions of node)

2

[30/09/2023, 21:42:15] [GREE Air Conditioner] UDP server bind to port undefined

Great that this doesnt cause an error, but maybe this could be a log.warning(), to highlight that there has been a little issue with the plugin init? By the way this was with a super stripped config of (including child bridge info):

        {
            "name": "GREE Air Conditioner",
            "platform": "GREEAirConditioner",
            "_bridge": {
                "username": "0E:F9:FB:8C:25:93",
                "port": 42567
            }
        }

3

(and yeah im grasping at straws to find issues now!) I wondered if it would a better UI if the user entered the device ID first before the 'disabled' option

Screenshot 2023-09-30 at 21 50 14

I will show a video of how I account for device ids vs options and using the json features to show and hide fields as needed:

video:

https://github.com/homebridge/verified/assets/43026681/d492f907-c9ec-4ee0-bcfb-d34d2f7eedaf

code:

at https://github.com/bwp91/homebridge-govee/blob/0ab1b3a2f2446af3539aee4cb3d130e9ffafa411/config.schema.json#L926


Anyway none of the above is homebridge verified requirements, just (un)fortunately you had me verifying the plugin 😁


Happy for you to add a badge to your readme etc. For the moment I won't update our list of verified plugins, in case we have some success in getting the other existing plugin transferred over, so then you can publish with a nice name.

Will give this until next Saturday 7th October, otherwise I will happily add your existing plugin names to the official verified list.


Hope you are happy with all the above, any objections please feel free to reply 😃

github-actions[bot] commented 1 year ago

Everything Looks Good!

github-actions[bot] commented 1 year ago

Congratulations! Your plugin has been verified.

You can now add the Verified by Homebridge badge to your plugin's README:

verified-by-homebridge

[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)

Your plugin is now also eligible to display a :heart: Donate button on its tile in the Homebridge UI. See https://github.com/homebridge/homebridge/wiki/Donation-Links for instructions.

If for any reason in the future you can no longer maintain your plugin, please consider transferring it to our unmaintained plugins repo. We can take ownership until another willing developer comes along.

Don't forget to join the official Homebridge Discord server, where plugin developers can get tips and advice from other developers and the Homebridge project team in the #plugin-development channel!

Thank you for your contribution to the Homebridge Community. https://homebridge.io

bwp91 commented 1 year ago

DO NOT CLOSE see

For the moment I won't update our list of verified plugins, in case we have some success in getting the other existing plugin transferred over, so then you can publish with a nice name. Will give this until next Saturday 7th October, otherwise I will happily add your existing plugin names to the official verified list.

eibenp commented 1 year ago

Hi @bwp91

I accept all three comments. I will fix them in next release. Currently I am waiting for "name change" before publishing a new release.

bwp91 commented 1 year ago

Hi @eibenp I believe we now have these repos under our name.

Could you fill out this template issue here:

https://github.com/homebridge/unmaintained-plugins/issues/new?assignees=Homebridge+Collaborators&labels=pending-review&projects=&template=maintain.md&title=Request+to+Maintain+Repo

The name of the plugin is homebridge-gree-ac

Thank you!

eibenp commented 1 year ago

Hi @eibenp I believe we now have these repos under our name.

Could you fill out this template issue here:

https://github.com/homebridge/unmaintained-plugins/issues/new?assignees=Homebridge+Collaborators&labels=pending-review&projects=&template=maintain.md&title=Request+to+Maintain+Repo

The name of the plugin is homebridge-gree-ac

Thank you!

Hi @bwp91

done. Issue submitted. https://github.com/homebridge/unmaintained-plugins/issues/32

eibenp commented 1 year ago

Hi @bwp91

npm issue closed. Please tell me the next steps.

bwp91 commented 1 year ago

Hi, sorry for delay in reply.

What needs to be done now is edit these to match the existing values of npm homebridge-gree-ac

  1. plugin alias in config schema json "pluginAlias": "GREEAirConditioner",
  2. name in package json "name": "@eibenp/homebridge-gree-airconditioner",
  3. PLATFORM_NAME and PLUGIN_NAME in src/settings.ts

Also I would recommend publishing a new version as 2.0 as maybe there will be breaking changes if a user of the old version of the version were to update to the now your new version.

Up to you, but maybe a credit in the readme for the old maintainer too, especially if your repo is based off their work.

I think that's it! Any other questions do shout!

eibenp commented 1 year ago

Hi @bwp91

if I understand You well, then I do not need to change the github repo. I can continue development in the same github repo (homebridge-gree-airconditioner) The only thing I should do is updating the package data to match the new npm parameters.

bwp91 commented 1 year ago

Yes you can continue in the existing github repo, so long as the package name in the package json file matches homebridge-gree-ac then it will publish to this npm repo.

bwp91 commented 1 year ago

Once you have published a new version to the homebridge-gree-ac I'll run the plugin checks again on here just one more to make sure everything is okay

eibenp commented 1 year ago

Hi @bwp91

one more question: The original homebridge-gree-ac package was an Accessory plugin not a Platform plugin. So it does not have PLATFORM_NAME. Also config.schema.json was not part of the package. Can I keep my original PLATFORM_NAME and pluginAlias? I think if I keep them users can change from my original package to the new one more simpler because they do not need to create a new configuration. They can remove the old plugin and add the new one and use the same config. Am I right?

I don't know what happens when an old user of homebridge-gree-ac package upgrades to the new version (my version). The config is completely different (accessory vs platform). What shall I recommend them?

I have prepared the modifications and updated my GitHub repo. You can check my new version. I think my code is ready for publishing the new npm package but I wait for your confirmation.

bwp91 commented 1 year ago

Hi @eibenp sorry again for delay in reply. Are you still waiting for any confirmation from me/us on this? Happy to still take a look if needed

eibenp commented 1 year ago

Hi Ben

yes, I am still waiting for confirmation and answer my questions

  1. okt. 25. dátummal, 21:12 időpontban Ben @.***> írta: Hi @eibenp sorry again for delay in reply. Are you still waiting for any confirmation from me/us on this? Happy to still take a look if needed

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

bwp91 commented 1 year ago

So I would publish to npm a new major version of the existing plugin (ie a v2.0.0) along with release notes in the GitHub release and a CHANGELOG.md file.

The GitHub release notes appear in the Homebridge UI before a user updates, so at this point the user can read the notes, and decide whether they want to update the plugin or not. The contents of a changelog.md file are displayed in the UI after a user has updated a plugin.

Within the release notes, I would mention that updating the plugin is a breaking change, with steps on how to 'update'.

Im assuming since this is changing from an accessory-based plugin to a platform-based plugin that there will be no 'clean' way to update, which is fine, so long as it is clearly stated in the GitHub release notes for a v2 of the plugin. To reiterate, since these notes appear before the user updates the plugin, the user can decide whether to update now and deal with the changes, or wait for another day.

I don't know what happens when an old user of homebridge-gree-ac package upgrades to the new version (my version). The config is completely different (accessory vs platform). What shall I recommend them?

Probably just worth being honest - the best way in this case is probably indeed to uninstall the existing version, which should remove the accessory-based accessories, and then install your new version, which will recreate the accessories as platform-based.

This will mean that homekit scenes and automations that a user already has will be removed and will need to be re-set-up.

My point here is so long as the user knows what to expect, then they can make an informed decision on whether they want to update the plugin now... or at a later time when they perhaps have more time to reconfigure their accessories

eibenp commented 1 year ago

Hi @bwp91

I have published the new v2.0.0 release of the homebridge-gree-ac plugin.

bwp91 commented 1 year ago

Amazing 👍 nice job. Happy to close this issue now, if there is anything in the future you need assistance with please do get in contact!

eibenp commented 1 year ago

Hi @bwp91

Thank You! May I ask You, how long does it take for the plugin to appear in the verified list?

bwp91 commented 1 year ago

Very soon now! Sorry I forgot to add it to the list. Thanks for the nudge, you can see it added here: https://github.com/homebridge/verified/commit/8e610c501b7efb34680925a78752aa103fcbbce1

eibenp commented 1 year ago

Hi @bwp91

I think there is a small bug in the verified list. My plugin is called homebridge-gree-ac but You have added homebridge-gree-airconditioner which does not exist.

Very soon now! Sorry I forgot to add it to the list. Thanks for the nudge, you can see it added here: 8e610c5

bwp91 commented 1 year ago

/check

github-actions[bot] commented 1 year ago

:white_check_mark: Pre-checks completed successfully.

bwp91 commented 1 year ago

Fixed! Got muddled between your github repo name and the npm name 😃

eibenp commented 1 year ago

Hi @bwp91

Thank You!

I see that the verified list is now correct.

Currently Homebridge does not display in search results the verified sign on my homebridge-gree-ac plugin. Shall I do anything to achive this?

eibenp commented 1 year ago

Hi @bwp91

I think my plugin is still not in verified state

eibenp commented 1 year ago

Hi @bwp91

my plugin is still not verified. It is on your verified list but homebridge does not know it. Shall I do anything?

donavanbecker commented 1 year ago

@eibenp, try restarting your Homebridge UI. Go to Homebridge Setting sand then Force Service Restart:

Screenshot 2023-11-10 at 2 31 20 PM
eibenp commented 1 year ago

Hi @donavanbecker

Thank You! It's OK now.

One more question: Why is this issue https://github.com/homebridge/verified/issues/575 still labeled as pending-review ?

github-actions[bot] commented 1 year ago

Congratulations! Your plugin has been verified.

You can now add one of the Verified by Homebridge badges to your plugin's README:

verified-by-homebridge

[![verified-by-homebridge](https://badgen.net/badge/homebridge/verified/purple)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)

verified-by-homebridge

[![verified-by-homebridge](https://img.shields.io/badge/homebridge-verified-blueviolet?color=%23491F59&style=for-the-badge&logoColor=%23FFFFFF&logo=homebridge)](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)

Your plugin is now also eligible to display a :heart: Donate button on its tile in the Homebridge UI. See https://github.com/homebridge/homebridge/wiki/Donation-Links for instructions.

If for any reason in the future you can no longer maintain your plugin, please consider transferring it to our unmaintained plugins repo. We can take ownership until another willing developer comes along.

Don't forget to join the official Homebridge Discord server, where plugin developers can get tips and advice from other developers and the Homebridge project team in the #plugin-development channel!

Thank you for your contribution to the Homebridge Community. https://homebridge.io

bwp91 commented 1 year ago

@eibenp the pending-review must have been a github label maybe it reappeared when the issue was reopened again.

Anyway all good now hopefully - will close this - please feel free to reopen if needed 😀