seydx / homebridge-bravia-tvos

Homebridge plugin for Sony Bravia Android TVs
MIT License
347 stars 32 forks source link

EHOSTDOWN Error #143

Closed QandnotU closed 3 years ago

QandnotU commented 3 years ago

When my older KDL TV is off, I'm getting the following. Any help would be greatly appreciated.

[6/13/2021, 8:58:31 AM] [BraviaTVOS] Error: connect EHOSTDOWN 192.168.7.167:80 - Local (192.168.7.32:53544)
    at internalConnect (net.js:920:16)
    at defaultTriggerAsyncIdScope (internal/async_hooks.js:313:12)
    at net.js:1008:9
    at processTicksAndRejections (internal/process/task_queues.js:79:11) {
  errno: -64,
  code: 'EHOSTDOWN',
  syscall: 'connect',
  address: '192.168.7.167',
  port: 80,
  config: {
    url: 'http://192.168.7.167:80/sony/avContent',
    method: 'post',
    data: '{"id":3,"method":"getPlayingContentInfo","version":"1.0","params":[]}',
    headers: {
      Accept: 'application/json, text/plain, */*',
      'Content-Type': 'text/xml; charset=UTF-8',
      SOAPACTION: '"urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"',
      'X-Auth-PSK': '7787',
      'User-Agent': 'axios/0.21.1',
      'Content-Length': 69
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus]
  },
  request: <ref *1> Writable {
    _writableState: WritableState {
      objectMode: false,
      highWaterMark: 16384,
      finalCalled: false,
      needDrain: false,
      ending: false,
      ended: false,
      finished: false,
      destroyed: false,
      decodeStrings: true,
      defaultEncoding: 'utf8',
      length: 0,
      writing: false,
      corked: 0,
      sync: true,
      bufferProcessing: false,
      onwrite: [Function: bound onwrite],
      writecb: null,
      writelen: 0,
      afterWriteTickInfo: null,
      buffered: [],
      bufferedIndex: 0,
      allBuffers: true,
      allNoop: true,
      pendingcb: 0,
      prefinished: false,
      errorEmitted: false,
      emitClose: true,
      autoDestroy: true,
      errored: false,
      closed: false
    },
    _events: [Object: null prototype] {
      response: [Function: handleResponse],
      error: [Function: handleRequestError]
    },
    _eventsCount: 2,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'http:',
      path: '/sony/avContent',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: '192.168.7.167',
      port: '80',
      nativeProtocols: [Object],
      pathname: '/sony/avContent'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 69,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [Array],
      outputSize: 350,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      socket: [Socket],
      _header: 'POST /sony/avContent HTTP/1.1\r\n' +
        'Accept: application/json, text/plain, */*\r\n' +
        'Content-Type: text/xml; charset=UTF-8\r\n' +
        'SOAPACTION: "urn:schemas-sony-com:service:IRCC:1#X_SendIRCC"\r\n' +
        'X-Auth-PSK: 7787\r\n' +
        'User-Agent: axios/0.21.1\r\n' +
        'Content-Length: 69\r\n' +
        'Host: 192.168.7.167\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/sony/avContent',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    _currentUrl: 'http://192.168.7.167:80/sony/avContent',
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}

Config

{
                    "name": "Master TV",
                    "ip": "192.168.7.167",
                    "port": 80,
                    "timeout": 5,
                    "psk": "7787",
                    "manufacturer": "Sony",
                    "model": "KDL48W600B",
                    "wol": true,
                    "inputs": [
                        "extInput:hdmi"
                    ]
                }
QandnotU commented 3 years ago

Solved the problem, I went out and bought a HomeKit compatible Sony TV.