kazcangi / homebridge-pioneer-avr

Pioneer AVR TV plugin for Homebridge
MIT License
9 stars 14 forks source link

Plugin crashes HomeBridge if "Accessories" tab is open #25

Open bass63 opened 3 years ago

bass63 commented 3 years ago

The plugin works fine on it's own, but if I open the "accessories" tab on HomeBridge web interface - HB crashes after trying to gett a volume status (receiver VSX-922 is in standby). Here's the log

2/15/2021, 14:11:19] [Pioneer AVR] Get power status [2/15/2021, 14:11:19] [Pioneer AVR] Get input status [2/15/2021, 14:11:19] [Pioneer AVR] Get mute status [2/15/2021, 14:11:19] [Pioneer AVR] Get volume status [2/15/2021, 14:11:21] TypeError: this.volumeStatus is not a function at pioneerAvrAccessory.getVolume (/usr/local/lib/node_modules/homebridge-pioneer-avr/index.js:254:10) at Volume.emit (events.js:315:20) at Volume.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/EventEmitter.ts:42:22) at Volume.Characteristic._this.getValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:489:12) at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1217:22 at Array.forEach () at Bridge.Accessory._this._handleGetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1145:10) at HAPServer.emit (events.js:315:20) at HAPServer.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/EventEmitter.ts:42:22) at HAPServer._this._handleCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:756:12) [2/15/2021, 14:11:22] Got SIGTERM, shutting down Homebridge...

Can this be fixed?

gratefulbread commented 3 years ago

try changing your Receiver Model Number to TX-NR515. I have a VSX-831 but have to use TX-NR515 to get full functionality.

bass63 commented 3 years ago

I thought model number is purely cosmetical/informative and doesn’t affect functionality.

jkenn99 commented 3 years ago

This fixes it: https://github.com/kazcangi/homebridge-pioneer-avr/pull/26