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

TV does not respond sometimes #65

Closed
jeatrexs opened this issue Feb 7, 2021 · 20 comments
Closed

TV does not respond sometimes #65

jeatrexs opened this issue Feb 7, 2021 · 20 comments
Assignees
Labels
bug Something isn't working

Comments

@jeatrexs
Copy link

jeatrexs commented Feb 7, 2021

It happens sporadically that the TV does not respond when I either ask Siri to turn on / off the TV, or when my iPhone wants to turn on the TV via scheduled shortcut automation in the morning.

It also happened that I was sitting on the sofa and wanted to start the TV via iPhone Home app, even then it did not work sometimes. Or i wanted to turn it off and it just did not respond. Ironically i was able to change the volume, but not to turn it off...

I think my TV is configured correctly, because usually everything works. Is it possible that the TV disconnects from the Wi-Fi in standby mode, or there are even WiFi connection drops while the TV is running?

The last entry in the Homebridge log I could find about this is the following (if it happens the next time i will try to find anything immediately and let you know):

[7.2.2021, 01:12:05] [PanasonicVieraTV] (setPowerStatus)/-> into STANDBY - unable to power cycle TV - probably unpowered

Has anyone had this or similar problem before as well? Or could it be a misconfiguration on my part, or maybe a bug?

I am using a Panasonic TX-65HXN978.

Thanks in advance.

@AntonioMeireles
Copy link
Owner

hi @jeatrexs,

thanks for reporting!

i would need way more detailed data about your exact setup to give you a more precise answer. At sight, it just seems that your wifi infrastructure is running with aggressive power saving modes which is messing with your HomeKit setup. Could you try to disable all energy saving features from your wifi and see if issue persists ?

Thanks in advance!

@AntonioMeireles AntonioMeireles self-assigned this Feb 8, 2021
@AntonioMeireles AntonioMeireles added the question Further information is requested label Feb 8, 2021
@AntonioMeireles
Copy link
Owner

@jeatrexs

still having issues ?

@jeatrexs
Copy link
Author

jeatrexs commented Feb 10, 2021

Hi @AntonioMeireles

sorry for the late response.
I could not find any option in my WiFi Router settings.. But i don't think that the problem is caused by any energy saving features. If we find any hints, that it must be problem of my network, I would contact the support of my Fritzbox.
The problem appeared again this morning, and i got this huge errormessage in the homebridge log:

