yenoiwesa/homebridge-daikin-airbase

Error adding Airbase BRP15B61

Closed this issue · 12 comments

pxg14 commented

Hi

I receive these errors when installing the plugin.

[6/25/2020, 21:54:12] [Daikin Airbase] Starting polling for Aircon state every 5 minute(s)
[6/25/2020, 21:54:13] [Daikin Airbase] Starting polling for ZoneControl state every 5 minute(s)
[6/25/2020, 21:54:13] [Daikin Airbase] Registered device: DaikinAP49135 (SSID: DaikinAP49135)
[6/25/2020, 21:54:13] Initializing platform accessory 'DaikinAP49135'...
[6/25/2020, 21:54:13] Initializing platform accessory 'DaikinAP49135 Zones'...
(node:3735) UnhandledPromiseRejectionWarning: Error: Cannot add a Service with the same UUID '00000049-0000-1000-8000-0026BB765291' and subtype 'zone:       Nil' as another Service in this Accessory.
    at Accessory._this.addService (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:279:17)
    at /usr/local/lib/node_modules/homebridge/src/server.ts:488:21
    at Array.forEach (<anonymous>)
    at Server.createHAPAccessory (/usr/local/lib/node_modules/homebridge/src/server.ts:477:16)
    at /usr/local/lib/node_modules/homebridge/src/server.ts:427:34
    at Array.forEach (<anonymous>)
    at /usr/local/lib/node_modules/homebridge/src/server.ts:417:21
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/util/once.ts:10:18
    at DaikinAirbasePlatform.accessories (/usr/local/lib/node_modules/homebridge-daikin-airbase/src/daikin-airbase-platform.js:84:13)
    at processTicksAndRejections (internal/process/task_queues.js:97:5)
(node:3735) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:3735) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Running
Node.js Version v12.17.0
Npm version v6.14.5
Homebridge Rasberry Pi image v1.1.1

IMG_1381

Much appreciated if you can assist.

Thanks

Peter

Hi @pxg14 👋

It looks like you might have enabled-zones in your zone controller that have the same name (the duplicated name seems to be "Nil").

I assume these zones aren't actually mapped to anything and should be deactivated instead?

I could do a patch to avoid the duplicated accessory name but you would still end up with a lot of unnecessary switches in the Home app.

@pxg14
How many zones do you have physically connected in your ducted system? If less than 8 then you must disable the “unused” zones because Daikin zone controller has all 8 enabled by default. Look in your user guide for the wired controller - there is a field setting to disable unused zones

@yenoiwesa
Probably the best is to ignore all zones that have the same name and log a warning

pxg14 commented

Thanks guys, let me look at how to disable unused zones but if all zones with the same name are ignored that would be great. The ability to toggle them off or on in the home app also great. A bit like the Dyson plug-in that allow the user to toggle certain features/accessories on or off.

That probably wouldn't be correct though to just hide them, it means that your system allows these zones to be active in the first place.

I will probably just show these toggles still, and just have an incremental UUID for them.

pxg14 commented

Yep, but is it feasible to ignore certain zones?

@pxg14 you should not ever need toggling them on/off in the plugin. These zones are not connected in your Daikin zone controller (the one in the roof space) and you don't physically have dampers to control these zones

https://www.daikin.com.au/sites/default/files/daikin-ducted-air-conditioning-Zone-Controller-BRC24Z4%288%29-BRC230Z4%288%29.pdf
https://www.youtube.com/watch?v=0nYiRGS4m9A

pxg14 commented

Thanks, give me a day or two.

pxg14 commented

Done! Renamed zones and it works. Thanks guys, much appreciated.

I still need to handle this scenario more gracefully.

Could either of you please test this version before I release it:

npm install -g yenoiwesa/homebridge-daikin-airbase#7fe28b9d4867c4c9d107ed4a848afdb18c9c0b19

It contains a change to handle the list of zones to be mapped as a unique set, so that zones that have duplicated names don't get all added, just the first one will (#15).
I don't have a zone controller in my setup and thus am unable to confirm that I am not breaking your setup.

Thanks in advance guys!

Works fine with zones though I don’t have duplicated names so can’t test it for all scenarios

@TimofeyK thanks a lot for your testing! No need to test the duplicated zone handling I am confident it's fine (the change was minimal) but I wanted to make sure that zone handling didn't blow up due to a typo or something.

I have published version 2.0.6 with the patch.

Thanks guys!