Error when switching inputs crashes Homebridge
Opened this issue · 0 comments
gravey13 commented
I'm using homebridge-denon-heos v2.9.7 and Homebridge 1.2.5. The plugin was working perfectly with my Denon AVR-X1400H, until I updated the plugin to 2.9.7 recently.
Now the receiver does not show up in the Home app, only the input switches. When I try to turn on one of the input switches, I get the error below which crashes Homebridge. I've also included the relevant part of my config below.
Thanks in advance for any help.
[1/26/2021, 10:05:18 AM] [DenonAVR] DEBUG: 192.168.1.205: http://192.168.1.205:60006/upnp/desc/aios_device/aios_device.xml
[1/26/2021, 10:05:18 AM] [DenonAVR] ------------------------------
[1/26/2021, 10:05:18 AM] [DenonAVR] Receiver discovered in network:
[1/26/2021, 10:05:18 AM] [DenonAVR] IP Address: 192.168.1.205
[1/26/2021, 10:05:18 AM] [DenonAVR] Port: 8080
[1/26/2021, 10:05:18 AM] [DenonAVR] Model: Denon AVR-X1400H
[1/26/2021, 10:05:18 AM] [DenonAVR] Firmware: 1.583.161
[1/26/2021, 10:05:18 AM] [DenonAVR] ------------------------------
[1/26/2021, 10:07:07 AM] [DenonAVR] DEBUG: No html control possible. Use Telnet control.
[1/26/2021, 10:07:07 AM] [DenonAVR] DEBUG: setDenonInformation: 192.168.1.205. Device info set: true
[1/26/2021, 10:07:07 AM] [DenonAVR] New switch configured: AVR on Apple TV
[1/26/2021, 10:07:07 AM] [DenonAVR] New switch configured: AVR on Game
[1/26/2021, 10:07:07 AM] [DenonAVR] DEBUG: publishExternalAccessories zone: 1: Denon Receiver
[1/26/2021, 10:07:07 AM] [DenonAVR] New volumeControl configured: AVR Volume
[1/26/2021, 10:07:08 AM] Denon Receiver BDD3 is running on port 38790.
[1/26/2021, 10:07:08 AM] Please add [Denon Receiver BDD3] manually in Home app. Setup Code:
[1/26/2021, 10:07:08 AM] [DenonAVR] DEBUG" connected to 192.168.1.205
[1/26/2021, 10:07:08 AM] [DenonAVR] Using Telnet control with receiver: 192.168.1.205
[1/26/2021, 10:32:39 AM] TypeError: Cannot read property 'replace' of undefined
at legacyClient.setPowerStateTelNet (/homebridge/node_modules/homebridge-denon-heos/index.js:1720:25)
at legacyClient.setPowerStateLegacy (/homebridge/node_modules/homebridge-denon-heos/index.js:1628:9)
at On.emit (events.js:315:20)
at On.EventEmitter.emit (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/EventEmitter.ts:42:22)
at On.Characteristic._this.setValue (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Characteristic.ts:652:12)
at /usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1461:24
at Array.forEach (<anonymous>)
at Bridge.Accessory._this._handleSetCharacteristics (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:1303: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:812:12)
at IncomingMessage.<anonymous> (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/HAPServer.ts:280:24)
at IncomingMessage.emit (events.js:327:22)
at endReadableNT (internal/streams/readable.js:1327:12)
at processTicksAndRejections (internal/process/task_queues.js:80:21)
[1/26/2021, 10:32:39 AM] Got SIGTERM, shutting down Homebridge...
Config:
{
"debugToInfo": true,
"devices": [
{
"name": "Denon Receiver",
"ip": "192.168.1.205",
"zone": 1,
"switchInfoMenu": true,
"defaultInputID": "MPLAY",
"inputs": [
{
"inputID": "MPLAY",
"name": "Apple TV"
},
{
"inputID": "GAME",
"name": "Game"
}
]
}
],
"switches": [
{
"name": "AVR on Apple TV",
"ip": "192.168.1.205",
"zone": 1,
"pollAllInput": false
},
{
"name": "AVR on Game",
"ip": "192.168.1.205",
"zone": 1,
"inputID": "GAME",
"pollAllInput": false
}
],
"volumeControl": [
{
"name": "AVR Volume",
"ip": "192.168.1.205",
"zone": 1,
"controlType": "bulb",
"volumeLimit": 70
}
],
"platform": "DenonAVR"
}