Giter VIP home page Giter VIP logo

homebridge-yamaha-avr's Introduction

homebridge-yamaha-avr

homebridge-yamaha-avr is a Homebridge plugin allowing you to control your AVR & any connected HDMI-CEC controllable devices with the Apple Home app & Control Centre remote! It should work with all network accessible receivers.

The Yamaha AVR will display as an Audio Receiver with Power, Input, Volume & Remote Control.

Requirements

Installation

Install homebridge-yamaha-avr:

npm install -g homebridge-yamaha-avr

Usage Notes

  • Quickly switch input using the information (i) button in the Control Centre remote
  • Adjust the volume using the physical volume buttons on your iOS device whilst the Control Centre remote is open
  • Enable additional zones
  • Enable Fan devices to control the volume of each enabled zone
  • Enable Switch device to enable/disable Pure Direct

Configuration

Add a new platform to your homebridge config.json.

Specific "favourite" inputs can be added manually or all available inputs reported by the AVR will be set.

Example configuration:

{
    "platforms": [
      {
        "platform": "yamaha-avr",
        "name": "Yamaha RX-V685",
        "ip": "192.168.1.12",
        "cacheDirectory": "",
        "enablePureDirectSwitch": true,
        "volumeAccessoryEnabled": true,
        "zone2Enabled": true,
        "zone3Enabled": false,
        "zone4Enabled": false,
      }
    ]
}

Important Installation/Configuration Notes:

homebridge-yamaha-avr caches input/name data, by default this should be located within the homebridge-yamaha-avr plugin directory. If your homebridge instance cannot write to this directory you can define an alternative cache data location using the cacheDirectory config option

The AVR is published as an external accessory so you'll need to add it manually.

Select "Add Accessory" in the Home app, then "I Don't Have a Code or Cannot Scan".

The AVR should then show as an option, enter your Homebridge PIN and you should be good to go.

You can define the ports external accessories are assigned by setting a range in your Homebridge config: https://github.com/homebridge/homebridge/blob/master/config-sample.json#L12

Other Yamaha Receiver Plugins

For multi-zone Yamaha Receivers, and uses the Television control for each zone of the receiver.

For multi-zone Yamaha Receivers, and uses a Fan to control each zone of the receiver.

Contributing

Build Plugin

TypeScript needs to be compiled into JavaScript before it can run. The following command will compile the contents of the src directory and put the resulting code into the dist folder.

npm run build

Link To Homebridge

Run this command so your global install of Homebridge can discover the plugin in your development environment:

npm link

You can now start Homebridge, use the -D flag so you can see debug log messages:

homebridge -D

Watch For Changes and Build Automatically

If you want to have your code compile automatically as you make changes, and restart Homebridge automatically between changes you can run:

npm run watch

This will launch an instance of Homebridge in debug mode which will restart every time you make a change to the source code. It will load the config stored in the default location under ~/.homebridge. You may need to stop other running instances of Homebridge while using this command to prevent conflicts. You can adjust the Homebridge startup command in the nodemon.json file.

homebridge-yamaha-avr's People

Contributors

acdr avatar dependabot[bot] avatar northernman54 avatar slydlake avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

homebridge-yamaha-avr's Issues

Volume control not working

My Yamaha RX-V683 is working great with this plugin (thanks!), but I can only see power and input controls. Is there something I can do to ensure the volume control shows up?

No tuner input showing in Home app

Describe The Bug:
I can't listen to the radio! No Tuner inputs (AM/FM) are shown in the input list

Logs:

[12/8/2020, 9:10:13 AM] [Homebridge UI] Homebridge restart request received
[12/8/2020, 9:10:13 AM] [Homebridge UI] UI / Bridge settings have not changed; only restarting Homebridge process
[12/8/2020, 9:10:13 AM] [HB Supervisor] Sending SIGTERM to Homebridge
[12/8/2020, 9:10:13 AM] Got SIGTERM, shutting down Homebridge...
[12/8/2020, 9:10:18 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[12/8/2020, 9:10:23 AM] [HB Supervisor] Restarting Homebridge...
[12/8/2020, 9:10:23 AM] [HB Supervisor] Starting Homebridge with extra flags: -I
[12/8/2020, 9:10:23 AM] [HB Supervisor] Started Homebridge v1.1.6 with PID: 14663
[12/8/2020, 9:10:26 AM] Loaded config.json with 0 accessories and 3 platforms.
[12/8/2020, 9:10:26 AM] ---
[12/8/2020, 9:10:28 AM] Loaded plugin: [email protected]
[12/8/2020, 9:10:28 AM] Registering platform 'homebridge-config-ui-x.config'
[12/8/2020, 9:10:28 AM] ---
[12/8/2020, 9:10:30 AM] Loaded plugin: [email protected]
[12/8/2020, 9:10:30 AM] Registering platform 'homebridge-yamaha-avr.yamaha-avr'
[12/8/2020, 9:10:30 AM] ---
[12/8/2020, 9:10:31 AM] Loaded plugin: [email protected]
[12/8/2020, 9:10:31 AM] Registering platform 'homebridge-z2m.zigbee2mqtt'
[12/8/2020, 9:10:31 AM] ---
[12/8/2020, 9:10:31 AM] Loading 3 platforms...
[12/8/2020, 9:10:31 AM] [Config] Initializing config platform...
[12/8/2020, 9:10:31 AM] [Config] Running in Service Mode
[12/8/2020, 9:10:31 AM] [Yamaha RX-V781] Initializing yamaha-avr platform...
[12/8/2020, 9:10:31 AM] [zigbee2mqtt] Initializing zigbee2mqtt platform...
[12/8/2020, 9:10:31 AM] [zigbee2mqtt] Connecting to MQTT server at mqtt://localhost:1883
[12/8/2020, 9:10:31 AM] [zigbee2mqtt] Restoring accessory: 0x588e81fffe5eda34
[12/8/2020, 9:10:31 AM] [zigbee2mqtt] Publish to 'zigbee2mqtt/0x588e81fffe5eda34/get': '{"occupancy":0,"battery":0}'
[12/8/2020, 9:10:31 AM] [zigbee2mqtt] Publish to 'zigbee2mqtt/bridge/config/devices/get': ''
Setup Payload:
X-HM://0023T98Z12EKA
Enter this code with your HomeKit app on your iOS device to pair with Homebridge:
[12/8/2020, 9:10:31 AM] Homebridge is running on port 51752.
[12/8/2020, 9:10:31 AM] [zigbee2mqtt] Connected to MQTT server
[12/8/2020, 9:10:32 AM] Yamaha RX-V781 is running on port 35265.
[12/8/2020, 9:10:32 AM] Please add [Yamaha RX-V781] manually in Home app. Setup Code: 207-00-845
[12/8/2020, 9:10:35 AM] [Yamaha RX-V781] Current input: Roku (HDMI3)
[12/8/2020, 9:10:51 AM] [Yamaha RX-V781] Power On
[12/8/2020, 9:10:59 AM] [Yamaha RX-V781] Set input: AirPlay (AirPlay)

Plugin Config:

{
    "bridge": {
        "name": "Homebridge 19CC",
        "username": "0E:BF:66:73:19:CC",
        "port": 51752,
        "pin": "207-00-845"
    },
    "accessories": [],
    "platforms": [
        {
            "name": "Config",
            "port": 8581,
            "auth": "none",
            "theme": "dark-mode",
            "tempUnits": "c",
            "lang": "en",
            "platform": "config"
        },
        {
            "ip": "10.100.1.253",
            "name": "Yamaha RX-V781",
            "cacheDirectory": ".node_persist",
            "platform": "yamaha-avr"
        },
        {
            "mqtt": {
                "base_topic": "zigbee2mqtt",
                "server": "mqtt://localhost:1883",
                "reject_unauthorized": false,
                "keepalive": 60,
                "version": 4
            },
            "devices": [
                {
                    "id": "0x588e81fffe5eda34"
                }
            ],
            "platform": "zigbee2mqtt"
        }
    ]
}

Environment:

  • Plugin Version:2.04
  • Homebridge Version: 1.1.6
  • Node.js Version: 12.19.0
  • NPM Version: 6.14.8
  • Operating System: Raspbian 9.13

Homebridge crash if Yamaha AVR not found (EHOSTUNREACH)

This plugin crashes Homebridge and forces failure loop when the Yamaha AVR network cable is physically disconnected or receives a new IP from DHCP.

Error:
[7/9/2019, 7:32:43 AM] [Yamaha RX-V685] ERROR: Failed getSystemConfig from Yamaha RX-V685 probably just not a Yamaha AVR. { Error: connect EHOSTUNREACH 192.168.1.203:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
cause:
{ Error: connect EHOSTUNREACH 192.168.1.203:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1106:14)
errno: 'EHOSTUNREACH',
code: 'EHOSTUNREACH',
syscall: 'connect',
address: '192.168.1.203',
port: 80 },
isOperational: true,
errno: 'EHOSTUNREACH',
code: 'EHOSTUNREACH',
syscall: 'connect',
address: '192.168.1.203',
port: 80 }

