Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Homebridge crash if Yamaha AVR not found (EHOSTUNREACH) #9

Closed
rg2k opened this issue Jul 9, 2019 · 13 comments
Closed

Homebridge crash if Yamaha AVR not found (EHOSTUNREACH) #9

rg2k opened this issue Jul 9, 2019 · 13 comments

Comments

@rg2k
Copy link

rg2k commented Jul 9, 2019

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.

@Kienz
Copy link

Kienz commented Oct 7, 2019

Fatal TypeError: Cannot set property 'getVolume' of null
at enrichBasicStatus (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/yamaha-nodejs/simpleCommands.js:354:27)
at /usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/yamaha-nodejs/simpleCommands.js:345:16
at tryCatcher (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/util.js:16:23)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:547:31)
at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._settlePromise0 (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:649:10)
at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:729:18)
at Promise._fulfill (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:489:14)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:559:17)
at Promise._settlePromise (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:604:18)
at Promise._fulfillPromises (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:704:14)
at Promise._settlePromises (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:730:18)
at Promise._fulfill (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:673:18)
at Promise._resolveCallback (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:466:57)
at Promise._settlePromiseFromHandler (/usr/local/lib/node_modules/homebridge-yamaha-avr/node_modules/bluebird/js/release/promise.js:559:17)

@Kienz
Copy link

Kienz commented Jan 10, 2020

Any news?

@ACDR
Copy link
Owner

ACDR commented Jan 11, 2020

Any news?

Looking into this now

@ACDR ACDR closed this as completed in cebaa4d Jan 11, 2020
ACDR added a commit that referenced this issue Jan 11, 2020
…econnect if connection reestablished

Fixes #9
Implement renamed inputs support as per #14

Co-Authored-By: imerin <[email protected]>
@ACDR ACDR mentioned this issue Jan 11, 2020
@Kienz
Copy link

Kienz commented Jan 11, 2020

Now I have all inputs that are available - before the update 1.0.1 I only have the defined inputs show below.

    "inputs": [{
        "id": "HDMI3",
        "name": "Apple TV"
      }, {
        "id": "AUDIO2",
        "name": "Sonos"
      }, {
        "id": "HDMI2",
        "name": "Sky"
      }, {
        "id": "HDMI1",
        "name": "Playstation"
      }, {
        "id": "Bluetooth",
        "name": "Bluetooth"
      }, {
        "id": "NET RADIO",
        "name": "Internet-Radio"
      }]

@Kienz
Copy link

Kienz commented Jan 11, 2020

Still crashing if receiver is complete powered off.

 Error: connect EHOSTUNREACH 192.168.1.18:80                                                                                                                                                                                                                
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)                                                                                                                                                                                          
  cause:                                                                                                                                                                                                                                                     
   { Error: connect EHOSTUNREACH 192.168.1.18:80                                                                                                                                                                                                             
       at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)                                                                                                                                                                                       
     errno: 'EHOSTUNREACH',                                                                                                                                                                                                                                  
     code: 'EHOSTUNREACH',                                                                                                                                                                                                                                   
     syscall: 'connect',                                                                                                                                                                                                                                     
     address: 'x.x.x.x',                                                                                                                                                                                                                                
     port: 80 },                                                                                                                                                                                                                                             
  isOperational: true,                                                                                                                                                                                                                                       
  errno: 'EHOSTUNREACH',                                                                                                                                                                                                                                     
  code: 'EHOSTUNREACH',                                                                                                                                                                                                                                      
  syscall: 'connect',                                                                                                                                                                                                                                        
  address: 'x.x.x.x',                                                                                                                                                                                                                                   
  port: 80 }             

@ACDR
Copy link
Owner

ACDR commented Jan 11, 2020

Still crashing if receiver is complete powered off.

Just throwing the error or crashing homebridge completely?

@ACDR ACDR reopened this Jan 11, 2020
@Kienz
Copy link

Kienz commented Jan 11, 2020

It crashes Homebridge completely.

@ACDR
Copy link
Owner

ACDR commented Jan 12, 2020

It crashes Homebridge completely.

If you could try again with 1.0.3 and let me know if you have any luck that would be much appreciated. May have just been pulling an older version of yamaha-nodejs.

In my own testing it logs out the EHOSTUNREACH error if the receiver connection is lost but doesn't crash Homebridge completely.

@rg2k
Copy link
Author

rg2k commented Jan 12, 2020

It crashes Homebridge completely.

If you could try again with 1.0.3 and let me know if you have any luck that would be much appreciated. May have just been pulling an older version of yamaha-nodejs.

In my own testing it logs out the EHOSTUNREACH error if the receiver connection is lost but doesn't crash Homebridge completely.

I did a quick test with an incorrect IP and it no longer crashes on HomeBridge startup. It does, however, log out the error every 3 seconds - but that is much better than a crash :-)

@Kienz
Copy link

Kienz commented Jan 12, 2020

I got every 3 seconds the error message but Homebridge did not crash. After power on the outlet (yamaha avr is still powered off), I got the following error and Homebridge crashes completly.

[1/12/2020, 6:18:46 PM] [Yamaha AVR] Failed to get available inputs from Yamaha AVR. Please verify the AVR is connected and accessible at 19
2.168.1.18                                                                                                                                  
Fatal Error: connect EHOSTUNREACH 192.168.1.18:80                                                                                           
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1097:14)   

@Kienz
Copy link

Kienz commented Jan 12, 2020

And If the Yamaha AVR is not powered on (outlet is powered on) the Yamaha AVR accessory is missing after Homebridge reboot. It appears only If the Yamaha AVR is powered on after reboot.

@recom273
Copy link

OperationalError: connect ETIMEDOUT 192.168.68.105:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
{
cause: Error: connect ETIMEDOUT 192.168.68.105:80
at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1141:16)
{
errno: 'ETIMEDOUT',
code: 'ETIMEDOUT',
syscall: 'connect',
address: '192.168.68.105',
port: 80
},

Yeah, same issues with me - it doesn't seem to crash Homebridge but it does seem to be causing 'not responding' - if I remove the plugin, everything is fine.

Config

{
"platform": "yamaha-avr",
"name": "Yamaha RX-V581",
"ip": "192.168.68.105",
"inputs": [
{
"id": "AUDIO1",
"name": "Samsung TV"
},
{
"id": "AV4",
"name": "Volumio"
},
{
"id": "HDMI1",
"name": "BD Player"
},
{
"id": "HDMI2",
"name": "Yamaha AVR"
}
]
},

@ACDR
Copy link
Owner

ACDR commented Oct 7, 2020

This has been fixed in the beta release:
https://github.com/ACDR/homebridge-yamaha-avr/releases/tag/v2.0.0-beta.1

npm install -g homebridge-yamaha-avr@beta

@ACDR ACDR added the beta Enhancement/fix available in beta release label Oct 7, 2020
@ACDR ACDR closed this as completed Oct 13, 2020
@ACDR ACDR removed the beta Enhancement/fix available in beta release label Oct 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants