Willmac16 / homebridge-nuvo

A Homebridge Plugin for Nuvo Whole House Audio Systems
ISC License
5 stars 0 forks source link

Disabled Zones issue and setting the Default Volume #10

Closed kiwi64ajs closed 2 years ago

kiwi64ajs commented 2 years ago

Hi, I've recently discovered your awesome Nuvo Plugin - thanks for creating and sharing it.

I have a couple of questions:

1 - I'm working on configuring that along with some Apple AirPort Express units connected to each Nuvo source to provide AirPlay 2 capability. I'm using the "Homebridge Airport Express Playing" plugin to enable each Source/Zone when an Apple device plays something via AirPlay to one of the AirPorts.

I've been driving the Nuvo from Control4 but its AirPlay support isn't great and my Nuvo has some dead channels and one issue I discovered was that if i disabled a zone (in my case 1, 2 or 3) but set the "Number of Zones" setting to 6 to use the 3 remaining good zones (4,5 & 6) - the plugin crashes on start with the following error in the log:

[07/01/2022, 18:39:28] TypeError: Cannot set properties of undefined (setting '1')
    at NuvoPlatform.configureAccessory (/usr/local/lib/node_modules/homebridge-nuvo/src/platform.ts:155:79)
    at /usr/local/lib/node_modules/homebridge/src/bridgeService.ts:328:25
    at Array.filter (<anonymous>)
    at BridgeService.restoreCachedPlatformAccessories (/usr/local/lib/node_modules/homebridge/src/bridgeService.ts:288:69)
    at Server.start (/usr/local/lib/node_modules/homebridge/src/server.ts:171:24)
[07/01/2022, 18:39:28] Got SIGTERM, shutting down Homebridge...

So I removed the 3 dead amp modules and moved the good ones into slots 1,2 & 3 and set the "Number of Zones" to 3 and it works ok now, but figured it might be helpful if this issue/situation was handled better.

2 - Currently when the Zone is turned on, the volume is set to 25%. Is there a way to change the volume to be say 60%? Could this be made a setting?

Regards

Alex Shepherd

Willmac16 commented 2 years ago

I fixed the issue that I got while running with a disabled zone, but it didn't appear quite like the error you got.

I added a setting for volume on power on; however, it seems to be a bit unreliable (probably because the Nuvo sets a volume to 24% on power up) I may take another look at making that work better.

kiwi64ajs commented 2 years ago

Hi Will,

On 9/01/2022, at 10:56 AM, Willmac16 @.***> wrote:

I fixed the issue that I got while running with a disabled zone, but it didn't appear quite like the error you got.

That’s awesome - thanks for looking at this so quickly… ;)

I too saw two different errors reported in the log but when I tried to recreate the same conditions on the Nuvo to cause the issue and get some diagnostics for you - I wasn’t able to do reproduce the original error report.

I don’t yet understand the whole HomeBridge architecture and runtime environment, so I’m guess a lot, but I’m thinking there might be cached state in different places that may cause different errors to be reported for the same cause, depending on the previous state…

Anyway good you could find the issue and improve the system.

I added a setting for volume on power on; however, it seems to be a bit unreliable (probably because the Nuvo sets a volume to 24% on power up) I may take another look at making that work better.

Ah, ok.

I need to go read the Nuvo technical docs to better understand what’s going on there at the base layer, so i can ask better questions.

Regards

Alex Shepherd

Willmac16 commented 2 years ago

@kiwi64ajs I think the volume on power up should be quite doable, I was a bit out of it and rusty when I wrote the changes. I'm pretty sure I can accomplish it by delaying the volume change command a little bit.

I don't think you need to go and read the technical docs, I just need to figure out when I can do some more testing.

kiwi64ajs commented 2 years ago

On 10/01/2022, at 11:10 AM, Willmac16 @.***> wrote:

@kiwi64ajs https://github.com/kiwi64ajs I think the volume on power up should be quite doable, I was a bit out of it and rusty when I wrote the changes. I'm pretty sure I can accomplish it by delaying the volume change command a little bit.

Ah, ok.

I’m assigning an AirPlay destination to a room/area, which essentially links that Apple Airport Express to a Nuvo Source and then Nuvo Zone for the speakers.

I’m using Node-RED logic to enable the specific Nuvo Source/Speaker Zone combination, based on which Apple Airport Express AirPlay 2 start/stop playing Media notification is detected by the “homebridge-airport-express-playing” plugin.

So far this seems to work ok so I’m scaling it up to 4 x Airport Express units connected to the Nuvo Sources and 6 Zones as some Zones will be paired to a Source.

Once I understand all the above more, I can probably set the initial Zone volume using Node-RED logic, with the extra delay.

I don't think you need to go and read the technical docs, I just need to figure out when I can do some more testing.

Its always good to understand thigns to some extent so I don’t end up fighting the Nuvo…

Thanks again

Regards

Alex Shepherd

Willmac16 commented 2 years ago