NorthernMan54 / homebridge-yamaha-home

Homebridge plugin for my Yamaha Receiver optimized for use with the Home App and Alexa
26 stars 9 forks source link

Input Selection Not Working #23

Closed skbeez closed 4 years ago

skbeez commented 5 years ago

I have configured my Yamaha AVR as such:

{
    "platform": "yamaha-home",
    "play_volume": -30,
    "setMainInputTo": "HDMI1",
    "show_input_name": "yes",
    "inputs_as_accessories": {
        "Yamaha": {
            "1": {
                "name": "AppleTV",
                "setInputTo": "HDMI1",
                "set_default_volume": -49
            },
            "2": {
                "name": "Wii U",
                "setInputTo": "HDMI3"
            },
            "3": {
                "name": "TV",
                "setInputTo": "AUDIO1"
            }
        }
    },
    "manual_addresses": {
        "Yamaha": "xxx.xxx.xxx.xxx"
    }
}

The only thing I see in my Home app is the Receiver showing up as a light bulb. I can control the volume and whether is on or off. I would like to be able to switch inputs. My network name on the receiver is 'Yamaha' so that's what I use in the 'inputs_as_accessories' section. Am I doing something wrong?

NorthernMan54 commented 5 years ago

Looking at the code, it appears that this

 "inputs_as_accessories": {
        "Yamaha": {
            "1": {

Should be

      "inputs_as_accessories":{
        "YamahaReceiver": {
          "1": {

YamahaReceiver was hard coded into the plugin