mitch7391 / homebridge-cmd4-AdvantageAir

Catered shell script to integrate air conditioner control units by Advantage Air into HomeKit using the plug-in homebridge-cmd4.
MIT License
38 stars 5 forks source link

[Feature Request] Allow setting/override port settings #86

Closed apat183 closed 1 year ago

apat183 commented 1 year ago

Is your feature request related to a problem? Please describe: Fujitsu Anywair uses a rebanded Advantage Air tablet / app, with same API's but operates on a different port (10211). I currently use the AdvantageAir plugin for home assistant (link) to control my Fujitsu Anywair and works no problem but I'm looking to move more to homebridge (and this looks like it use more of the features).

Describe the solution you'd like: Being able to set the Ip address and port in the config UI. Currently when I try to add port after IP (e.g. 192.168.1:10211) it gives an error that it's invalid IP.

Describe alternatives you've considered: None at moment, as there is no other well maintained plugin. Other then home assistant (link) plugin which I expose to homekit but I'm looking to move more of my stuff to homebridge.

Additional context: NA

Advantage Air System:

apat183 commented 1 year ago

If it helps, I updated these two files in docker container:

  1. https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/blob/f2bc7f27a93602a8c4c19954efc19ab52cb2144a/AdvAir.sh#L24
  2. https://github.com/mitch7391/homebridge-cmd4-AdvantageAir/blob/f2bc7f27a93602a8c4c19954efc19ab52cb2144a/ConfigCreator.sh#L1262

With 10211 and the plugin installed fine. It seems to be working as well (in terms of basic calls and updating AC). I have noticed that it reports status as "off" after some minutes. I can imagine the port might be in other aspects of the code so other status commands are not working.

mitch7391 commented 1 year ago

Hi @apat183, well done getting this far yourself, you are definitely on the right track for a temporary solution!

I had no idea about this rebranding called Anywair, so it is good to know about it :)

I would say for the time being search the AdvAir.sh for the number 2025 to see if you have missed any or in the cases we accidentally are not using PORT that was defined at the start of the script. I would only worry about ConfigCreator as the other file to change unless you are going to use the other settings buttons such as CheckConfig.

mitch7391 commented 1 year ago

@uswong perhaps we add the port as an option in the ConfigCreator UI, with the 2025 as the default and a note to leave it alone unless you know your system uses a different one… Thoughts?

uswong commented 1 year ago

Sounds good Mitch. It shouldn't be too hard to implement. In view of this, please hold on to the latest PR (#85) for now, we should be able to include this option within the same PR.

I also agree that what @apat183 suggested should be a workable temporary solution.

apat183 commented 1 year ago

Thanks @mitch7391 @uswong.

Good to know it's workable solution. I'm not in any rush as I have both HA and Home Bridge running so will wait for PR.

I agree this should be optional and you should leave default as 2025, and only if set overrides. As Fujitsu AU/NZ is the only one I've seen so this as a rebrand of Advantage Air so don't think it's that comment and you want to keep it easy for most users and not have to worry about known port. But might be more common in future if other manufacturers go down this path.

mitch7391 commented 1 year ago

Sweet, leave it with us @apat183 and hopefully we should have a working solution rolled out for you in a few days; do keep in mind with your current solution that if you re-install or update that you will lose the changes you have made and will need to re-apply them.

mitch7391 commented 1 year ago

@apat183 this issue was auto closed by the PR, I am just working on the admin side of things and will tag you when it is published to npm.

apat183 commented 1 year ago

@apat183 this issue was auto closed by the PR, I am just working on the admin side of things and will tag you when it is published to npm.

Amazing and thank you. Honestly best devs ever! Do you guys have a buy coffee or similar page to give a little donation at amazing work?

mitch7391 commented 1 year ago

We do appreciate the offer but I will speak for myself and say I do this to give back to a community I have taken a lot from as a home automation user :)

uswong commented 1 year ago

Same here.... I am doing this as a hobby too!

mitch7391 commented 1 year ago

@apat183 and @uswong update should be live now!

Anand, please let us know if you have any issues or this does not do what you had hoped :)

apat183 commented 1 year ago

Thanks all, working perfectly!