The plugin should catch the error and handle it without stopping Homebridge.

Inputs

Describe Your Problem:
The Readme states 'Specific "favourite" inputs can be added manually …' How?

There is no guidance provided as to how this should be done. Admittedly I'm new to Homebridge, so maybe it would be obvious to someone with more experience, but I have no idea how 'inputs can be added manually' and so some assistance here would be appreciated.

Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

Show your Homebridge config.json here, remove any sensitive information.

Screenshots:

Environment:

  • Plugin Version:
  • Homebridge Version:
  • Node.js Version:
  • NPM Version:
  • Operating System:

Can not import Speaker Accessory to my Home app

I can not add the Speaker Accessory to my home app:

My setup:

Yamaha RX-A870
Homebridge on a ubuntu server 20.04

Everything works well I can switch channels and switch the Receiver on and off.

Screenshots:
Bildschirmfoto 2020-11-04 um 15 34 33

I can even see the speaker in my homebridge-ui. but when I try to control it nothing happens and I also can't find it when I try to manually add it to the home app as described below.

Is there an explanation for this behaviour or a chance to fix this?

Any Help on this is very welcome

Logs:

[11/4/2020, 3:17:17 PM] Homebridge v1.2.3 is running on port 51544.
[11/4/2020, 3:17:17 PM] AVR RX-A870 CFBA is running on port 36007.
[11/4/2020, 3:17:17 PM] Please add [AVR RX-A870 CFBA] manually in Home app. Setup Code:

Plugin Config:

        {
            "ip": "192.168.xxx.xxx",
            "name": "AVR RX-A870",
            "cacheDirectory": "/homebridge/node-persist-rx-a870",
            "platform": "yamaha-avr"
        }

Environment:

  • Plugin Version:
  • Homebridge Version: v1.2.3
  • Node.js Version: v14.15.0
  • NPM Version: v6.14.8
  • Operating System: OSX 12.6 VirtualBox Ubuntu server 20.04 Docker (oznu/docker-homebridge)

Partial functionality on a Yamaha TSR-7850?

I added my Yamaha TSR-7850 with the simplest config I could think of.. and while I can change inputs and power cycle the unit, I can't change volume at all nor do I see remote functionality.

I'm running iOS 14.

Suggestions on what might be wrong

Config:

"platform": "yamaha-avr",
"name": "Yamaha TSR-7850",
"ip": "192.168.2.8"

Error in log: "This plugin slows down Homebridge. The read handler for the characteristic 'Active Identifier' didn't respond at all!.

Describe The Bug:
First of all: Thanx for fixing the "Unexpected Input bug" so fast! 😊👍🏻

Next error in log is: "This plugin slows down Homebridge. The read handler for the characteristic 'Active Identifier' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info."

I had this error also in older versions of the plug in.

To Reproduce:

  • I Installed latest update of the Plugin
  • I do start homebridge, look in the log, and the error appears and repeats as described
  • After a restart of homebridge and even after a restart of the Raspberry Pi the error is still there

Expected behavior:

  • No error in the log
  • No slowing down homebridge
  • responding read handler for 'Active Identifier'

Logs:

[1.9.2022, 12:19:40] [homebridge-yamaha-avr] This plugin slows down Homebridge. The read handler for the characteristic 'Active Identifier' didn't respond at all!. Please check that you properly call the callback! See https://homebridge.io/w/JtMGR for more info.

Plugin Config:

{
"ip": "xxx.xxx.xxx.xxx",
"name": "Wohnzimmer",
"cacheDirectory": "/var/lib/homebridge/.yamahaAVR",
"platform": "yamaha-avr"
},

Environment:

  • Plugin Version: v2.1.1
  • Homebridge Version: v1.5.0
  • Node.js Version: v16.17.0
  • NPM Version: v8.15.0
  • Operating System: Raspbian GNU/Linux 11 (bullseye)

Inputs aren't showing up

I can see the inputs I defined for the receiver in the Settings section, but when I click the Input button I get an empty list. My config file is as follows:

{
    "platform": "yamaha-avr",
    "name": "Receiver",
    "ip": "192.168.1.67",
    "inputs": [
        {
            "id": "HDMI1",
            "name": "Apple TV"
        },
        {
            "id": "HDMI3",
            "name": "Wii U"
        },
        {
            "id": "AUDIO1",
            "name": "TV"
        }
    ]
}

Any idea what's going on?

Yamaha RX-V683 no response

Describe The Bug:
I use your plugin for 2 Yamaha AVRs. The first one is a RX-V577 connected via WiFi it works absolutely fine.
The second one is a RX-V683 connected via Ethernet and this one has"no response" in HomeKit. In Config-UI-X it works perfectly fine. Only in HomeKit it shows no response.
Do you have any idea to fix this.

