codyc1515 / homebridge-panasonic-air-conditioner

Panasonic Air Conditioner / Heat Pump plugin for HomeBridge using the Panasonic Comfort Cloud API to expose Panasonic Air Conditioners to Apples HomeKit
MIT License
34 stars 13 forks source link

Road to Platform Plugin #77

Closed embee8 closed 2 years ago

embee8 commented 2 years ago

Hi all!

I explored how to transform this project into a platform-style plugin and have a working prototype ready. I will conduct some more testing before publishing it but wanted to check in with the creator/maintainer of this project and the community to discuss how to go about it.

Characteristics of the fork:

Merging the base project with the fork might make for a very bumpy upgrade path because I changed quite a few things (in line with the current plugin developer docs), including a different structure of the settings and accessories.

I might actually have changed so much that an existing installation would break after the upgrade, or at least result in an unclean config mixing old and new settings.

There might be people out there who are happy with one device only, and I am wary of updating a well-working plugin with a version that might have a beta character to begin with.

Since Homebridge doesn't seem to have a beta versioning framework afaik, my personal preference is to publish the project as new package, let people test it without wrecking their functioning setups, and then we can reconvene and discuss where we go from there to keep this project thriving.

Would love to hear your opinion.

arkadicolson commented 2 years ago

Hi

Great news! I have 3 units and am looking forward to test it. Just let me know in which way you will provide the new code after having it discussed with the creator/maintainer.

Br Arkadi

codyc1515 commented 2 years ago

Sounds great! Where can I see it?

codyc1515 commented 2 years ago

Bump

embee8 commented 2 years ago

I've been running it on my local installation for a bit longer and optimised a few bits.

Repository: https://github.com/embee8/homebridge-panasonic-ac-platform Package: https://www.npmjs.com/package/homebridge-panasonic-ac-platform

codyc1515 commented 2 years ago

Looks great! Thank you for your work.

Only a few suggestions:

  1. Model value does not populate in Home app (just shows as Default-Model) - I think this relates to the accessory.context.device.deviceModuleNumber value
  2. X-APP-VERSION is populated from this.config.appVersion and this is populated as a placeholder (hidden) in config-ui-x, however the default behaviour of config-ui-x is that even placeholder values get hardcoded. I would suggest to avoid this to treat it the same as User-Agent / COMFORT_CLOUD_USER_AGENT by including it in the settings.ts file.
  3. Regarding dehumidifier and fan. We can technically add both of these but I quickly became confused trying to make each of the functionality operate independently. For example turning on dehumidification service will turn off the heater cooler service. This is just the way HomeKit behaves.
  4. Regarding threshold temperature. Thermostats allow one temperature to be set for both heating and cooling thresholds. This matches more closely with Panasonic Air Conditioners behaviour, however the thermostat service has limitations (namely you cannot have a rotation speed). Again, this is just the way HomeKit behaves.

What do you feel is the way forward? Do I depreciate this one or migrate your files over?

embee8 commented 2 years ago

It might be worth keeping this repo alive, depending on the specific needs of the existing user base (since there are a variety of systems out there). I've only entered the Homebridge scene, so I'll leave that call to you.

As for the feedback - thank you!

  1. It populates correctly on my installation. If the issue persists, feel free to create an issue in the repo.
  2. This is intentional to allow non-code adaptions to bump the app version. Downside is that people might run different setups while being on the same plugin version, but possibly better than a non-functional plugin while waiting for maintainers to fix it. Edit: Thought about this a bit more and the trade-off is less attractive if we assume that the plugin is kept up-to-date. Might switch strategies going forward.
  3. Will revisit this at a later point.
  4. Same as 3.