gw-wiscon / homebridge-onkyo-avr

Homebridge module for Onkyo AVRs (tested on TX-NR609)
10 stars 39 forks source link

If onkyo is unplugged, plugin crash at load homebridge #4

Closed uronito closed 8 years ago

uronito commented 8 years ago

hi gw-wiscon, i have went out a week, i come back jeje,

If Onkyo is unplugged, plugin crash at load homebirdge.

Homebridge is running on port 51826. [Ordenador Portatil] start polling.. [Ordenador Portatil] getPowerState - actual mode [My Philips TV] start polling.. [My Philips TV] getPowerState - actual mode [My Onkyo] start polling.. [My Onkyo] event - status poller - new state: false [My Onkyo] setPowerState - polling mode, ignore, state: false [My Onkyo] getPowerState - actual mode, return state: false [Ordenador Salon] start polling.. [Ordenador Salon] getPowerState - actual mode [My Onkyo] eventError: ERROR (send_not_connected) Not connected, can't send data: "PWRQSTN" [My Onkyo] getPowerState - PWR QRY: ERROR - current state: false /usr/local/lib/node_modules/homebridge-onkyo-avr/index.js:191 that.switchService.getCharacteristic(Characteristic.On).setValue(powerOn, n ^ ReferenceError: powerOn is not defined at Object. (/usr/local/lib/node_modules/homebridge-onkyo-avr/index.js:191:70) at Object.callback (/usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/eiscp.js:429:17) at /usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/node_modules/async/lib/async.js:906:35 at _arrayEach (/usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/node_modules/async/lib/async.js:85:13) at /usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/node_modules/async/lib/async.js:898:17 at /usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/node_modules/async/lib/async.js:44:16 at /usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/eiscp.js:414:5 at /usr/local/lib/node_modules/homebridge-onkyo-avr/node_modules/eiscp/node_modules/async/lib/async.js:987:13 at Immediate.q.process as _onImmediate at processImmediate as _immediateCallback root@DiskStation:/# service avahi-daemon start

Regards

gw-wiscon commented 8 years ago

Hi Uronito, I believe I found and corrected the problem. Can you check?

uronito commented 8 years ago

give me a minute please

uronito commented 8 years ago

Perfect, the plugin don't crash if onkyo is unplugged.

:)

gw-wiscon commented 8 years ago

Happy, that this one is solved. Will close this issue.