[10.2.2021, 06:45:03] [PanasonicVieraTV] (setPowerStatus)/-> ON  - unable to power cycle TV - probably unpowered
[10.2.2021, 06:45:05] [PanasonicVieraTV] setInput 0 Error: Request failed with status code 500
    at createError (/usr/lib/node_modules/homebridge-vieramatic/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/usr/lib/node_modules/homebridge-vieramatic/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/usr/lib/node_modules/homebridge-vieramatic/node_modules/axios/lib/adapters/http.js:260:11)
    at IncomingMessage.emit (events.js:327:22)
    at endReadableNT (internal/streams/readable.js:1327:12)
    at processTicksAndRejections (internal/process/task_queues.js:80:21) {
  config: {
    url: 'http://192.168.178.45:55000/nrc/control_0',
    method: 'post',
    data: '<?xml version="1.0" encoding="utf-8"?>  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> <u:X_EncryptedCommand xmlns:u="urn:panasonic-com:service:p00NetworkControl:1"> <X_ApplicationId>ASA6ebgn646QXQ==</X_ApplicationId> <X_EncInfo>wXe1WAva7tfIH+1xpDAqc669EgZnTtHhUGOFUFipUGIBJ+Rh+SJTIGqHu3lBv0GF3JEneZhMmGIxdsruVguEWmOUpIFQ/ht958hYFcNtkQO1O7ChxMh6jc8bDwmyzdio3xALzj1I3zpUEQYnVQBA53buL5I0/Ei89zpRgIPDbiaZup+RjjzypU6xwoSiuyrocsW0aQa5mpE6Ul2YHdbXyafZEV5RpNFhxg3zRYrShgPcn7RNhEDCVBQiBIfT3xl7szofmV9LbKbY7p1oakc2yM6gckFfpNQodD7qIP+Pr7HwjdV2vVYPXQohMTrVTvaTAzOtYpAPYJBWc3bfyY510IZWctBpc3hCR/i0Hx3eW787rwtZDRf6FzcQEdmsZNYb</X_EncInfo> </u:X_EncryptedCommand> </s:Body> </s:Envelope>',
    headers: {
      Accept: 'text/xml',
      'Content-Type': 'text/xml; charset="utf-8"',
      'Cache-Control': 'no-cache',
      Host: '192.168.178.45:55000',
      Pragma: 'no-cache',
      SOAPACTION: '"urn:panasonic-com:service:p00NetworkControl:1#X_EncryptedCommand"',
      'User-Agent': 'axios/0.21.1',
      'Content-Length': 760
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 3500,
    adapter: [Function: httpAdapter],
    responseType: 'text',
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus]
  },
  request: <ref *1> ClientRequest {
    _events: [Object: null prototype] {
      socket: [Function (anonymous)],
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      timeout: [Function (anonymous)],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: true,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: null,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    socket: Socket {
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: null,
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: null,
      _server: null,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(async_id_symbol)]: 6356285,
      [Symbol(kHandle)]: [TCP],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(RequestTimeout)]: undefined
    },
    _header: 'POST /nrc/control_0 HTTP/1.1\r\n' +
      'Accept: text/xml\r\n' +
      'Content-Type: text/xml; charset="utf-8"\r\n' +
      'Cache-Control: no-cache\r\n' +
      'Host: 192.168.178.45:55000\r\n' +
      'Pragma: no-cache\r\n' +
      'SOAPACTION: "urn:panasonic-com:service:p00NetworkControl:1#X_EncryptedCommand"\r\n' +
      'User-Agent: axios/0.21.1\r\n' +
      'Content-Length: 760\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: noopPendingOutput],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 80,
      protocol: 'http:',
      options: [Object],
      requests: {},
      sockets: [Object],
      freeSockets: {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'fifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'POST',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/nrc/control_0',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      socket: [Socket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      headers: [Object],
      rawHeaders: [Array],
      trailers: {},
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 500,
      statusMessage: 'Internal Server Error',
      client: [Socket],
      _consuming: true,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'http://192.168.178.45:55000/nrc/control_0',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(RequestTimeout)]: undefined
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: '192.168.178.45',
    protocol: 'http:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 760,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'http://192.168.178.45:55000/nrc/control_0',
      _timeout: Timeout {
        _idleTimeout: -1,
        _idlePrev: null,
        _idleNext: null,
        _idleStart: 204323800,
        _onTimeout: null,
        _timerArgs: undefined,
        _repeat: null,
        _destroyed: true,
        [Symbol(refed)]: true,
        [Symbol(kHasPrimitive)]: false,
        [Symbol(asyncId)]: 6356291,
        [Symbol(triggerId)]: 6356287
      },
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'content-type': [Array],
      'cache-control': [Array],
      host: [Array],
      pragma: [Array],
      soapaction: [Array],
      'user-agent': [Array],
      'content-length': [Array]
    }
  },
  response: {
    status: 500,
    statusText: 'Internal Server Error',
    headers: {
      'content-length': '488',
      'content-type': 'text/xml; charset="utf-8"',
      ext: '',
      server: 'Panasonic-VIErA/1, UPnP/1.0, Panasonic MIL DLNA SERVER',
      connection: 'close'
    },
    config: {
      url: 'http://192.168.178.45:55000/nrc/control_0',
      method: 'post',
      data: '<?xml version="1.0" encoding="utf-8"?>  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> <u:X_EncryptedCommand xmlns:u="urn:panasonic-com:service:p00NetworkControl:1"> <X_ApplicationId>ASA6ebgn646QXQ==</X_ApplicationId> <X_EncInfo>wXe1WAva7tfIH+1xpDAqc669EgZnTtHhUGOFUFipUGIBJ+Rh+SJTIGqHu3lBv0GF3JEneZhMmGIxdsruVguEWmOUpIFQ/ht958hYFcNtkQO1O7ChxMh6jc8bDwmyzdio3xALzj1I3zpUEQYnVQBA53buL5I0/Ei89zpRgIPDbiaZup+RjjzypU6xwoSiuyrocsW0aQa5mpE6Ul2YHdbXyafZEV5RpNFhxg3zRYrShgPcn7RNhEDCVBQiBIfT3xl7szofmV9LbKbY7p1oakc2yM6gckFfpNQodD7qIP+Pr7HwjdV2vVYPXQohMTrVTvaTAzOtYpAPYJBWc3bfyY510IZWctBpc3hCR/i0Hx3eW787rwtZDRf6FzcQEdmsZNYb</X_EncInfo> </u:X_EncryptedCommand> </s:Body> </s:Envelope>',
      headers: [Object],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 3500,
      adapter: [Function: httpAdapter],
      responseType: 'text',
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      validateStatus: [Function: validateStatus]
    },
    request: <ref *1> ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      socket: [Socket],
      _header: 'POST /nrc/control_0 HTTP/1.1\r\n' +
        'Accept: text/xml\r\n' +
        'Content-Type: text/xml; charset="utf-8"\r\n' +
        'Cache-Control: no-cache\r\n' +
        'Host: 192.168.178.45:55000\r\n' +
        'Pragma: no-cache\r\n' +
        'SOAPACTION: "urn:panasonic-com:service:p00NetworkControl:1#X_EncryptedCommand"\r\n' +
        'User-Agent: axios/0.21.1\r\n' +
        'Content-Length: 760\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/nrc/control_0',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: '192.168.178.45',
      protocol: 'http:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    data: '<?xml version="1.0" encoding="utf-8"?>\n' +
      '<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">\n' +
      ' <s:Body>\n' +
      '  <s:Fault>\n' +
      '   <faultcode>s:Client</faultcode>\n' +
      '   <faultstring>UPnPError</faultstring>\n' +
      '   <detail>\n' +
      '    <UPnPError xmlns="urn:schemas-upnp-org:control-1-0">\n' +
      '     <errorCode>612</errorCode>\n' +
      '     <errorDescription>No such session</errorDescription>\n' +
      '    </UPnPError>\n' +
      '   </detail>\n' +
      '  </s:Fault>\n' +
      ' </s:Body>\n' +
      '</s:Envelope>\n'
  },
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
[10.2.2021, 06:45:05] [PanasonicVieraTV] (setPowerStatus)/-> ON  - unable to power cycle TV - probably unpowered
[10.2.2021, 06:45:07] [PanasonicVieraTV] (setVolume)/(30) unable to set volume on TV...

