dvcrn / homebridge-netcast-tv

Homebridge plugin for interacting with LG Netcast-based TVs (2012, 2013)
3 stars 0 forks source link

Trying to close the TV when it is already closed crashes homebridge #1

Open el opened 3 years ago

el commented 3 years ago

Describe The Bug: If you use Siri or a scene to close TV when it is already closed, homebridge crashes with the following error:

To Reproduce:

Expected behavior:

Logs:

FetchError: request to http://192.168.31.224:8080/roap/api/auth failed, reason: connect EHOSTUNREACH 192.168.31.224:8080
    at ClientRequest.<anonymous> (/usr/lib/node_modules/homebridge-netcast-tv/node_modules/node-fetch/lib/index.js:1461:11)
    at ClientRequest.emit (events.js:315:20)
    at Socket.socketErrorListener (_http_client.js:469:9)
    at Socket.emit (events.js:315:20)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  type: 'system',
  errno: 'EHOSTUNREACH',
  code: 'EHOSTUNREACH'
}

Plugin Config:


        {
            "devices": [
                {
                    "name": "LG TV",
                    "host": "192.168.31.224",
                    "mac": "xxx",
                    "accessToken": "xxx",
                    "keyInputDelay": 600,
                    "offPauseDuration": 600000,
                    "channels": [
                        {
                            "name": "Apple TV",
                            "type": "external",
                            "channel": {
                                "inputSourceType": "6",
                                "inputSourceIdx": "6"
                            }
                        }
                    ]
                }
            ],
            "platform": "netcasttv"
        }

Environment:

dvcrn commented 3 years ago

Thanks for reporting, looks like an uncaught error

esolm commented 1 year ago

Hey David! Thanks a lot for developing this code! It is very useful. However I still have the same problem from years ago. Could you be so kind of resolving this issue?

Thanks!

image
dvcrn commented 1 year ago

Hi, I don't have a netcast tv anymore so I'm reliant on other people to work on this

The error from your screenshot looks different to the error from this report. Yours is a timeout, while the one from OP is EHOSTUNREACH