I tried it on a separate homebridge, re-add, delete the homebridge bridge from HomeKit nothing worked.

To Reproduce:
See bug report.

Expected behavior:

Logs:
[12.11.2020, 18:22:01] [Yamaha AV] Power On
--> Device is ON (Homkit No Response)
[12.11.2020, 18:22:02] [Yamaha AV] Current input: AUDIO1
--> this one is correct
[12.11.2020, 18:22:03] [Yamaha AV] Current input: AUDIO1
[12.11.2020, 18:22:09] [Yamaha AV] Power Off
--> Device is Off(Homkit No Response)
[12.11.2020, 18:22:10] [Yamaha AV] Power On
--> Device is ON (Homkit No Response)
[12.11.2020, 18:22:12] [Yamaha AV] Current input: AUDIO1
[12.11.2020, 18:22:13] [Yamaha AV] Current input: AUDIO1
[12.11.2020, 18:22:19] [Yamaha AV] Current input: AUDIO1

Plugin Config:

    {
        "ip": "192.168.178.25",
        "name": "Yamaha AV",
        "cacheDirectory": ".node_persist",
        "platform": "yamaha-avr"
    }

Screenshot:
https://user-images.githubusercontent.com/71461694/98974378-22018d00-2515-11eb-8cdc-7cb66ae35c29.png
https://user-images.githubusercontent.com/71461694/98974446-33e33000-2515-11eb-9906-3d2b2c5a8d35.png
https://user-images.githubusercontent.com/71461694/98974471-3ba2d480-2515-11eb-9565-5ab35630b7b7.png

Environment:

  • Plugin Version: 2.0.4
  • Homebridge Version: 1.2.3
  • Node.js Version: 14.15.0
  • NPM Version: 6.14.8
  • Operating System: Rasbian GNU Linux Buster 10

Could not create cache directory.

After updating to the latest yamaha-avr plugin version I've been receiving the following error:

[11/17/2020, 12:32:35 AM] [AV Receiver]
Could not create cache directory.
Please check your Homebridge instance has permission to read/write to "/run/s6/services/homebridge-config-ui-x/.node_persist"
or set a different cache directory using the "cacheDirectory" config property.

[11/17/2020, 12:32:35 AM] [AV Receiver]
Could not access cache.
Please check your Homebridge instance has permission to access "undefined"
or set a different cache directory using the "cacheDirectory" config property.

Plugin Config:
{
"ip": "XXX.XXX.X.X",
"name": "AV Receiver",
"cacheDirectory": ".node_persist",
"platform": "yamaha-avr"
}

Environment:

  • Plugin Version: v2.0.4
  • Homebridge Version: 1.1.6
  • Node.js Version: 12.16.3
  • NPM Version: 6.14.4
  • Operating System: DSM Oznu Docker Image

Multiple YAMAHA AVR

Hi,
i configured 2 Yamaha devices like this:

{
            "inputs": [
                {
                    "id": "HDMI1",
                    "name": "HDMI1"
                },
                {
                    "id": "HDMI2",
                    "name": "HDMI2"
                },
                {
                    "id": "HDMI3",
                    "name": "HDMI3"
                },
                {
                    "id": "HDMI4",
                    "name": "HDMI4"
                },
                {
                    "id": "HDMI5",
                    "name": "HDMI5"
                },
                {
                    "id": "HDMI6",
                    "name": "HDMI6"
                }
            ],
            "ip": "192.168.2.61",
            "name": "AVR Wohnzimmer",
            "platform": "yamaha-avr"
        },
        {
            "inputs": [
                {
                    "id": "HDMI1",
                    "name": "HDMI1"
                },
                {
                    "id": "HDMI2",
                    "name": "HDMI2"
                },
                {
                    "id": "HDMI3",
                    "name": "HDMI3"
                },
                {
                    "id": "HDMI4",
                    "name": "HDMI4"
                },
                {
                    "id": "HDMI5",
                    "name": "HDMI5"
                },
                {
                    "id": "HDMI6",
                    "name": "HDMI6"
                }
            ],
            "ip": "192.168.2.62",
            "name": "AVR Schlafzimmer",
            "platform": "yamaha-avr"
        }

Both devices are available in the Home APP, can be controlled (Power, Input).
But in the Control Center remote, only one Device is available.
Is this a BUG i am facing?

Regards
Clem

ReferenceError: log is not defined

The homebridge-yamaha-avr module is causing homebridge to restart when it throws this error:

/homebridge/node_modules/homebridge-yamaha-avr/index.js:167
          log('CREATED INPUT:', value);
          ^

ReferenceError: log is not defined
    at Characteristic.ConfiguredName.inputService.getCharacteristic.on (/homebridge/node_modules/homebridge-yamaha-avr/index.js:167:11)
    at Characteristic.ConfiguredName.emit (events.js:189:13)
    at Characteristic.ConfiguredName.Characteristic.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Characteristic.js:321:10)
    at Bridge.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:873:22)
    at Array.forEach (<anonymous>)
    at Bridge.Accessory._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/Accessory.js:813:8)
    at HAPServer.emit (events.js:189:13)
    at HAPServer._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:972:10)
    at HAPServer.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/HAPServer.js:209:39)
    at IncomingMessage.emit (events.js:189:13)
    at endReadableNT (_stream_readable.js:1125:12)
    at process._tickCallback (internal/process/next_tick.js:63:19)

Exclude secondary zones from creating TV & speaker accessory.

Is your feature request related to a problem? Please describe:
I'd like to exclude the device for the 2nd zone from being ever being created for multi-zone AVR.

Describe the solution you'd like:
Some way to prevent the device being created for the 2nd zone of multi-zone receivers.

Describe alternatives you've considered:

Additional context:

Thanks!

Multiple Zones

So I know there is a plugin out there that does it but your plugin is more maintained and well structured.

The dream plugin for Yamaha AVR for me will be to use your plugin on multiple zones and also have optional fan/bulb representing the Volume for automations.

Thanks and appreciate the work you've done so far🙏🏼

Not all inputs are available

Hey!

I installed the homebridge yamaha plugin to use it with my Yamaha RX-V473 receiver. The main purpose was to start the radio with siri.

The connection to the receiver is working, but I am wondering why I don't get the source "tuner" as available input. I have this setup:

grafik

With that, as far as I could read, all available inputs should be displayed, but I just get these:

  • V-AUX
  • HDMI 1-4
  • USB
  • AV 1-6

Is there anything I am doing wrong?

Thanks,
Jack

Input names will not update in Home app

Describe Your Problem:

I have rearranged devices on my RX-V477's inputs and renamed them on the receiver, but the "old" names persist so the wrong input name appears in the Home app. I have tried deleting IdentifierCache and AccessoryInfo files in the persist folder.
Logs:

The logs correctly show and label the input with the new name, but the Home app does not match it.