Any ideas?

Thanks!

@AntonioMeireles
Copy link
Owner

AntonioMeireles commented Feb 10, 2021

@jeatrexs

well, this is getting interesting. could you just turn physically OFF the TV (from power), wait a bit, turn it ON and see if the issue persists ?

also, could you paste the full TV config (in homebridge's config.json) and the contents of accessories/vieramatic.json (in the folder where config.json sits)

On your TV in Menu -> Network -> TV Remote App Settings all the following settings are turned ON, right ?

  • TV Remote
  • Powered On by Apps
  • Networked Standby

thanks again for your patience.

@AntonioMeireles AntonioMeireles added bug Something isn't working and removed question Further information is requested labels Feb 10, 2021
@AntonioMeireles
Copy link
Owner

OK. on a deeper look i may had found the root cause...

<errorDescription>No such session</errorDescription>

do you happen to have any sort of automation that may induce the number of commands sent to homebridge to the TV be rather large ?

it seems that you may be hitting some sort of upper bound ... [mess will be to find the real value to get around it ... if this is indeed the issue]

@jeatrexs
Copy link
Author

jeatrexs commented Feb 10, 2021

The only automation I have is the one on my iPhone in the Shortcut-App which is triggered on weekdays every morning at 6.45 am.

This automation does the following:

  • turns some lights on
  • starts the TV (via homekit -> homebridge with this plugin)
  • waits 2 seconds
  • changes the volume to 35% (via homekit -> homebridge with this plugin)

Thats it...
The strange thing is, that this automation used to work for several weeks. Since i opened this thread the automation does everything, but the TV seems not to follow the instructions.

You still want me to un/replug my TV and post my configs?

AntonioMeireles added a commit that referenced this issue Feb 11, 2021
- tentative fix for #65

Signed-off-by: António Meireles <[email protected]>
@AntonioMeireles
Copy link
Owner

@jeatrexs

Just post your configs for now, together with the data about your environment - arch, node and homebridge versions.

Meanwhile i've just pushed a beta version with a tentative fix which may or not be what we want ...
please install [email protected] (npm i [email protected]), restart homebridge and report back. things to check are...

  • there are no additional side effects/regressions
  • issue stops happening

thanks for your patience

@jeatrexs
Copy link
Author

Sure. By the way: This morning my automation worked and the TV responded and got turned on, without changing anything (so i did not find anything suspicious in my homebridge logs from this morning)...

I could install the beta package, but i won't find the time to do this today, so let's wait and see if the problem persists tomorrow.
Many thanks for your effort (for now).

Should i install it anyway tomorrow if the problem won't persist tomorrow?

Nevertheless here the information you requested:

Environment:
Device: Raspberry Pi 3a+
OS: Latest Raspberry Pi OS - Version 10 (buster)
Homebridge Version: v1.1.7
Node.js Version: v14.15.4
npm Verson: v6.14.11

Here's the TV-part of my homebridge's config.json:

{
	"tvs": [
		{
			"friendlyName": "Fernseher",
			"ipAddress": "192.168.178.45",
			"encKey": "zbu9ktGhYfc3Kz4p0QmmlQ==",
			"appId": "ASA6ebgn646QXQ==",
			"hdmiInputs": [
				{
					"id": "3",
					"name": "FireTV"
				}
			],
			"customVolumeSlider": true
		}
	],
	"platform": "PanasonicVieraTV"
},

And here's the content of the vieramatic.json:

{
   "4D454930-0200-1000-8001-B46C4743042F":{
      "data":{
         "inputs":{
            "hdmi":[
               {
                  "id":"3",
                  "name":"FireTV",
                  "hidden":0
               }
            ],
            "applications":{
               "0":{
                  "name":"Apps Market",
                  "id":"0387878700000102",
                  "hidden":1
               },
               "1":{
                  "name":"Netflix",
                  "id":"0010000200000001",
                  "hidden":1
               },
               "2":{
                  "name":"YouTube",
                  "id":"0070000200200001",
                  "hidden":0
               },
               "3":{
                  "name":"Cinema",
                  "id":"0020002400180001",
                  "hidden":1
               },
               "4":{
                  "name":"ARD Mediathek",
                  "id":"0076010807000001",
                  "hidden":1
               },
               "5":{
                  "name":"ZDFmediathek",
                  "id":"0076011807000001",
                  "hidden":1
               },
               "6":{
                  "name":"Browser",
                  "id":"0077777700200002",
                  "hidden":1
               },
               "7":{
                  "name":"Amazon Prime Video",
                  "id":"0010000100200001",
                  "hidden":1
               },
               "8":{
                  "name":"HD+",
                  "id":"0020011600000001",
                  "hidden":1
               },
               "9":{
                  "name":"Zattoo TV Streaming",
                  "id":"0020014500000001",
                  "hidden":1
               },
               "10":{
                  "name":"DAZN",
                  "id":"0020010800000001",
                  "hidden":1
               },
               "11":{
                  "name":"Joyn | deine Streaming App",
                  "id":"0020003F00000001",
                  "hidden":1
               },
               "12":{
                  "name":"ProSieben",
                  "id":"0020013500000001",
                  "hidden":1
               },
               "13":{
                  "name":"XUMO: FREE MOVIES&amp;TV",
                  "id":"0310006000000002",
                  "hidden":1
               },
               "14":{
                  "name":"SAT.1",
                  "id":"0020013600000001",
                  "hidden":1
               },
               "15":{
                  "name":"Digital Concert Hall",
                  "id":"0076002307170001",
                  "hidden":1
               },
               "16":{
                  "name":"TuneIn",
                  "id":"0010001800000001",
                  "hidden":1
               },
               "17":{
                  "name":"ARTE",
                  "id":"0020000600000001",
                  "hidden":1
               },
               "18":{
                  "name":"Plex",
                  "id":"0076010507000001",
                  "hidden":1
               },
               "19":{
                  "name":"CHILI",
                  "id":"0020004700000002",
                  "hidden":1
               },
               "20":{
                  "name":"Netzkino",
                  "id":"0076011607000001",
                  "hidden":1
               },
               "21":{
                  "name":"Meteonews TV",
                  "id":"0020007100000001",
                  "hidden":1
               },
               "22":{
                  "name":"Audio Link",
                  "id":"0387878700000141",
                  "hidden":1
               },
               "23":{
                  "name":"VIERA Link",
                  "id":"0387878700000016",
                  "hidden":1
               },
               "24":{
                  "name":"TV Guide",
                  "id":"0387878700000003",
                  "hidden":1
               },
               "25":{
                  "name":"TV-Aufnahmen",
                  "id":"0387878700000013",
                  "hidden":1
               },
               "26":{
                  "name":"Multi Window",
                  "id":"0387878700000050",
                  "hidden":1
               },
               "27":{
                  "name":"Smart Speaker Settings",
                  "id":"0387878700000146",
                  "hidden":1
               },
               "28":{
                  "name":"Kalender",
                  "id":"0387878700150020",
                  "hidden":1
               },
               "29":{
                  "name":"Mitteilungszentrale",
                  "id":"0387878700000140",
                  "hidden":1
               },
               "30":{
                  "name":"List Application",
                  "id":"0387878700000153",
                  "hidden":1
               }
            },
            "TUNER":{
               "hidden":0
            }
         },
         "ipAddress":"192.168.178.45",
         "specs":{
            "friendlyName":"Fernseher",
            "manufacturer":"Panasonic",
            "modelName":"Panasonic VIErA",
            "modelNumber":"TX-65HX940WA",
            "requiresEncryption":true,
            "serialNumber":"4D454930-0200-1000-8001-B46C4743042F"
         }
      }
   }
}

@AntonioMeireles
Copy link
Owner

@jeatrexs

if i'm seeing things right your issue will only come back after a somewhat long while. tentative fix would/should make it go away. so, ideally it would be great to install beta as soon as possible on your side as if the issue does not ever come back then i fixed it otherwise there's something else going on. [and i need to know about eventual fix side effects :-) ]

