neonightmare / homebridge-yamaha

homebridge-plugin for Yamaha AVR
30 stars 19 forks source link

Party Mode and multi-zone control #4

Open NovaGL opened 8 years ago

NovaGL commented 8 years ago

Thanks for making this, at the moment it only does one zone and doesn't do party mode.

I have already forked yamaha-nodejs with support for party mode, is this something you would be interested in having in this plugin?

neonightmare commented 8 years ago

Hi, shure, if we can improve this, let's do it! thx neo

NovaGL commented 8 years ago

Cool, only one problem, party mode volume only accepts two values UP or DOWN. How would we translate those into working values?

JimmyClarke1983 commented 8 years ago

Hi Neonightmare, Thanks for making this. Did you get anywhere with adding the control of other zones? For my situation I only need control of zone 2 - is this something that can be done in the homebridge config.json or does it require reprogramming your end? Cheers

jata1 commented 8 years ago

I would really like to add zone 2 support to this plugin. Is this a lot of work?

Looks like the work on yamaha-nodejs has made some good progress with multizone. I think does what is needed but doesn't work with homekit

abko commented 7 years ago

@NorthernMan54 or @tomun I am very interested in driving my two zones from HomeKit. I tried both your forks, but unfortunately I did not get any to offer multi zone support.

From the fork of NorthernMan54 I don't understand how to use the zone property. I tried with 1 or 2, I also tried with two platform sections, one with zone value 1 and one with zone value 2. Guess that's also not the idea. It would be nice to include an example in the readme on how to use it.

The fork from tomun looks very interesting as well, having each zone as a separate accessory sounds like a good choice. I used zones_as_accessories, but did not manage to see two zones in either the Eve or Home App.

I own a Yamaha RX-A3060, and would be happy to contribute, e.g. in testing or so.

Note that also Volume control does not seem to work. Not with the most recent master nor with one of your forks.

Side question, would it be possible to create multiple accessories per input, e.g. Cable tuner, CD player, AppleTV and use that to switch between inputs?

NorthernMan54 commented 7 years ago

Mine plugin shows each zone as a separate light bulb, allowing you to control volume and on/off for each.

There is no need for a special config, and it doesn't use the zone parameter.

On May 10, 2017, at 6:04 AM, abko notifications@github.com wrote:

@NorthernMan54 or @tomun I am very interested in driving my two zones from HomeKit. I tried both your forks, but unfortunately I did not get any to offer multi zone support.

From the fork of NorthernMan54 I don't understand how to use the zone property. I tried with 1 or 2, I also tried with two platform sections, one with zone value 1 and one with zone value 2. Guess that's also not the idea. It would be nice to include an example in the readme on how to use it.

The fork from tomun looks very interesting as well, having each zone as a separate accessory sounds like a good choice. I used zones_as_accessories, but did not manage to see two zones in either the Eve or Home App.

I own a Yamaha RX-A3060, and would be happy to contribute, e.g. in testing or so.

Note that also Volume control does not seem to work. Not with the most recent master nor with one of your forks.

Side question, would it be possible to create multiple accessories per input, e.g. Cable tuner, CD player, AppleTV and use that to switch between inputs?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

abko commented 7 years ago

This is what the section for my receiver looks like

{ "platform": "YamahaAVR", "name": "Versterker", "play_volume": -48, "setMainInputTo": "Airplay", "show_input_name": "yes", "zone": 2 }

I don't have additional lightbulbs in the Home or Eve app. What I have is an accessory by the name I gave (Versterker Is Dutch for amplifier) presenting itself as a switch. In Eve there is an additional item in the room where I placed the Amp called Audio functions. It only contains a single volume slider which does not actually change the volume.

NorthernMan54 commented 7 years ago

And does it show during startup with debug mode on?

On May 10, 2017, at 1:52 PM, abko notifications@github.com wrote:

This is what the section for my receiver looks like

{ "platform": "YamahaAVR", "name": "Versterker", "play_volume": -48, "setMainInputTo": "Airplay", "show_input_name": "yes", "zone": 2 }

I don't have additional lightbulbs in the Home or Eve app. What I have is an accessory by the name I gave (Versterker Is Dutch for amplifier) presenting itself as a switch. In Eve there is an additional item in the room where I placed the Amp called Audio functions. It only contains a single volume slider which does not actually change the volume.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

NorthernMan54 commented 7 years ago

Sorry, bad typing there. Can you share what it shows during startup with debug enabled ie

DEBUG=* homebridge

On May 10, 2017, at 5:08 PM, SEAN GRACEY seangracey@yahoo.ca wrote:

And does it show during startup with debug mode on?

On May 10, 2017, at 1:52 PM, abko notifications@github.com wrote:

This is what the section for my receiver looks like

{ "platform": "YamahaAVR", "name": "Versterker", "play_volume": -48, "setMainInputTo": "Airplay", "show_input_name": "yes", "zone": 2 }

I don't have additional lightbulbs in the Home or Eve app. What I have is an accessory by the name I gave (Versterker Is Dutch for amplifier) presenting itself as a switch. In Eve there is an additional item in the room where I placed the Amp called Audio functions. It only contains a single volume slider which does not actually change the volume.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub, or mute the thread.

abko commented 7 years ago

@NorthernMan54 It took some time, since I wanted a clear output. This is what I get:

