yenoiwesa / homebridge-daikin-airbase

A Homebridge plugin for the Daikin Airbase WiFi module
Apache License 2.0
21 stars 4 forks source link

Allow to map zone switches to individual rooms (via individual accessories) #22

Closed Muppetteer closed 2 years ago

Muppetteer commented 3 years ago

First thanks for this plugin, it is working great with one minor caveat I just ran into.

It creates a switch for each of my zones ok, albeit as one device with multiple accessories. I tried telling Home.app to display as separate tiles so that I get an individual switch for each zone which I can map to the relevant room. However if I change the room that any one of those zone switch tiles belongs to, it changes the room for all the other zone switch tiles too. So I can't have one zone switch in the office, one in a bedroom etc.

Would it be possible to expose the zones as individual switch devices that belong to their own room each instead of one device with multiple accessories? Or is there another way to accomplish what I am trying to do?

yenoiwesa commented 3 years ago

Hey @Muppetteer 👋

That's a pretty fair requirement that you have here. It shouldn't be too complex to achieve either. I don't particularly have time to work on it right now, but will keep the ticket open for when I do.

Cheers!

TimofeyK commented 3 years ago

@yenoiwesa Hope this behaviour would be behind a configuration option to avoid breaking existing installations and for those who prefer the single accessory implementation

Paint-The-Night commented 2 years ago

+1 to this request. Would be great to have the ability to map zones switches to invidious rooms.

If you ask a HomePod that is assigned to a room to "Turn on the lights" for example - it'll only turn on the lights for that room. Similarly if you have a zone mapped for each room you can say something like "Turn on the AC" and it will turn on for only that rooms zone.

yenoiwesa commented 2 years ago

Hi there @Muppetteer, @Paint-The-Night and @TimofeyK 👋

I know I took my sweet time to work on this but I finally got back to it (we can thank the terrible Sydney weather of late).

I have added a new configuration to map zone controls to individual accessories:

Parameter Type Default Note
useIndividualZoneControls Boolean false Optional - Defines whether to map each zone switch to an individual accessory when a Daikin Zone Controller is available (true), or to map all zone switches to a single grouped accessory (false, default).

As usual for zone related changes, since I don't own a Daikin Zone Controller myself, I coded the change blindly so I don't expect it will work with this first attempt, but could you guys please install the following version of the plugin (which is unreleased, just for testing):

npm install -g github:yenoiwesa/homebridge-daikin-airbase#6be91d0721f0ef78210598c8f42399956eab2a14

..and let me know how it goes with the new config? With this new version and the new config, you should see one accessory per zone. There should be no breaking change for users not setting the new option.

Cheers :-)

yenoiwesa commented 2 years ago

Any chance one of you could give it a try? 🙏

TimofeyK commented 2 years ago

Any chance one of you could give it a try?

@yenoiwesa I only tested backward compatibility and the combined zone switches seems to work the same as before. Separating zone switches would be a breaking change for me and I am not able to spend enough time on it right now

Paint-The-Night commented 2 years ago

Any chance one of you could give it a try? 🙏

Firstly, thank you for adding this feature. Unfortunately I won't have access to the device to test until I move which will be January. Hopefully @Muppetteer can find some time to test it out.

yenoiwesa commented 2 years ago

Thanks @TimofeyK and @Paint-The-Night !

@TimofeyK that's really the most important for me, that backward compatibility is still intact. I can address bug fixes for the new feature later on, but I wanted to make sure that it was safe to merge that branch at all and release a new version. Thanks a lot for having tested backward compatibility 😃

I will wait until @Muppetteer can test the new feature or @Paint-The-Night moves in in January before merging it in, there is no hurry.

Thank you all!

Muppetteer commented 2 years ago

Apologies. After hitting a roadblock with this I tried HomeAssistant instead and ended up using that to do what I wanted, so I'm no longer using HomeBridge.

yenoiwesa commented 2 years ago

No problem at all @Muppetteer thanks for letting us know :-)

cemilbrowne commented 2 years ago

Howdy all!

As far as I can tell, this didn’t appear to work:

{ "name": "Daikin Airbase", "pollingInterval": 5, "platform": "DaikinAirbase", "useIndividualZoneControls": true }

Seemed to have no effect - the tiles still move together and appear as a single tile by default.

Happy to keep testing!

Update: let me actually pull the new version first. Silly me.

yenoiwesa commented 2 years ago

Update: let me actually pull the new version first. Silly me.

Ah I was going to ask, did you use the unreleased branch that has this feature, because otherwise the setting won't have any effect.

npm install -g github:yenoiwesa/homebridge-daikin-airbase#6be91d0721f0ef78210598c8f42399956eab2a14
Muxxx commented 2 years ago

@yenoiwesa, just wanted to give you an update on your branch. I can confirm the zones now come through to HomeKit as individual tiles by default now, they can be moved between HomeKit rooms individually and the basic control of enabling and disabling these zones works as well. Seems to be working as intended! Great work.

yenoiwesa commented 2 years ago

@Muxxx thanks a lot for testing! Great news that the new configuration seems to be working fine.

I'll probably aim to release a new version of the plug-in to npm soon with that change then.

I will keep you posted!

yenoiwesa commented 2 years ago

Hello everyone 👋

I have just merged the branch onto master and released version 3.2.0 of the plugin with this change included.

Thanks a lot all of you for your contributions and help, that is much appreciated 😃