thanks again for your patience!

have a great weekend too! [hopefully with better weather than here]

@jeatrexs
Copy link
Author

jeatrexs commented Feb 11, 2021

Hi @AntonioMeireles,

i found some time to install your beta package.

After installing it via Homebridge Terminal it displayed the following output. There appeared some warnings, is this okay?

grafik

I restarted the Homebridge as usual after updating homebridge configuration, everything seems to be running - no errors or warnings in homebridge output after the restart.
It's my first time installing a beta package of a homebridge plugin, so another question:

The Homebridge Plugin page keeps showing me the old (latest release) version of this plugin, this could be normal since i updated the package not via Homebridge store, just want to make sure, I did everything right?

grafik

Thanks again for the help!

Let's see how it will work the next days / week. I will report any further issues or abnormalities here, as soon i will find them ;)

@AntonioMeireles
Copy link
Owner

@jeatrexs

[sorry lag] i'm not sure about your exact homebridge setup but probably what you want in your specific case to install beta is npm i [email protected] -g, note the -g [you may also need sudo prepended if plain npm i [email protected] gives you permission errors] and then restart homebridge after. [that should give you no errors] and Homebridge UI should give you then the updated version.

All the best,

António

@jeatrexs
Copy link
Author

Hi @AntonioMeireles,