[5/11/2017, 7:12:56 PM] Loaded plugin: homebridge-yamaha [5/11/2017, 7:12:56 PM] Registering accessory 'homebridge-yamaha.YamahaAVR' [5/11/2017, 7:12:56 PM] Registering platform 'homebridge-yamaha.YamahaAVR' [5/11/2017, 7:12:56 PM] --- [5/11/2017, 7:12:56 PM] Loaded config.json with 0 accessories and 1 platforms. [5/11/2017, 7:12:56 PM] --- [5/11/2017, 7:12:56 PM] Loading 1 platforms... [5/11/2017, 7:12:56 PM] [Versterker] Initializing YamahaAVR platform... [5/11/2017, 7:12:56 PM] [Versterker] Getting Yamaha AVR devices. [5/11/2017, 7:12:56 PM] Loading 0 accessories... [5/11/2017, 7:12:58 PM] [Versterker] Found Yamaha RX-A3060 - 06005753, "AV Receiver" [5/11/2017, 7:13:31 PM] [Versterker] Waited 30 seconds, stopping discovery. [5/11/2017, 7:13:31 PM] [Versterker] Discovery finished, found 1 Yamaha AVR devices. [5/11/2017, 7:13:31 PM] [Versterker] Initializing platform accessory 'AV Receiver'... Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐     
│ 031-45-154 │     
└────────────┘     

[5/11/2017, 7:13:31 PM] Homebridge is running on port 51826.

tomun commented 7 years ago

Here's what my config.json looks like:

{ "bridge": { "name": "HomeBridge", "username": "CC:22:3D:E3:CE:32", "port": 51826, "pin": "031-45-154" }, "description": "HomeBridge HTTP Status Control", "platforms": [ { "platform": "YamahaAVR", "play_volume": -48, "set_input_to": "Airplay", "zones_as_accessories": { "Yamaha": { "1": { "name": "Main" }, "2": { "name": "Zone 2" } } } } ], "accessories": [ { } ] }

the "Yamaha" key above must match something returned by the receiver during discovery. My receiver returns "Yamaha" but according to your output above, your receiver is returning "AV Receiver".

and the results in the Home app for me:

The Home app doesn't support audio volume controls. but the Hesperus app does:

On Thu, May 11, 2017 at 10:15 AM, abko notifications@github.com wrote:

@NorthernMan54 https://github.com/northernman54 It took some time, since I wanted a clear output. This is what I get:

[5/11/2017, 7:12:56 PM] Loaded plugin: homebridge-yamaha [5/11/2017, 7:12:56 PM] Registering accessory 'homebridge-yamaha.YamahaAVR' [5/11/2017, 7:12:56 PM] Registering platform 'homebridge-yamaha.YamahaAVR' [5/11/2017, 7:12:56 PM] --- [5/11/2017, 7:12:56 PM] Loaded config.json with 0 accessories and 1 platforms. [5/11/2017, 7:12:56 PM] --- [5/11/2017, 7:12:56 PM] Loading 1 platforms... [5/11/2017, 7:12:56 PM] [Versterker] Initializing YamahaAVR platform... [5/11/2017, 7:12:56 PM] [Versterker] Getting Yamaha AVR devices. [5/11/2017, 7:12:56 PM] Loading 0 accessories... [5/11/2017, 7:12:58 PM] [Versterker] Found Yamaha RX-A3060 - 06005753, "AV Receiver" [5/11/2017, 7:13:31 PM] [Versterker] Waited 30 seconds, stopping discovery. [5/11/2017, 7:13:31 PM] [Versterker] Discovery finished, found 1 Yamaha AVR devices. [5/11/2017, 7:13:31 PM] [Versterker] Initializing platform accessory 'AV Receiver'... Scan this code with your HomeKit App on your iOS device to pair with Homebridge:

┌────────────┐ │ 031-45-154 │ └────────────┘

[5/11/2017, 7:13:31 PM] Homebridge is running on port 51826.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/neonightmare/homebridge-yamaha/issues/4#issuecomment-300856449, or mute the thread https://github.com/notifications/unsubscribe-auth/ACevQsmGdD6UGM3fvMYMaMmGQx0hzgX1ks5r40IngaJpZM4G8Ml4 .

NorthernMan54 commented 7 years ago

@abko I just looked at my fork, and it doesn't have additional debug output in that section. If it finds a zone, it should create an accessory with the zone name as the accessory name, and output a line saying that.

If you can't get the other fork working, I can add more debugging to mine to determine why it doesn't see your zones.

abko commented 7 years ago

Thanks for both your responses. I'll try tonight and keep you posted!

jata1 commented 7 years ago

Hi all, really good to see the excellent work on the yamaha plug-in. Thanks!

I tried to get zone two working 6-9 months ago but gave up in the end as it was too difficult for me (i've no experience with scripting / development).

I did manage to get the main zone working as a light/fan but changing the volume was flaky / jerky.

What I need using the home app for iOS:

  1. to be able to turn on/off zone two
  2. switch between 2 sources (airplay and net radio) - or for the two sources to show as separate items
  3. control volume

Is this possible at the moment?

abko commented 7 years ago

@tomun Thanks for your help. Changing the Yamaha key did the trick! @NorthernMan54 I found out I had the latest master installed instead of your fork. I tried with your fork and ran into the issue again I reported earlier under issue 17