Plugin Config:

    "platforms": [
        {
...
            "platform": "yamaha-avr",
            "name": "RX-V477",
            "ip": "192.168.xx.xx",
            "cacheDirectory": "/homebridge/config/persist/"
        },

Environment:

  • Plugin Version: 2.0.4
  • Homebridge Version: 1.2.5
  • Node.js Version: 14.15.0
  • NPM Version: 6.14.8
  • Operating System: Docker running on Raspbian Buster

Unhandled rejection TypeError: Service.Television is not a constructor

I get this error at startup.

Unhandled rejection TypeError: Service.Television is not a constructor
    at YamahaAVRAccessory.televisionService (/homebridge/node_modules/homebridge-yamaha-avr/index.js:112:20)
    at YamahaAVRAccessory.getServices (/homebridge/node_modules/homebridge-yamaha-avr/index.js:89:8)
    at Server._createAccessory (/usr/local/lib/node_modules/homebridge/lib/server.js:410:36)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:396:32)
    at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/lib/util/once.js:16:19
    at YAMAHA.getSystemConfig.then (/homebridge/node_modules/homebridge-yamaha-avr/index.js:31:11)
    at tryCatcher (/homebridge/node_modules/bluebird/js/release/util.js:16:23)
    at Promise._settlePromiseFromHandler (/homebridge/node_modules/bluebird/js/release/promise.js:512:31)
    at Promise._settlePromise (/homebridge/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._settlePromise0 (/homebridge/node_modules/bluebird/js/release/promise.js:614:10)
    at Promise._settlePromises (/homebridge/node_modules/bluebird/js/release/promise.js:694:18)
    at Promise._fulfill (/homebridge/node_modules/bluebird/js/release/promise.js:638:18)
    at Promise._resolveCallback (/homebridge/node_modules/bluebird/js/release/promise.js:454:14)
    at Promise._settlePromiseFromHandler (/homebridge/node_modules/bluebird/js/release/promise.js:524:17)
    at Promise._settlePromise (/homebridge/node_modules/bluebird/js/release/promise.js:569:18)
    at Promise._fulfillPromises (/homebridge/node_modules/bluebird/js/release/promise.js:669:14)
[3/19/2019, 9:49:24 PM] [mqtt] A new version 0.5.1 is avaiable

The yamaha section of my config looks like:

{
                    "platform": "yamaha-avr",
                    "name": "Yamaha RX-V675",
                    "ip": "192.168.1.190",
                    "inputs": [
                            {
                                    "id": "HDMI2",
                                    "name": "Apple TV"
                            },
                            {
                                    "id": "HDMI3",
                                    "name": "Dish"
                            }
                    ]
            }

Input names are wrong and can't be changed

I named the Inputs (eg. HDMI1-> Playstation, HDMI3 -> Apple TV etc.) in the Yamaha AVR App. But the plugin displays HDMI1, HDMI2, HDMI3 etc.
And if I rename them in the Home App they are changed back after some seconds.

Version: 3.0.0

Problem with cache folder

Describe The Bug:
Since 2-3 weeks, the connection to the AV Receiver is not working any more. Before that, it was working perfect. I saw today that there is an error in the log, which quite possibly shows what the problem is.

To Reproduce:
Restarted Homebridge already several times, have updated everything, but the problem still exists.

Expected behavior:
The connection to the AV Receiver should work again - am not sure if the error is the reason, but expect that this is the case.

Logs:

[2020-11-14 16:35:24] [Yamaha RX-V473] 
          Could not create cache directory.
          Please check your Homebridge instance has permission to read/write to "/var/lib/.node_persist"
          or set a different cache directory using the "cacheDirectory" config property.
        
[2020-11-14 16:35:24] [Yamaha RX-V473] 
            Could not access cache.
            Please check your Homebridge instance has permission to access "undefined"
            or set a different cache directory using the "cacheDirectory" config property.

Plugin Config:

{
            "platform": "yamaha-avr",
            "name": "Yamaha RX-V473",
            "ip": "192.168.1.103"
        }

Screenshots:

Environment:

  • Plugin Version: 2.0.4
  • Homebridge Version: 1.1.6
  • Node.js Version: 12.16.3
  • NPM Version: 6.14.1
  • Operating System: Raspbian

homebridge "Cannot find module 'node-fetch'" error at startup when using homebridge-yamaha-avr

The module installs OK, but at runtime it depends on node-fetch, which doesn't appear to be an explicit dependency. If I manually install node-fetch too, then it initializes OK.

[3/19/2019, 9:47:50 PM] Loaded plugin: homebridge-yamaha
[3/19/2019, 9:47:50 PM] Registering accessory 'homebridge-yamaha.YamahaAVR'
[3/19/2019, 9:47:50 PM] Registering platform 'homebridge-yamaha.YamahaAVR'
[3/19/2019, 9:47:50 PM] ---
[3/19/2019, 9:47:50 PM] ====================
[3/19/2019, 9:47:50 PM] ERROR LOADING PLUGIN homebridge-yamaha-avr:
[3/19/2019, 9:47:50 PM] Error: Cannot find module 'node-fetch'
    at Function.Module._resolveFilename (internal/modules/cjs/loader.js:581:15)
    at Function.Module._load (internal/modules/cjs/loader.js:507:25)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Object.<anonymous> (/homebridge/node_modules/homebridge-yamaha-avr/index.js:2:15)
    at Module._compile (internal/modules/cjs/loader.js:689:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:700:10)
    at Module.load (internal/modules/cjs/loader.js:599:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:538:12)
    at Function.Module._load (internal/modules/cjs/loader.js:530:3)
    at Module.require (internal/modules/cjs/loader.js:637:17)
    at require (internal/modules/cjs/helpers.js:22:18)
    at Plugin.load (/usr/local/lib/node_modules/homebridge/lib/plugin.js:72:23)
    at Server.<anonymous> (/usr/local/lib/node_modules/homebridge/lib/server.js:149:14)
    at Array.forEach (<anonymous>)
    at Server._loadPlugins (/usr/local/lib/node_modules/homebridge/lib/server.js:141:22)

No TV Controls

Hi,
The functionality in the Home app is working great (thanks), but when I go to Remotes in Control Centre it doesn’t show one for the Amplifier. I can see the two Apple TV’s that I have in the house as well as my LG TV (which is also via a home bridge plugin). Am I missing something here? It’s the final piece of the puzzle for me so I can change the Amplifier volume easily.

Thanks,
Brad.

No Volume Control

Hello together,

I've installed the plugin and it works fine. But I don't see the option to set the volume up or down. I have the Yamaha RX-V475. Anything else is working (Input, On/Off)..

Do you have an idea why this is not working? Thanks.

Tobias

Problem with "unexpected Input: V-Aux" since last update ...

Since the last update I get following error in the Homebridge-log:

Describe The Bug:

In the home bridge-log there is an constant and repeating error: "Unexpected input: "V-Aux".

  • all the text in the error (see log more downwards), including the listing of the other available and apparently expected (? - the "Unexpected input is always V-Aux in the message ...) inputs, in written in red.
  • The error repeats and repeats and repeats ... twice every five minutes

To Reproduce:

  • I Installed latest update of the Plugin
  • I do start homebridge, look in the log, and the error appears and repeats as described
  • After a restart of homebridge and even after a restart of the Raspberry Pi the error is still there

Expected behavior:

  • No error in the log.
  • correct detection of the standard V-Aux input of my RXV-781

Logs:

[30.8.2022, 20:34:31] [Wohnzimmer] Unexpected input: "V-AUX" [
  { id: 'Tuner', name: 'Tuner' },
  { id: 'Napster', name: 'Napster' },
  { id: 'Spotify', name: 'Spotify' },
  { id: 'JUKE', name: 'JUKE' },
  { id: 'Qobuz', name: 'Qobuz' },
  { id: 'TIDAL', name: 'TIDAL' },
  { id: 'Deezer', name: 'Deezer' },
  { id: 'SERVER', name: 'SERVER' },
  { id: 'NETRADIO', name: 'NET RADIO' },
  { id: 'Bluetooth', name: 'Bluetooth' },
  { id: 'USB', name: 'USB' },
  { id: 'AirPlay', name: 'AirPlay' },
  { id: 'PHONO', name: 'PHONO' },
  { id: 'HDMI1', name: 'Blu-ray' },
  { id: 'HDMI2', name: 'Fire-TV Stick' },
  { id: 'HDMI3', name: 'Wii' },
  { id: 'HDMI4', name: 'HDMI4' },
  { id: 'HDMI5', name: 'HDMI5' },
  { id: 'AV1', name: 'AV1' },
  { id: 'AV2', name: 'AV2' },
  { id: 'AV3', name: 'AV3' },
  { id: 'AV4', name: 'AV4' },
  { id: 'AV5', name: 'AV5' },
  { id: 'AV6', name: 'AV6' },
  { id: 'VAUX', name: 'CD' },
  { id: 'AUDIO1', name: 'AUDIO1' },
  { id: 'AUDIO2', name: 'AUDIO2' }
]

... end repeats and repeats, endlessly ...

Plugin Config:

{
"ip": "xxx.xxx.xxx.xxx",
"name": "Wohnzimmer",
"cacheDirectory": "/var/lib/homebridge/.yamahaAVR",
"platform": "yamaha-avr"
},

Screenshots:

How do I insert a screenshot here?

Environment:

  • Plugin Version: v2.1.0-beta.8
  • Homebridge Version: v1.5.0
  • Node.js Version: v16.17.0
  • NPM Version: v8.15.0
  • Operating System: Raspbian GNU/Linux 11 (bullseye)

Volume control

Hi, I would like to know if is it possible to enable a volume control.

Not able to turn the unit off or on now

Describe The Bug:
Not able to turn the unit off or on now

To Reproduce:
Upgrade to the new 2.0 version

Expected behavior:
I updated to V2.0 from homebridge-yamaha-avr v1.0.4 and now there is no way to turn the unit off or on as it shows in HomeKit as a speaker

Logs:

Show the Homebridge logs here, remove any sensitive information.

Plugin Config:

        {
            "platform": "yamaha-avr",
            "ip": "10.0.1.38",
            "name": "Receiver"
        }

Screenshots:
https://mike-underwood.com/IMG_0517.jpeg

Environment:

  • Plugin Version: v2.0.0

  • Homebridge Version: v1.2.3

  • Node.js Version: v12.18.3

  • NPM Version: v6.14.7

  • Operating System: Synology/Docker

Yamaha RX-V771 no volume control

Describe Your Problem:

Plugin works fine, I can put the V771 on, off and select a different Input. Only the volume control doesn't work. Maybe its because its a multi zone receiver. I only use the main zone.
Logs:

12/1/2020, 11:59:09 AM [Yamaha AVR] Initializing yamaha-avr platform...
12/1/2020, 11:59:09 AM Loading 1 accessories...
12/1/2020, 11:59:09 AM [Pihole] Initializing Pihole accessory...
12/1/2020, 11:59:10 AM External port pool ran out of ports. Fallback to random assign.
12/1/2020, 11:59:10 AM Yamaha AVR is running on port 46827.
12/1/2020, 11:59:10 AM Please add [Yamaha AVR] manually in Home app. Setup Code:
12/1/2020, 11:59:14 AM [Yamaha AVR] Current input: HDMI3 (HDMI3)

Plugin Config:

{
            "platform": "yamaha-avr",
            "plugin_map": {
                "plugin_name": "homebridge-yamaha-avr"
            },
            "ip": "192.168.1.7",
            "name": "Yamaha AVR",
            "cacheDirectory": ".node_persist"
        }

Screenshots:

Environment:

  • Plugin Version: 2.0.4
  • Homebridge Version: Using HOOBS
  • Node.js Version: 12.19.0
  • NPM Version:
  • Operating System: HOOBS 3.3.1

Missing dependencies in the beta?

The beta seems to be missing the following dependencies:

  • yamaha-nodejs
  • node-fetch
  • node-persist

I had to install these manually with npm install to get the beta to run.

Multiple devices

Describe Your Problem:

How can I configure it for multiple AVRs?

Environment:

  • Plugin Version: 2.0.4
  • Homebridge Version: 1.1.6
  • Node.js Version: 14.15.0
  • NPM Version: 6.14.8
  • Operating System: MacOS 10.14.6

Warnings On Install

Describe The Bug:
Warning of deprecated depends on install.

To Reproduce:
Install plugin using CLI.

Expected behavior:
No warnings.

Logs:

npm WARN deprecated [email protected]: this library is no longer supported
npm WARN deprecated [email protected]: Please upgrade  to version 7 or higher.  Older versions may use Math.random() in certain circumstances, which is known to be problematic.  See https://v8.dev/blog/math-random for details.
npm WARN deprecated [email protected]: request has been deprecated, see https://github.com/request/request/issues/3142

Plugin Config:

        {
            "ip": "192.168.1.91",
            "name": "Yamaha AVR",
            "platform": "yamaha-avr",
            "_bridge": {
                "username": "0E:BA:68:77:A5:EE",
                "port": 35909
            }

Screenshots:
Screen Shot 2022-08-30 at 10 31 07 PM

Environment:

  • Plugin Version: v2.1.0-beta.9
  • Homebridge Version: v1.5.0
  • Node.js Version: v16.17.0
  • NPM Version: v8.18.0
  • Operating System: Raspbian / hb-service

Issue with Multiple Yamaha AVRs

I have two Yamaha TSR-7850s(Hey... they were on sale at Costco.....) and am getting the following error when trying to boot up home bridge:

These seems to crash home bridge and put it in a very strange state similar to #9

[8/15/2019, 11:03:03 PM] Homebridge is running on port 51826. [8/15/2019, 11:03:03 PM] [yamaha-zone-tv] Possible Yamaha device discovered Diskstation [ 'fe80::211:32ff:fe33:1601', '192.168.1.47' ] [8/15/2019, 11:03:03 PM] [yamaha-zone-tv] Possible Yamaha device discovered Basement [ '192.168.1.110', 'fe80::4e1b:86ff:fe89:68aa' ] [8/15/2019, 11:03:03 PM] [yamaha-zone-tv] Possible Yamaha device discovered Patio [ '192.168.1.74', 'fe80::4e1b:86ff:fea6:3d6a' ] [8/15/2019, 11:03:03 PM] [yamaha-zone-tv] Found Yamaha TSR-7850 - 03D38A63, "Patio" [8/15/2019, 11:03:03 PM] [yamaha-zone-tv] Found Yamaha TSR-7850 - 06402303, "Basement" [8/15/2019, 11:03:03 PM] [yamaha-zone-tv] Possible Yamaha device discovered EPSON XP-820 Series [ '192.168.1.54', 'fe80::66eb:8cff:fe13:ac1f' ] [8/15/2019, 11:03:03 PM] [yamaha-zone-tv] Adding TV Control for Main [8/15/2019, 11:03:03 PM] [yamaha-zone-tv] Adding TV Control for Zone2 Unhandled rejection Error: Cannot add a Service with the same UUID '000000D9-0000-1000-8000-0026BB765291' and subtype '15eb8e46-3ee2-4b1e-922a-366be0895315' as another Service in this Accessory. at PlatformAccessory.addService (/usr/local/lib/node_modules/homebridge/lib/platformAccessory.js:55:15) at YamahaZone.<anonymous> (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/index.js:547:24) at Array.forEach (<anonymous>) at YamahaZone.getServices (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/index.js:519:12) at YamahaAVRPlatform.<anonymous> (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/index.js:198:37) at tryCatcher (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:699:18) at Promise._fulfill (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:643:18) at Promise._resolveCallback (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:459:14) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:529:17) at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:574:18) at Promise._fulfillPromises (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:674:14) at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:700:18) at Promise._fulfill (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:643:18) at Promise._resolveCallback (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:437:57) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:529:17) at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:699:18) at Promise._fulfill (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:643:18) at Promise._resolveCallback (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:437:57) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:529:17) at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:699:18) at Promise._fulfill (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:643:18) at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/timers.js:26:46) at listOnTimeout (timers.js:324:15) at processTimers (timers.js:268:5) [8/15/2019, 11:03:04 PM] [yamaha-zone-tv] Adding TV Control for Main [8/15/2019, 11:03:04 PM] [yamaha-zone-tv] Adding TV Control for Zone2 Unhandled rejection Error: Cannot add a Service with the same UUID '000000D9-0000-1000-8000-0026BB765291' and subtype '15eb8e46-3ee2-4b1e-922a-366be0895315' as another Service in this Accessory. at PlatformAccessory.addService (/usr/local/lib/node_modules/homebridge/lib/platformAccessory.js:55:15) at YamahaZone.<anonymous> (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/index.js:547:24) at Array.forEach (<anonymous>) at YamahaZone.getServices (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/index.js:519:12) at YamahaAVRPlatform.<anonymous> (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/index.js:198:37) at tryCatcher (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/util.js:16:23) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:517:31) at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:699:18) at Promise._fulfill (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:643:18) at Promise._resolveCallback (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:459:14) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:529:17) at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:574:18) at Promise._fulfillPromises (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:674:14) at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:700:18) at Promise._fulfill (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:643:18) at Promise._resolveCallback (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:437:57) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:529:17) at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:699:18) at Promise._fulfill (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:643:18) at Promise._resolveCallback (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:437:57) at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:529:17) at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:574:18) at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:619:10) at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:699:18) at Promise._fulfill (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/promise.js:643:18) at Timeout._onTimeout (/usr/local/lib/node_modules/homebridge-yamaha-zone-tv/node_modules/bluebird/js/release/timers.js:26:46) at listOnTimeout (timers.js:324:15) at processTimers (timers.js:268:5)