thanks for your respond. I did not retried it with the latest command to install the beta package like you posted in your last comment. How can I be sure, that i have the beta version in my current state?

In my current installation state i just again experienced problems.

I just sat on the couch and wanted to turn on the TV via Siri. Siri told it's on now, but nothing happened. So i went to the Home App and tried it manually to turn the TV on their. Again nothing happened. The On-button in the Home-App of the TV changed like the TV got turned on, so it was in 'ON'-state, some seconds later it changed to off state automatically. I tried it many times. The TV seems not to be responsive again now.

Here the messages i got in the homebridge log when this happened:

grafik

Should i first try to install your beta package again with
sudo npm i [email protected] -g
or should i already be using the beta since i updated it yesterday with
npm i [email protected]

Thanks for your further instructions.

@AntonioMeireles
Copy link
Owner

AntonioMeireles commented Feb 12, 2021 via email

@jeatrexs
Copy link
Author

thanks. Installed it that way now, and now homebridge is showing me the installed beta version.
Will wait to see if the problems persist. I will report any issues.

@jeatrexs
Copy link
Author

jeatrexs commented Feb 14, 2021

Hi again, since installing the beta package I experienced a problem again last night, when i went to bed and tried to turn off the TV in the living room via Siri. It did not work. I also tried it via Home-App which did not worked neither.

I just looked into the Homebridge log and found this:
[14.2.2021, 01:31:22] [PanasonicVieraTV] (setPowerStatus)/-> ON - unable to power cycle TV - probably unpowered

:(

@jeatrexs
Copy link
Author

Hi again, this morning the automation did not work again. This time i got this errors in homebridge log:

[15.2.2021, 06:55:07] [PanasonicVieraTV] setInput 0 Error: connect EHOSTUNREACH 192.168.178.45:55000
    at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1146:16) {
  errno: -113,
  code: 'EHOSTUNREACH',
  syscall: 'connect',
  address: '192.168.178.45',
  port: 55000,
  config: {
    url: 'http://192.168.178.45:55000/nrc/control_0',
    method: 'post',
    data: '<?xml version="1.0" encoding="utf-8"?>  <s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/" s:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <s:Body> <u:X_EncryptedCommand xmlns:u="urn:panasonic-com:service:p00NetworkControl:1"> <X_ApplicationId>ASA6ebgn646QXQ==</X_ApplicationId> <X_EncInfo>btsggHx6bhMA9GMBF1WgBtEaw4cdEiIXV3YHEYSFDJaJFW5qIFGj90zJmrwG7nHRQyrRCj1LyW+qaqeavCbJR6SMJhXP2fzyPk1h5OedILmDZ0gCLBhSuwizVaqyD9t93UPKaRKfwrHSBVUG74iUl7h8DV68cGU9kGN/8eL6X2+tX5f4xq8CucQCAA4yrDXonioL5IjVMZoq1bP93sTvToUV2AHt3gAH4FZTpCUgP6YoT5ymHxgyecq4XiFR81anaa5ll549/TXG5tdZJ07zEKBSoNe6LFe8emH6eSUzC0UYzT05P23Lnns9cylH5Azt6VmSTU7LDJTYDiiyTCI944WYeMVN5CVwL7W8ShAEYg3HEQGQUNvi8sJy9haBPnIZ</X_EncInfo> </u:X_EncryptedCommand> </s:Body> </s:Envelope>',
    headers: {
      Accept: 'text/xml',
      'Content-Type': 'text/xml; charset="utf-8"',
      'Cache-Control': 'no-cache',
      Host: '192.168.178.45:55000',
      Pragma: 'no-cache',
      SOAPACTION: '"urn:panasonic-com:service:p00NetworkControl:1#X_EncryptedCommand"',
      'User-Agent': 'axios/0.21.1',
      'Content-Length': 760
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 3500,
    adapter: [Function: httpAdapter],
    responseType: 'text',
    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: null,
      closed: false
    },
    _events: [Object: null prototype] {
      response: [Array],
      error: [Function: handleRequestError],
      timeout: [Function]
    },
    _eventsCount: 3,
    _maxListeners: undefined,
    _options: {
      maxRedirects: 21,
      maxBodyLength: 10485760,
      protocol: 'http:',
      path: '/nrc/control_0',
      method: 'POST',
      headers: [Object],
      agent: undefined,
      agents: [Object],
      auth: undefined,
      hostname: '192.168.178.45',
      port: '55000',
      nativeProtocols: [Object],
      pathname: '/nrc/control_0'
    },
    _ended: false,
    _ending: true,
    _redirectCount: 0,
    _redirects: [],
    _requestBodyLength: 760,
    _requestBodyBuffers: [ [Object] ],
    _onNativeResponse: [Function (anonymous)],
    _currentRequest: ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: true,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: null,
      _hasBody: true,
      _trailer: '',
      finished: false,
      _headerSent: true,
      socket: [Socket],
      _header: 'POST /nrc/control_0 HTTP/1.1\r\n' +
        'Accept: text/xml\r\n' +
        'Content-Type: text/xml; charset="utf-8"\r\n' +
        'Cache-Control: no-cache\r\n' +
        'Host: 192.168.178.45:55000\r\n' +
        'Pragma: no-cache\r\n' +
        'SOAPACTION: "urn:panasonic-com:service:p00NetworkControl:1#X_EncryptedCommand"\r\n' +
        'User-Agent: axios/0.21.1\r\n' +
        'Content-Length: 760\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: noopPendingOutput],
      agent: [Agent],
      socketPath: undefined,
      method: 'POST',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/nrc/control_0',
      _ended: false,
      res: null,
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: '192.168.178.45',
      protocol: 'http:',
      _redirectable: [Circular *1],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    _currentUrl: 'http://192.168.178.45:55000/nrc/control_0',
    _timeout: Timeout {
      _idleTimeout: -1,
      _idlePrev: null,
      _idleNext: null,
      _idleStart: 24842216,
      _onTimeout: null,
      _timerArgs: undefined,
      _repeat: null,
      _destroyed: true,
      [Symbol(refed)]: true,
      [Symbol(kHasPrimitive)]: false,
      [Symbol(asyncId)]: 754056,
      [Symbol(triggerId)]: 754052
    },
    [Symbol(kCapture)]: false
  },
  response: undefined,
  isAxiosError: true,
  toJSON: [Function: toJSON]
}