Plugin is blocking other plugins

If i setup the AVR in config.json - buttons in Home app are working and everything is fine.

If i take the avr device offline, and the yamaha plugin cant reach the device, all other homebridge plugins are blocked and the app shows the status „not available“

Manually specifying port in the beta

The beta seems to assign a random port number to the Yamaha AVR accessory on each launch of homebridge. This makes the plugin incompatible with any firewall software.

The plugin should either respect the port specified under bridge in config.json, or if this is not possible, the plugin should respect a port setting under platforms in config.json.

EACCES: permission denied

Describe The Bug:
Yamaha Receiver plugin doesn't work, RX-601D cannot be added in HomeKit app.

Logs:

[[37m[10/14/2020, 9:45:33 PM] [[39m[[36m[yamaha-avr] [[39mInitializing yamaha-avr platform...                                                                                                                                                                                                                                                                                                                                                                                                                         
(node:379) UnhandledPromiseRejectionWarning: Error: EACCES: permission denied, mkdir '.node-persist'                                                                                                                                                                                             
(node:379) 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:379) [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.              

Plugin Config:

        {
            "ip": "192.168.2.28",
            "inputs": "Yamaha RX-601D",
            "platform": "yamaha-avr"
        }

Environment:

  • Plugin Version: 2.0.0
  • Homebridge Version: v1.2.3
  • Node.js Version: v12.19.0
  • NPM Version: v6.14.8
  • Operating System: Docker

Direct link to yradio.vtuner.com bookmarks

Hello, first of all what a great plugin! it works great and without problems. however, there is 1 option that I miss, because I would like to make some direct links from homekit to my yradio.vtuner.com bookmarks. this so that I can switch on the correct radio transmitter with a siri command. I can now set the radio to NET RADIO, but I still have to manually select a stored station. this option would make the plugin really perfect.

Amp updating/unreponsive

re yamaha rxa3080
Describe The Bug:

The Yamaha accessory shows in the home app but is unresponsive. It also doesnt show up in the accessories in Hoobs. This was working fine two versions prior of this plugin

To Reproduce:

Expected behavior:

Cannot control the yamaha avr

Logs:

Show the Homebridge logs here, remove any sensitive information.
```[11/8/2020, 1:18:30 AM] Registering accessory 'homebridge-xiaomi-roborock-vacuum.XiaomiRoborockVacuum'
08/11/2020, 7:18:30 pm Loaded plugin 'homebridge-yamaha-avr'
08/11/2020, 7:18:30 pm Loading 9 platforms...
08/11/2020, 7:18:30 pm [11/8/2020, 1:18:30 AM] Registering platform 'homebridge-yamaha-avr.yamaha-avr'
08/11/2020, 7:18:30 pm [webostv] Initializing webostv platform...

**Plugin Config:**

```json
Show your Homebridge config.json here, remove any sensitive information.

{
"platform": "yamaha-avr",
"plugin_map": {
"plugin_name": "homebridge-yamaha-avr"
},
"ip": "10.0.1.48",
"name": "Yamaha AVR",
"cacheDirectory": ".node_persist"
}
Screenshots:

Environment:

  • Plugin Version:2.0.4
  • Homebridge Version: hoops 3.2.10 (issue existed on 3.2.9 and 3.52.6)
  • Node.js Version: 12.16.3
  • NPM Version:
  • Operating System: Hoobs

Unhandled Promise Rejection Warning

Describe The Bug:

To Reproduce:

Expected behavior:

Logs:

[10/27/2020, 12:10:40 AM] [Living Room Receiver] 
          Cannot communicate with Yamaha AVR at 192.168.1.124.
          Connection will be restored automatically when the AVR begins responding.
        
(node:1828) UnhandledPromiseRejectionWarning: Error: [node-persist][readFile] /homebridge/persist/AccessoryInfo.0E5AC1BABBEC.json does not look like a valid storage file!
    at /homebridge/node_modules/homebridge-yamaha-avr/node_modules/node-persist/src/local-storage.js:314:89
    at FSReqCallback.readFileAfterClose [as oncomplete] (internal/fs/read_file_context.js:63:3)
(node:1828) 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: 4)

Plugin Config:

{
    "bridge": {
        "name": "Homebridge BBEC",
        "username": "0E:5A:C1:BA:BB:EC",
        "port": 52580,
        "pin": "031-45-155"
    },
    "accessories": [
        {
            "name": "x",
            "vin": "x",
            "username": "x",
            "password": "x",
            "waitMinutes": 1,
            "accessory": "Tesla"
        },
        {
            "accessory": "PlexWebhooksServer",
            "name": "Plex Upstairs Master",
            "port": "32000",
            "filter": [
                {
                    "Account.title": "x",
                    "Player.title": "Upstairs Master"
                }
            ]
        },
        {
            "accessory": "PlexWebhooksServer",
            "name": "Plex Living Room",
            "port": "32001",
            "filter": [
                {
                    "Account.title": "x",
                    "Player.title": "Living Room Apple TV"
                }
            ]
        },
        {
            "accessory": "PlexWebhooksServer",
            "name": "Plex Theater",
            "port": "32002",
            "filter": [
                {
                    "Account.title": "x",
                    "Player.title": "XBOXONE"
                }
            ]
        }
    ],
    "platforms": [
        {
            "name": "Config",
            "port": 8582,
            "platform": "config"
        },
        {
            "platform": "TeslaPowerwall",
            "name": "Tesla Powerwall",
            "ip": "192.168.1.92",
            "pollingInterval": 10000,
            "historyInterval": 120000,
            "lowBattery": 10,
            "historySetting": {
                "storage": "fs"
            }
        },
        {
            "units": "us",
            "interval": 5,
            "stations": [
                {
                    "nameNow": "x",
                    "service": "openweathermap",
                    "key": "x",
                    "locationGeo": [
                        x,
                        -x
                    ],
                    "locationCity": "x",
                    "language": "en",
                    "compatibility": "home",
                    "forecast": [
                        "Today"
                    ],
                    "conditionCategory": "detailed",
                    "now": true,
                    "extraHumidity": false,
                    "hidden": [
                        "Air Pressure",
                        "Dew Point",
                        "Ozone"
                    ]
                }
            ],
            "platform": "WeatherPlus"
        },
        {
            "email": "x",
            "password": "x",
            "platform": "NeatoVacuumRobot"
        },
        {
            "name": "Govee",
            "apiKey": "x",
            "debug": false,
            "debugReqRes": false,
            "refreshTime": 30,
            "platform": "Govee"
        },
        {
            "ip": "192.168.1.124",
            "name": "Living Room Receiver",
            "cacheDirectory": "/homebridge/persist",
            "platform": "yamaha-avr"
        }
    ]
}

Screenshots:

Environment:

  • Plugin Version: Latest as of 10/27/20
  • Homebridge Version:
  • Node.js Version:
  • NPM Version:
  • Operating System:

Error in Logfile: "Warning from the characteristic Active Identifier"

Since updating to the current Homebridge version (1.3.4), I receive this error message:

[2021-4-18 10:05:25] [homebridge-yamaha-avr] This plugin generated a warning from the characteristic 'Active Identifier': characteristic was supplied illegal value: number -1 exceeded minimum of 0. See https://git.io/JtMGR for more info.
[2021-4-18 10:05:27] [homebridge-yamaha-avr] This plugin slows down Homebridge. The read handler for the characteristic 'Active Identifier' didn't respond at all!. Please check that you properly call the callback! See https://git.io/JtMGR for more info.

Plugin Version is 2.0.4

Volume control?

If I understand it correctly. I can only change inputs, and toggle power on/off? I can't see it as TV / Remote Control / Volume Controls in the Home app. Am I correct?

Plugin not responding after powering off (only when channel DAB selected)

By the way: Great Plugin ! Thanks a lot !

After switching off the device manually on the device (RX-S601D) in mode DAB (digital radio), the plugin shows "device not available"

To Reproduce:

  1. Switch to DAB on device (RX-S601D)
  2. Switch off the device manually (RX-S601D)
  3. Kill Homekit-App on iPhone (to bridge delay of the app for updating the status of the plugin)

Comments: Other input channels than DAB work correctly

Expected behavior:
After switching off the device (any input channel selected), the plugin shall stay available.

Environment:

homebridge-yamaha-avr v2.0.4

  • Homebridge Version: v1.1.7
  • Node.js Version: v14.15.3
  • NPM Version: v6.14.11
  • Operating System: Raspbian

Yamaha Device: RX-S601D

No Response

I'm getting constant no response from my yamaha receiver.

yamaha-nodjs is able to successfully communicate with the receiver, and the Active characteristic is indeed returned appropriately, however homekit insists that the plugin is giving me "no response". My other home bridge accessories work correctly.

log snippet:

Yamaha-nodejs getBasicInfo Main_Zone {
"YAMAHA_AV": {
"$": {
"rsp": "GET",
"RC": "0"
},
"Main_Zone": [
{
"Basic_Status": [
{
"Power_Control": [
{
"Power": [
"Standby"
],
"Sleep": [
"Off"
]
}
],
"Volume": [
{
"Lvl": [
{
"Val": [
"-440"
],
"Exp": [
"1"
],
"Unit": [
"dB"
]
}
],
"Mute": [
"Off"
],
"Subwoofer_Trim": [
{
"Val": [
"0"
],
"Exp": [
"1"
],
"Unit": [
"dB"
]
}
],
"Scale": [
"dB"
]
}
],
"Input": [
{
"Input_Sel": [
"HDMI1"
],
"Input_Sel_Item_Info": [
{
"Param": [
"HDMI1"
],
"RW": [
"RW"
],
"Title": [
"AppleTV"
],
"Icon": [
{
"On": [
"1"
],
"Off": [
"0"
]
}
],
"Src_Name": [
"Osdname:Living Room"
],
"Src_Number": [
"1"
]
}
]
}
],
"Surround": [
{
"Program_Sel": [
{
"Current": [
{
"Straight": [
"Off"
],
"Enhancer": [
"Off"
],
"Sound_Program": [
"Surround Decoder"
]
}
]
}
]
}
],
"Party_Info": [
"Off"
],
"Sound_Video": [
{
"Tone": [
{
"Bass": [
{
"Val": [
"0"
],
"Exp": [
"1"
],
"Unit": [
"dB"
]
}
],
"Treble": [
{
"Val": [
"0"
],
"Exp": [
"1"
],
"Unit": [
"dB"
]
}
]
}
],
"Pure_Direct": [
{
"Mode": [
"Off"
]
}
],
"HDMI": [
{
"Standby_Through_Info": [
"On"
],
"Output": [
{
"OUT_1": [
"On"
],
"OUT_2": [
"On"
]
}
]
}
],
"YPAO_Volume": [
"Auto"
],
"Extra_Bass": [
"Off"
],
"Adaptive_DRC": [
"Off"
],
"Dialogue_Adjust": [
{
"Dialogue_Lift": [
"0"
],
"Dialogue_Lvl": [
"2"
],
"DTS_Dialogue_Control": [
"0"
]
}
]
}
]
}
]
}
]
}
} +47ms
Accessory [Homebridge] Got Characteristic "Active" value: 0 +216ms

Volume option

I'm using the pluging and works fine.
I just can't adjust the volume.
How can I do to enable Volume button?

Not seeing volume icon

Describe Your Problem:
I'm not seeing a volume icon on my IPAD. I have the icon for on/off and input selection. What am I missing here? Please assist. Thanks

  • HB Version = 1.3.4
  • OS = Windows

Spotify Connect support

This is perhaps a long shot, but based on your experience working on this, do you think it's possible to switch input to Spotify Connect (for AVRs with Spotify Connect support) and start playing perhaps your most recent album/playlist?

Happy to have a look and send a PR if you think it's possible.

Receiver Controls not available

Edit: Forgot to say thanks for this great plugin! Thank you 😅

Describe The Bug:
When adding my Yamaha RX-V485 I only get the "Speaker" accessory, but no input or TV controls in Home. There is a log message about adding a duplicate input in the accessory but I can't see a way of fixing that myself.

Logs:

[10/21/2020, 8:41:47 AM] [HB Supervisor] Sending SIGTERM to Homebridge
[10/21/2020, 8:41:47 AM] Got SIGTERM, shutting down Homebridge...
[10/21/2020, 8:41:52 AM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null
[10/21/2020, 8:41:57 AM] [HB Supervisor] Restarting Homebridge...
[10/21/2020, 8:41:57 AM] [HB Supervisor] Starting Homebridge with extra flags: -I -P /homebridge/node_modules
[10/21/2020, 8:41:57 AM] [HB Supervisor] Started Homebridge v1.1.6 with PID: 985
[10/21/2020, 8:41:59 AM] Loaded config.json with 4 accessories and 2 platforms.
[10/21/2020, 8:41:59 AM] ---
[10/21/2020, 8:42:03 AM] Loaded plugin: [email protected]
[10/21/2020, 8:42:03 AM] Registering accessory 'homebridge-mqttthing.mqttthing'
[10/21/2020, 8:42:03 AM] ---
[10/21/2020, 8:42:04 AM] Loaded plugin: [email protected]
[10/21/2020, 8:42:04 AM] Registering platform 'homebridge-yamaha-avr.yamaha-avr'
[10/21/2020, 8:42:04 AM] ---
[10/21/2020, 8:42:04 AM] Loaded plugin: [email protected]
[10/21/2020, 8:42:04 AM] Registering platform 'homebridge-config-ui-x.config'
[10/21/2020, 8:42:04 AM] ---
[10/21/2020, 8:42:04 AM] Loading 2 platforms...
[10/21/2020, 8:42:04 AM] [Config] Initializing config platform...
[10/21/2020, 8:42:04 AM] [Config] Running in Service Mode
[10/21/2020, 8:42:04 AM] [Receiver] Initializing yamaha-avr platform...
[10/21/2020, 8:42:04 AM] Loading 4 accessories...

... a few lines later ...

(node:985) UnhandledPromiseRejectionWarning: Error: Cannot add a Service with the same UUID '000000D9-0000-1000-8000-0026BB765291' and subtype 'AV2' as another Service in this Accessory.
    at Accessory._this.addService (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:281:17)
    at PlatformAccessory.addService (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:92:41)
    at /homebridge/node_modules/homebridge-yamaha-avr/src/accessory.ts:229:45
(node:985) 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:985) [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.

Plugin Config:

        {
            "ip": "192.168.1.3",
            "name": "Receiver",
            "cacheDirectory": "/homebridge/yamaha-avr-persist",
            "platform": "yamaha-avr"
        }

Environment:

  • Plugin Version: 2.0.2
  • Homebridge Version: 1.1.6
  • Node.js Version: v12.18.3
  • NPM Version: 6.14.6
  • Operating System: Docker Image oznu/homebridge:raspberry-pi

Failed to get available inputs from Yamaha R-N301

The plugin gets the basic configuration but then fails to get the available inputs. Not sure if the issue is in homebridge-yamaha-avr or in homebridge-yamaha.

curl -X POST 'http://<IP address>/YamahaRemoteControl/ctrl' --data-binary '<?xml version="1.0" encoding="utf-8"?><YAMAHA_AV cmd="GET"><System><Config>GetParam</Config></System></YAMAHA_AV>' returns <YAMAHA_AV rsp="GET" RC="0"><System><Config><Model_Name>R-N301</Model_Name><System_ID>redacted</System_ID><Version>1.13/0.05</Version><Feature_Existence><Main_Zone>1</Main_Zone><Tuner>1</Tuner><Spotify>1</Spotify><Pandora>1</Pandora><SERVER>1</SERVER><NET_RADIO>1</NET_RADIO><AirPlay>1</AirPlay></Feature_Existence></Config></System></YAMAHA_AV>

Looks like something fails parsing this response. I'm a system administrator for Windows and FreeBSD servers, so I'm outside of my expertise here.

Tuner input (DAB) not able to be activated

After starting up the device via plugin, the input DAB (digital radio) is available, but cannot be selected
(after selection of the input channel DAB, the input switches to the former input and does not switch to DAB --> in effect the selection is ignored)

To Reproduce:

  1. Start up device via plugin
  2. Try to select DAB

Expected behavior:
Upon selection of DAB, the channell shall be activated

Environment:

homebridge-yamaha-avr v2.0.4

  • Homebridge Version: v1.1.7
  • Node.js Version: v14.15.3
  • NPM Version: v6.14.11
  • Operating System: Raspbian

Yamaha Device: RX-S601D

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.