[15.2.2021, 06:55:10] [PanasonicVieraTV] (setPowerStatus)/-> ON  - unable to power cycle TV - probably unpowered
[15.2.2021, 06:55:13] [PanasonicVieraTV] (setVolume)/(30) unable to set volume on TV...
[15.2.2021, 06:56:07] [PanasonicVieraTV] (getVolume) unable to get volume from TV...
[15.2.2021, 06:56:34] [PanasonicVieraTV] (getVolume) unable to get volume from TV...
[15.2.2021, 06:56:37] [PanasonicVieraTV] (getVolume) unable to get volume from TV...
[15.2.2021, 06:56:43] [PanasonicVieraTV] (setPowerStatus)/-> ON  - unable to power cycle TV - probably unpowered
[15.2.2021, 06:56:50] [PanasonicVieraTV] (getVolume) unable to get volume from TV...
[15.2.2021, 06:56:53] [PanasonicVieraTV] (getVolume) unable to get volume from TV...
[15.2.2021, 06:56:59] [PanasonicVieraTV] (setPowerStatus)/-> ON  - unable to power cycle TV - probably unpowered

AntonioMeireles added a commit that referenced this issue Feb 15, 2021
Signed-off-by: António Meireles <[email protected]>
AntonioMeireles added a commit that referenced this issue Feb 15, 2021
@AntonioMeireles
Copy link
Owner

AntonioMeireles commented Feb 15, 2021

ok. we're actually making (some) progress: connect EHOSTUNREACH 192.168.178.45:55000 from the your stack trace means that somehow TV got unreachable. So, it seems that there's some network issue going on.

OTOH you previously shown a trace where the TV was actually replying / alive / reachable but doing it in an unexpected way, so we may have more than a single issue here (as the later is a priori in my realm to fix, but the first (the EHOSTUNREACH) is a strictly local issue in your side. )

please install [email protected] [sudo npm i [email protected] -g ] (just went live), restart hb, and post any additional stack traces you may get. as i'll keep digging in my side.

thanks again for your patience

@jeatrexs
Copy link
Author

I see. I will contemplate to open a support ticket for my WiFi Router to ask for any possibilities that could cause this problem.

I just updated the plugin via homebridge to 2.0.23 as you recommended.
After restarting homebridge i got this warning message in homebridge log:

[16.2.2021, 08:00:03] [PanasonicVieraTV] WARNING: unable to fetch specs from TV at '192.168.178.45'. Using the previously cached ones: 

{
  friendlyName: 'Fernseher',
  manufacturer: 'Panasonic',
  modelName: 'Panasonic VIErA',
  modelNumber: 'TX-65HX940WA',
  requiresEncryption: true,
  serialNumber: '4D454930-0200-1000-8001-B46C4743042F'
}

Is this a problem?

Apart from that I will report any further occuring issues and problems.

Thank you so much for your efforts!

@AntonioMeireles
Copy link
Owner

@jeatrexs

this is just weird (or so simple that i'm missing it).

can you please mail me (address is in git commit logs) so that we establish a process to properly debug / track / fix this with less latency ?

Thanks!

AntonioMeireles added a commit that referenced this issue Feb 20, 2021
this is a pre Requirement of the #67 (and #65 actually) ultimate fix

Signed-off-by: António Meireles <[email protected]>
@jeatrexs
Copy link
Author

jeatrexs commented Mar 4, 2021

During the course of issue #67 there appeared similar problems to this one. Many new patches and minor version of the plugin were released which probably fixed this issues.
Running this plugin now in version 3.1.0 and everything works fine.

Thanks for the great support @AntonioMeireles !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants