AntonioMeireles / homebridge-vieramatic

Homebridge plugin for Panasonic™ Viera™ TVs (includes support for 2018 and later models)
Apache License 2.0
43 stars 9 forks source link

Homebridge crashes - "Accessories must be created with a valid UUID" #90

Open bsoener opened 2 years ago

bsoener commented 2 years ago

I have a problem this plugin. My homebridge crashes unfortunately. Anyone have an idea what this can be?

[17/01/2022, 15:47:49] [PanasonicVieraTV] Unable to fetch specs from TV at '192.168.178.115'.
[17/01/2022, 15:47:49] [PanasonicVieraTV] Using the previously cached ones:

 {"friendlyName":"Viera ","manufacturer":"Panasonic","modelName":"Panasonic VIErA","modelNumber":"WT60","requiresEncryption":false,"serialNumber":"4D454930-0200-1000-8001-20C6EBC536E5"}
[17/01/2022, 15:47:52] AssertionError [ERR_ASSERTION]: Accessories must be created with a valid UUID.
    at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:418:11)
    at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:70:9)
    at Ae.<anonymous> (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:131:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Ae.discoverDevices (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:67:23)
    at HomebridgeAPI.<anonymous> (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:39:7)
[17/01/2022, 15:47:52] Got SIGTERM, shutting down Homebridge...
 {
            "tvs": [
                {
                    "friendlyName": "Viera ",
                    "ipAddress": "192.168.178.115",
                    "mac": "xx:xx:xx:xx:xx:xx",
                    "hdmiInputs": [
                        {
                            "id": "1",
                            "name": "Denon"
                        },
                        {
                            "id": "2",
                            "name": "PS5"
                        }
                    ],
                    "disabledAppSupport": false,
                    "customVolumeSlider": true
                }
            ],
            "platform": "PanasonicVieraTV"
        },
AntonioMeireles commented 2 years ago

Hi,

thanks for reporting ...

need way more data ... a) exact plugin version, node version/arch, homebridge version ...

also, please add the output of curl -Lsk http://192.168.178.115:55000/nrc/ddd.xml.

Your TV is a bit on the older side... were working with previous versions of the plugin (if so, until which one ?) or are you trying the plugin for the first time ?

Thanks in advance!

António

AntonioMeireles commented 2 years ago

FWIW, this error is way, way weird...

it's complaining that your TVs S/N which we (the plugin) reuse as an UUID for Homekit/Homebridge purposes is not valid (it is!). looking into it.

AntonioMeireles commented 2 years ago

@bsoener

can you attach here the contents of accessories/vieramatic.json on your homebridge data dir please ?

thanks in advance!

bsoener commented 2 years ago

So I installed this plugin a month ago and it worked great. Do not know what the reason can be. -Node.js version v16.13.2 -Npm version v8.1.2 -Homebridge v1.3.9

How do I open this vieramatic.json?

AntonioMeireles commented 2 years ago

vieramatic.json is relative to the dir where it is homebridge's config.json (inside accessories subdir)

bsoener commented 2 years ago

{"4D454930-0200-1000-8001-20C6EBC3C18D":{"data":{"inputs":{"applications":{"0":{"id":"0387878700000016","name":"VIERA Link"},"1":{"id":"0010000200000001","name":"Netflix"},"2":{"id":"0387878700000014","name":"Media Server"},"3":{"id":"0077777700000002","name":"Web Browser"},"4":{"id":"0387878700000009","name":"Haupt-Menü"},"5":{"id":"0387878700000003","name":"TV Guide"},"6":{"id":"0387878700000001","name":"TV"},"7":{"id":"0387878700000013","name":"TV-Aufnahmen"},"8":{"id":"0387878700000050","name":"Multi Window"},"9":{"id":"0387878700000049","name":"Spiegelung"},"10":{"id":"0070000200000001","name":"YouTube"},"11":{"id":"0020007100000001","name":"Meteonews TV"},"12":{"id":"0020003E00000001","name":"3doo Player for Panasonic Viera TV"},"13":{"id":"0020000600000001","name":"ARTE"},"14":{"id":"0020000300000001","name":"tagesschau"},"15":{"id":"0387878700000032","name":"Media Player"},"16":{"id":"0070001000000001","name":"PlayJam"}},"hdmi":[{"id":"1","name":"Denon"},{"id":"2","name":"PS5"}],"TUNER":{"hidden":0}},"ipAddress":"192.168.178.115","specs":{"friendlyName":"Viera ","manufacturer":"Panasonic","modelName":"Panasonic VIErA","modelNumber":"WT60","requiresEncryption":false,"serialNumber":"4D454930-0200-1000-8001-20C6EBC3C18D"}}}}

AntonioMeireles commented 2 years ago

@bsoener

can you please give a try to homebridge-vieramatic@4.0.9 ? does it change anything ?

thanks in advance!

bsoener commented 2 years ago
[17/01/2022, 16:46:21] [PanasonicVieraTV] Unable to fetch specs from TV at '192.168.178.115'.
[17/01/2022, 16:46:21] [PanasonicVieraTV] Using the previously cached ones:

 {"friendlyName":"Viera ","manufacturer":"Panasonic","modelName":"Panasonic VIErA","modelNumber":"WT60","requiresEncryption":false,"serialNumber":"4D454930-0200-1000-8001-xxxxxxxxxx"}
[17/01/2022, 16:46:25] AssertionError [ERR_ASSERTION]: Accessories must be created with a valid UUID.
    at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:418:11)
    at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:70:9)
    at Ae.<anonymous> (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:131:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Ae.discoverDevices (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:67:23)
    at HomebridgeAPI.<anonymous> (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:39:7)
[17/01/2022, 16:46:25] Got SIGTERM, shutting down Homebridge...

did update. still same problem..

AntonioMeireles commented 2 years ago

puzzled. can you please delete (or rename) the vieramatic.json file, and restart homebridge ? (but now with the TV turned ON) ?

bsoener commented 2 years ago

vieramatic.json deleted, Tv turned on, Homebridge restarted and it works again. Thank you Perfect

AntonioMeireles commented 2 years ago

GREAT to hear. something odd may have happened. will close as things work for your again. will keep an eye on it anyway.

just bug me again if new issues arise.

all the best,

António

bsoener commented 2 years ago
[18/01/2022, 16:49:33] [PanasonicVieraTV] Unable to fetch specs from TV at '192.168.178.115'.
[18/01/2022, 16:49:33] [PanasonicVieraTV] Using the previously cached ones:

 {"friendlyName":"Viera","manufacturer":"Panasonic","modelName":"Panasonic VIErA","modelNumber":"WT60","requiresEncryption":false,"serialNumber":"4D454930-0200-1000-8001-20C6EBC3C18D"}
[18/01/2022, 16:49:37] AssertionError [ERR_ASSERTION]: Accessories must be created with a valid UUID.
    at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:418:11)
    at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:70:9)
    at Ae.<anonymous> (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:131:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Ae.discoverDevices (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:67:23)
    at HomebridgeAPI.<anonymous> (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:39:7)
[18/01/2022, 16:49:37] Got SIGTERM, shutting down Homebridge...

Hi. Error has appeared again. Must deactivate the plugin again. What could be the reason?

AntonioMeireles commented 2 years ago

sad to hear that. it's strange.

do this please:

thanks in advance for your patience!

bsoener commented 2 years ago

I will try it later. Let me know then

bsoener commented 2 years ago
[18/01/2022, 20:22:01] [PanasonicVieraTV] Unable to fetch specs from TV at '192.168.178.115'.
[18/01/2022, 20:22:01] [PanasonicVieraTV] Using the previously cached ones:

 {"friendlyName":"Viera","manufacturer":"Panasonic","modelName":"Panasonic VIErA","modelNumber":"WT60","requiresEncryption":false,"serialNumber":"4D454930-0200-1000-8001-20C6EBC3C18D"}
[18/01/2022, 20:22:05] AssertionError [ERR_ASSERTION]: Accessories must be created with a valid UUID.
    at new Accessory (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/src/lib/Accessory.ts:418:11)
    at new PlatformAccessory (/usr/local/lib/node_modules/homebridge/src/platformAccessory.ts:70:9)
    at Ae.<anonymous> (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:131:23)
    at processTicksAndRejections (node:internal/process/task_queues:96:5)
    at Ae.discoverDevices (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:67:23)
    at HomebridgeAPI.<anonymous> (file:///usr/local/lib/node_modules/homebridge-vieramatic/src/platform.ts:39:7)
[18/01/2022, 20:22:05] Got SIGTERM, shutting down Homebridge...
tjm7844 commented 2 years ago

I also have noticed this issue (I have a ZT60, so roughly same generation as @bsoener.

I've been using the plugin for at least a year with few/no issues, but noticed something a couple of days ago (maybe Saturday/Sunday, but I'm not positive): I wasn't getting the error mentioned here, and the TV would turn on using the Home App, but the tile would immediately flip to "off" (the TV would still stay on). I then couldn't turn off the TV through Home (had to use the standard IR remote).

I tried installing the 1.4.0 homebridge beta last night, and started getting this error, with homebridge crashing on loop. Played around with it for an hour or so, couldn't fix it (even after rolling back to 1.3.9 ), so went to bed. When I woke up this morning and checked again, the crashing (UUID) error had stopped.

I have since moved this plugin over to a child bridge (as I have a couple other slowish plugins anyway, so thought I might handle them all), and after restarting Homebridge, have started getting this error again. However, at least because it's on a Child Bridge, it's not crashing my entire Homebridge instance, only this plugin's process.

I went through the steps you listed above, and here were my results:

Existing/Original vieramatic.json: {"4D454930-0200-1000-8001-8CC121609620":{"data":{"inputs":{"hdmi":[{"id":"2","name":"Receiver","hidden":0}],"applications":{"0":{"name":"Media player","id":"0387878700000032","hidden":1},"1":{"name":"DLNA server","id":"0387878700000014","hidden":1},"2":{"name":"VIERA Link","id":"0387878700000016","hidden":1},"3":{"name":"TV","id":"0387878700000001","hidden":1},"4":{"name":"Menu","id":"0387878700000009","hidden":1},"5":{"name":"Web Browser","id":"0077777700000002","hidden":1},"6":{"name":"Paint","id":"0387878700000026","hidden":1},"7":{"name":"Put Three","id":"0387878700000036","hidden":1},"8":{"name":"Family Reversi","id":"0387878700000037","hidden":1},"9":{"name":"Touch Connect","id":"0387878700000038","hidden":1},"10":{"name":"Mirroring","id":"0387878700000049","hidden":1},"11":{"name":"Netflix","id":"0010000200000001","hidden":0},"12":{"name":"YouTube","id":"0070000200000001","hidden":1},"13":{"name":"HSN Shop by Remote","id":"0010002000000001","hidden":1},"14":{"name":"CinemaNow","id":"0010000300000001","hidden":1},"15":{"name":"PlayJam","id":"0070001000000001","hidden":1},"16":{"name":"Xumo","id":"0310005700000001","hidden":1},"17":{"name":"VUDU HD Movies","id":"0010001300000001","hidden":1},"18":{"name":"Jotter","id":"0387878700000022","hidden":1},"19":{"name":"Classical Archives Player","id":"0070001700000001","hidden":1}},"TUNER":{"hidden":0}},"specs":{"friendlyName":"Living Room Panasonic","manufacturer":"Panasonic","modelName":"Panasonic VIErA","modelNumber":"ZT60","requiresEncryption":false,"serialNumber":"4D454930-0200-1000-8001-8CC121609620"},"ipAddress":"192.168.1.155"}}}

-rm vieramatic.json

Had a couple of hiccups getting the bridge/device paired correctly, but confirming everything was paired correctly, here's the new vieramatic/json: {"4D454930-0200-1000-8001-8CC121609620":{"data":{"inputs":{"applications":{"0":{"id":"0387878700000032","name":"Media player"},"1":{"id":"0387878700000014","name":"DLNA server"},"2":{"id":"0387878700000016","name":"VIERA Link"},"3":{"id":"0387878700000001","name":"TV"},"4":{"id":"0387878700000009","name":"Menu"},"5":{"id":"0077777700000002","name":"Web Browser"},"6":{"id":"0387878700000026","name":"Paint"},"7":{"id":"0387878700000036","name":"Put Three"},"8":{"id":"0387878700000037","name":"Family Reversi"},"9":{"id":"0387878700000038","name":"Touch Connect"},"10":{"id":"0387878700000049","name":"Mirroring"},"11":{"id":"0010000200000001","name":"Netflix"},"12":{"id":"0070000200000001","name":"YouTube"},"13":{"id":"0010002000000001","name":"HSN Shop by Remote"},"14":{"id":"0010000300000001","name":"CinemaNow"},"15":{"id":"0070001000000001","name":"PlayJam"},"16":{"id":"0310005700000001","name":"Xumo"},"17":{"id":"0010001300000001","name":"VUDU HD Movies"},"18":{"id":"0387878700000022","name":"Jotter"},"19":{"id":"0070001700000001","name":"Classical Archives Player"}},"hdmi":[{"id":"2","name":"Receiver"}],"TUNER":{"hidden":0}},"ipAddress":"192.168.1.155","specs":{"friendlyName":"Living Room Panasonic","manufacturer":"Panasonic","modelName":"Panasonic VIErA","modelNumber":"ZT60","requiresEncryption":false,"serialNumber":"4D454930-0200-1000-8001-8CC121609620"}}}}

Would seem everything started up correctly:

[1/18/2022, 1:04:19 PM] [homebridge-vieramatic] Loaded homebridge-vieramatic v4.0.9 child bridge successfully [1/18/2022, 1:04:19 PM] Loaded 0 cached accessories from cachedAccessories. [MACOfChildbridge]. [1/18/2022, 1:04:19 PM] [homebridge-vieramatic] handling '192.168.1.155' from config.json [1/18/2022, 1:04:19 PM] Homebridge v1.3.9 (HAP v0.9.8) (homebridge-vieramatic) is running on port [PORTISHERE]. [1/18/2022, 1:04:19 PM] [homebridge-vieramatic] found a 'Panasonic VIErA' TV (ZT60) at '192.168.1.155' . [1/18/2022, 1:04:19 PM] [homebridge-vieramatic] Initializing 'Living Room Panasonic' first time ever. [1/18/2022, 1:04:19 PM] [homebridge-vieramatic] successfully loaded Living Room Panasonic

I still can't control the set (other than turning it on), and homebridge-UI won't let me edit the config directly, but at least for now, there are no more UUID crashes.

Screen Shot 2022-01-18 at 1 19 36 PM

Maybe you can find something useful here? More data never hurts, right? 🤷‍♂️

AntonioMeireles commented 2 years ago

@tjm7844 many many thanks...

a) do you also have friendlyName set in your homebridge's config.json ? (could you paste the config anyway plz) b) platform plugins in general afaik won't work in bridgeed setups (homebridge design issue if i recall correctly)

looking into this. (and trying to spot a way to reproduce)

Thanks all gain for your patience!

AntonioMeireles commented 2 years ago

@bsoener @tjm7844

could you also both give a try to homebridge-vieramatic@4.0.10. it should NOT crash whole homebridge anymore and also give us (hopefully) a bit more precise error message... (attach it please)

thanks in advance!

bsoener commented 2 years ago

latest update done and no error message. will wait until tomorrow and report back

tjm7844 commented 2 years ago

I do have a friendly name. I removed the child bridge, and updated the plugin to 4.0.10.

Here's the config:

    "tvs": [
        {
            "friendlyName": "Living Room Panasonic",
            "ipAddress": "192.168.1.155",
            "mac": "8C:C1:21:60:96:20",
            "hdmiInputs": [
                {
                    "id": "2",
                    "name": "Receiver"
                }
            ],
            "disabledAppSupport": false,
            "customVolumeSlider": true
        }
    ],
    "platform": "PanasonicVieraTV"
}

After doing the above, I restarted homebridge again, and saw this on startup:

[1/18/2022, 11:32:58 PM] [PanasonicVieraTV] device: {"friendlyName":"Living Room Panasonic","ipAddress":"192.168.1.155","mac":"8C:C1:21:60:96:20","hdmiInputs":[{"id":"2","name":"Receiver"}],"disabledAppSupport":false,"customVolumeSlider":true}
[1/18/2022, 11:32:58 PM] [PanasonicVieraTV] specs: {"friendlyName":"Living Room Panasonic"}
[1/18/2022, 11:32:58 PM] [PanasonicVieraTV] Accessories must be created with a valid UUID.

It's not crashing the whole homebridge instance, but it won't let me re-pair the device. Will let it run and see if there's any different in the morning.

AntonioMeireles commented 2 years ago

@tjm7844

can you post full logs plz (from homebridge early initialization ...) also, can you confirm that issue only happens if you restart homebridge with the TV in standby ?

thanks!

AntonioMeireles commented 2 years ago

@tjm7844, @bsoener

i've pushed a new release homebridge-vieramatic@4.0.11 (tagged as beta) so you need to npm i homebridge-vieramatic@4.0.11 to consume it. it should give us a bit more robust behaviour/detailed info. Unsure if enough to fix whole thing.

please attach here the newly generated boot logs...

and thanks once again for all your patience!

bsoener commented 2 years ago

latest beta installed. The following error message from the log

[19/01/2022, 20:40:03] [PanasonicVieraTV] Unable to fetch specs from TV at '192.168.178.115'.
[19/01/2022, 20:40:03] [PanasonicVieraTV] Using the previously cached ones:

 {"friendlyName":"Viera","manufacturer":"Panasonic","modelName":"Panasonic VIErA","modelNumber":"WT60","requiresEncryption":false,"serialNumber":"4D454930-0200-1000-8001-20C6EBC3C18D"}

[19/01/2022, 20:40:07] [PanasonicVieraTV] device: {"friendlyName":"Viera ","ipAddress":"192.168.178.115","mac":"xx:xx:xx:xx:xx:xx","hdmiInputs":[{"id":"1","name":"Denon"},{"id":"2","name":"PS5"}],"disabledAppSupport":false,"customVolumeSlider":true}
[19/01/2022, 20:40:07] [PanasonicVieraTV] specs: {"friendlyName":"Viera"}
[19/01/2022, 20:40:07] [PanasonicVieraTV] Accessories must be created with a valid UUID.
AntonioMeireles commented 2 years ago

@bsoener

THANKS!. your data is in line with @tjm7844 previous one. that's the good news. the bad news is that i'm missing the obvious as it shouldn't just happen. FWIW the root issue is in [19/01/2022, 20:40:07] [PanasonicVieraTV] specs: {"friendlyName":"Viera"}. specsis not there and should. digging - this is some logic mistake i made somewhere.

will get back to all of you soonish.

(and thanks yet again for all your patience!)

AntonioMeireles commented 2 years ago

@bsoener

when you have the time install please homebridge-vieramatic@4.0.12 (npm i homebridge-vieramatic@4.0.12), restart homebridge and paste output...

bsoener commented 2 years ago
[19/01/2022, 22:24:38] [PanasonicVieraTV] found a 'Panasonic VIErA' TV (WT60) at '192.168.178.115' .

[19/01/2022, 22:24:38] [PanasonicVieraTV] Initializing 'Viera' first time ever.
[19/01/2022, 22:24:38] [PanasonicVieraTV] successfully loaded Viera
[19/01/2022, 22:24:38] Viera ED82 is running on port 46555.
AntonioMeireles commented 2 years ago

@bsoener, THANKS; now turn TV off plz, restart homebridge and past output again...

bsoener commented 2 years ago

So I installed the latest version. No error message comes. Now I could turn off my tv via the homeapp. Unfortunately I can no longer get it on. The slider moves back to off. Tv Remote ust activated.

bsoener commented 2 years ago
[19/01/2022, 22:30:44] [PanasonicVieraTV] Unable to fetch specs from TV at '192.168.178.115'.
[19/01/2022, 22:30:44] [PanasonicVieraTV] Using the previously cached ones:

 {"friendlyName":"Viera","manufacturer":"Panasonic","modelName":"Panasonic VIErA","modelNumber":"WT60","requiresEncryption":false,"serialNumber":"4D454930-0200-1000-8001-20C6EBC3C18D"}
[19/01/2022, 22:30:48] [PanasonicVieraTV] device: {"friendlyName":"Viera ","ipAddress":"192.168.178.115","mac":"xx:xx:xx:xx:xx:xx","hdmiInputs":[{"id":"1","name":"Denon"},{"id":"2","name":"PS5"}],"disabledAppSupport":false,"customVolumeSlider":true}
[19/01/2022, 22:30:48] [PanasonicVieraTV] specs: {"friendlyName":"Viera"}
[19/01/2022, 22:30:48] [PanasonicVieraTV] Accessories must be created with a valid UUID.

When restarting the Homebridge comes again this error message

AntonioMeireles commented 2 years ago

Unfortunately I can no longer get it on. The slider moves back to off. Tv Remote ust activated.

can you explain this part a bit better ? not sure i understand. and logs please...

AntonioMeireles commented 2 years ago

@bsoener, humm, are you sure that you are in homebridge-vieramatic@4.0.12 and not homebridge-vieramatic@4.0.11 ?

bsoener commented 2 years ago

I have the latest version on it. Restarted Homebridge. My Tv was reachable and no error log. About the Apple Homeapp I wanted to turn off the TV went well. Now I wanted to turn on again via Apple Homeapp again, and the On button goes from all off.

bsoener commented 2 years ago

mom

@bsoener, humm, are you sure that you are in homebridge-vieramatic@4.0.12 and not homebridge-vieramatic@4.0.11 ?

mom

bsoener commented 2 years ago

Panasonic™ Viera™ TVs support

homebridge-vieramatic v4.0.12

[19/01/2022, 22:39:26] [PanasonicVieraTV] Unable to fetch specs from TV at '192.168.178.115'.
[19/01/2022, 22:39:26] [PanasonicVieraTV] Using the previously cached ones:

 {
  "friendlyName": "Viera",
  "manufacturer": "Panasonic",
  "modelName": "Panasonic VIErA",
  "modelNumber": "WT60",
  "requiresEncryption": false,
  "serialNumber": "4D454930-0200-1000-8001-20C6EBC3C18D"
}
[19/01/2022, 22:39:29] [PanasonicVieraTV] A {
  "address": "192.168.178.115",
  "mac": "xx:xx:xx:xx:xx:xx",
  "apps": {
    "error": {
      "code": "EHOSTUNREACH",
      "timings": {
        "start": 1642628366368,
        "socket": 1642628366369,
        "error": 1642628369441,
        "phases": {
          "wait": 1,
          "total": 3073
        }
      },
      "name": "RequestError",
      "options": {
        "agent": {},
        "decompress": true,
        "timeout": {
          "request": 3500
        },
        "prefixUrl": "",
        "body": "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><u:X_GetAppList xmlns:u=\"urn:panasonic-com:service:p00NetworkControl:1\">None</u:X_GetAppList></s:Body></s:Envelope>",
        "ignoreInvalidCookies": false,
        "context": {},
        "hooks": {
          "init": [],
          "beforeRequest": [],
          "beforeError": [],
          "beforeRedirect": [],
          "beforeRetry": [],
          "afterResponse": []
        },
        "followRedirect": true,
        "maxRedirects": 10,
        "throwHttpErrors": true,
        "username": "",
        "password": "",
        "http2": false,
        "allowGetBody": false,
        "headers": {
          "user-agent": "got (https://github.com/sindresorhus/got)",
          "accept": "application/xml",
          "cache-control": "no-cache",
          "content-type": "application/xml; charset=\"utf-8\"",
          "host": "192.168.178.115:55000",
          "pragma": "no-cache",
          "soapaction": "\"urn:panasonic-com:service:p00NetworkControl:1#X_GetAppList\"",
          "content-length": "285",
          "accept-encoding": "gzip, deflate, br"
        },
        "methodRewriting": false,
        "retry": {
          "limit": 0,
          "methods": [
            "GET",
            "PUT",
            "HEAD",
            "DELETE",
            "OPTIONS",
            "TRACE"
          ],
          "statusCodes": [
            408,
            413,
            429,
            500,
            502,
            503,
            504,
            521,
            522,
            524
          ],
          "errorCodes": [
            "ETIMEDOUT",
            "ECONNRESET",
            "EADDRINUSE",
            "ECONNREFUSED",
            "EPIPE",
            "ENOTFOUND",
            "ENETUNREACH",
            "EAI_AGAIN"
          ],
          "backoffLimit": null,
          "noise": 100
        },
        "method": "POST",
        "cacheOptions": {},
        "https": {},
        "resolveBodyOnly": false,
        "isStream": false,
        "responseType": "text",
        "url": "http://192.168.178.115:55000/nrc/control_0",
        "pagination": {
          "countLimit": null,
          "backoff": 0,
          "requestLimit": 10000,
          "stackAllItems": false
        },
        "setHost": true
      }
    }
  },
  "auth": {},
  "specs": {
    "friendlyName": "Viera",
    "manufacturer": "Panasonic",
    "modelName": "Panasonic VIErA",
    "modelNumber": "WT60",
    "requiresEncryption": false,
    "serialNumber": "4D454930-0200-1000-8001-20C6EBC3C18D"
  }
} {
  friendlyName: 'Viera ',
  ipAddress: '192.168.178.115',
  mac: 'C0:D9:62:D3:BE:C1',
  hdmiInputs: [ { id: '1', name: 'Denon' }, { id: '2', name: 'PS5' } ],
  disabledAppSupport: false,
  customVolumeSlider: true
}
[19/01/2022, 22:39:29] [PanasonicVieraTV] B {
  "friendlyName": "Viera",
  "manufacturer": "Panasonic",
  "modelName": "Panasonic VIErA",
  "modelNumber": "WT60",
  "requiresEncryption": false,
  "serialNumber": "4D454930-0200-1000-8001-20C6EBC3C18D"
}
[19/01/2022, 22:39:29] [PanasonicVieraTV] Using previously cached App listing.
[19/01/2022, 22:39:29] [PanasonicVieraTV] successfully loaded Viera
[19/01/2022, 22:39:29] Viera ED82 is running on port 33615.
[19/01/2022, 22:39:29] Please add [Viera ED82] manually in Home app. Setup Code: 031-45-154
AntonioMeireles commented 2 years ago

OK, so, no error now ? right, i.e. things behave when you restart homebridge regardless of TV being ON or OFF ? or no ?

bsoener commented 2 years ago

I no longer get an error message. Only this when restarting the homebridge

19/01/2022, 22:39:26] [PanasonicVieraTV] Unable to fetch specs from TV at '192.168.178.115'.
[19/01/2022, 22:39:26] [PanasonicVieraTV] Using the previously cached ones:

 {
  "friendlyName": "Viera",
  "manufacturer": "Panasonic",
  "modelName": "Panasonic VIErA",
  "modelNumber": "WT60",
  "requiresEncryption": false,
  "serialNumber": "4D454930-0200-1000-8001-20C6EBC3C18D"

With the homeapp I can unfortunately not switch the tv on and off

AntonioMeireles commented 2 years ago

right, but only when TV is off (you don't get that one - the [PanasonicVieraTV] Using the previously cached ones part when TV is ON and you restart homebridge. is this correct ? also, now TV / homekit behaves ?

bsoener commented 2 years ago

With the homeapp I can unfortunately not switch the tv on and off.

AntonioMeireles commented 2 years ago

oh, missed last line. a) drop the TV from the home app b) remove (see earlier) the vieramatic.json and restart homebridge c) add TV to home app again.

hopefully that may be enought to fix things (i.e. you may be getting side effects from past woes)

(crossing fingers)

bsoener commented 2 years ago

So, I kicked Viera out of the homeapp, deleted .json via homebridge terminal, restarted the homebridge, added Tv back into the homeapp. But can not turn it on. The slider falls back to off.

AntonioMeireles commented 2 years ago

:/ and nothing in logs ?

can you restart homebridge with -D option, and then attach here its' output ? (-D adds a 'bit' more debug logging to its output. should tell us where things are tanking now)

bsoener commented 2 years ago

please be more specific. how do i do that?

AntonioMeireles commented 2 years ago

something along (https://github.com/homebridge/homebridge/wiki/Basic-Troubleshooting#debug-mode)

bsoener commented 2 years ago
[19/01/2022, 23:12:39] [PanasonicVieraTV] getSpecs: RequestError: connect EHOSTUNREACH 192.168.178.115:55000
    at ClientRequest.<anonymous> (file:///usr/local/lib/node_modules/homebridge-vieramatic/node_modules/got/dist/source/core/index.js:792:107)
    at Object.onceWrapper (node:events:510:26)
    at ClientRequest.emit (node:events:402:35)
    at Socket.socketErrorListener (node:_http_client:447:9)
    at Socket.emit (node:events:390:28)
    at emitErrorNT (node:internal/streams/destroy:157:8)
    at emitErrorCloseNT (node:internal/streams/destroy:122:3)
    at processTicksAndRejections (node:internal/process/task_queues:83:21)
    at TCPConnectWrap.afterConnect [as oncomplete] (node:net:1161:16) {
  input: undefined,
  code: 'EHOSTUNREACH',
  timings: {
    start: 1642630356348,
    socket: 1642630356351,
    lookup: undefined,
    connect: undefined,
    secureConnect: undefined,
    upload: undefined,
    response: undefined,
    end: undefined,
    error: 1642630359442,
    abort: undefined,
    phases: {
      wait: 3,
      dns: undefined,
      tcp: undefined,
      tls: undefined,
      request: undefined,
      firstByte: undefined,
      download: undefined,
      total: 3094
    }
  },
  options: {
    request: undefined,
    agent: { http: undefined, https: undefined, http2: undefined },
    h2session: undefined,
    decompress: true,
    timeout: {
      connect: undefined,
      lookup: undefined,
      read: undefined,
      request: 3500,
      response: undefined,
      secureConnect: undefined,
      send: undefined,
      socket: undefined
    },
    prefixUrl: '',
    body: undefined,
    form: undefined,
    json: undefined,
    cookieJar: undefined,
    ignoreInvalidCookies: false,
    searchParams: undefined,
    dnsLookup: undefined,
    dnsCache: undefined,
    context: {},
    hooks: {
      init: [],
      beforeRequest: [],
      beforeError: [],
      beforeRedirect: [],
      beforeRetry: [],
      afterResponse: []
    },
    followRedirect: true,
    maxRedirects: 10,
    cache: undefined,
    throwHttpErrors: true,
    username: '',
    password: '',
    http2: false,
    allowGetBody: false,
    headers: {
      'user-agent': 'got (https://github.com/sindresorhus/got)',
      accept: 'application/xml',
      'cache-control': 'no-cache',
      'content-type': 'application/xml; charset="utf-8"',
      host: '192.168.178.115:55000',
      pragma: 'no-cache',
      'accept-encoding': 'gzip, deflate, br'
    },
    methodRewriting: false,
    dnsLookupIpVersion: undefined,
    parseJson: [Function: parse],
    stringifyJson: [Function: stringify],
    retry: {
      limit: 0,
      methods: [ 'GET', 'PUT', 'HEAD', 'DELETE', 'OPTIONS', 'TRACE' ],
      statusCodes: [
        408, 413, 429, 500,
        502, 503, 504, 521,
        522, 524
      ],
      errorCodes: [
        'ETIMEDOUT',
        'ECONNRESET',
        'EADDRINUSE',
        'ECONNREFUSED',
        'EPIPE',
        'ENOTFOUND',
        'ENETUNREACH',
        'EAI_AGAIN'
      ],
      maxRetryAfter: undefined,
      calculateDelay: [Function: calculateDelay],
      backoffLimit: Infinity,
      noise: 100
    },
    localAddress: undefined,
    method: 'GET',
    createConnection: undefined,
    cacheOptions: {
      shared: undefined,
      cacheHeuristic: undefined,
      immutableMinTimeToLive: undefined,
      ignoreCargoCult: undefined
    },
    https: {
      alpnProtocols: undefined,
      rejectUnauthorized: undefined,
      checkServerIdentity: undefined,
      certificateAuthority: undefined,
      key: undefined,
      certificate: undefined,
      passphrase: undefined,
      pfx: undefined,
      ciphers: undefined,
      honorCipherOrder: undefined,
      minVersion: undefined,
      maxVersion: undefined,
      signatureAlgorithms: undefined,
      tlsSessionLifetime: undefined,
      dhparam: undefined,
      ecdhCurve: undefined,
      certificateRevocationLists: undefined
    },
    encoding: undefined,
    resolveBodyOnly: false,
    isStream: false,
    responseType: 'text',
    url: URL {
      href: 'http://192.168.178.115:55000/nrc/ddd.xml',
      origin: 'http://192.168.178.115:55000',
      protocol: 'http:',
      username: '',
      password: '',
      host: '192.168.178.115:55000',
      hostname: '192.168.178.115',
      port: '55000',
      pathname: '/nrc/ddd.xml',
      search: '',
      searchParams: URLSearchParams {},
      hash: ''
    },
    pagination: {
      transform: [Function: transform],
      paginate: [Function: paginate],
      filter: [Function: filter],
      shouldContinue: [Function: shouldContinue],
      countLimit: Infinity,
      backoff: 0,
      requestLimit: 10000,
      stackAllItems: false
    },
    setHost: true,
    maxHeaderSize: undefined
  }
}
[19/01/2022, 23:12:39] [PanasonicVieraTV] Unable to fetch specs from TV at '192.168.178.115'.
[19/01/2022, 23:12:39] [PanasonicVieraTV] Using the previously cached ones:

 {
  "friendlyName": "Viera",
  "manufacturer": "Panasonic",
  "modelName": "Panasonic VIErA",
  "modelNumber": "WT60",
  "requiresEncryption": false,
  "serialNumber": "4D454930-0200-1000-8001-20C6EBC3C18D"
}
AntonioMeireles commented 2 years ago

OK, great! pass plz the output you get when you try to turn on the TV

AntonioMeireles commented 2 years ago

AFAICT your TV needs to be awaken via WOL (wake on lan)

AntonioMeireles commented 2 years ago

also, getting a bit late - if you prefer we can continue tommorrow (after 8pm UTC)

bsoener commented 2 years ago
[19/01/2022, 22:59:31] [PanasonicVieraTV] Unable to fetch specs from TV at '192.168.178.115'.
[19/01/2022, 22:59:31] [PanasonicVieraTV] Using the previously cached ones:

 {
  "friendlyName": "Viera",
  "manufacturer": "Panasonic",
  "modelName": "Panasonic VIErA",
  "modelNumber": "WT60",
  "requiresEncryption": false,
  "serialNumber": "4D454930-0200-1000-8001-20C6EBC3C18D"
}
[19/01/2022, 22:59:34] [PanasonicVieraTV] A {
  "address": "192.168.178.115",
  "mac": "xx:xx:xx:xx:xx:xx",
  "apps": {
    "error": {
      "code": "ETIMEDOUT",
      "timings": {
        "start": 1642629571460,
        "socket": 1642629571462,
        "error": 1642629574962,
        "phases": {
          "wait": 2,
          "total": 3502
        }
      },
      "name": "TimeoutError",
      "options": {
        "agent": {},
        "decompress": true,
        "timeout": {
          "request": 3500
        },
        "prefixUrl": "",
        "body": "<?xml version=\"1.0\" encoding=\"utf-8\"?><s:Envelope s:encodingStyle=\"http://schemas.xmlsoap.org/soap/encoding/\" xmlns:s=\"http://schemas.xmlsoap.org/soap/envelope/\"><s:Body><u:X_GetAppList xmlns:u=\"urn:panasonic-com:service:p00NetworkControl:1\">None</u:X_GetAppList></s:Body></s:Envelope>",
        "ignoreInvalidCookies": false,
        "context": {},
        "hooks": {
          "init": [],
          "beforeRequest": [],
          "beforeError": [],
          "beforeRedirect": [],
          "beforeRetry": [],
          "afterResponse": []
        },
        "followRedirect": true,
        "maxRedirects": 10,
        "throwHttpErrors": true,
        "username": "",
        "password": "",
        "http2": false,
        "allowGetBody": false,
        "headers": {
          "user-agent": "got (https://github.com/sindresorhus/got)",
          "accept": "application/xml",
          "cache-control": "no-cache",
          "content-type": "application/xml; charset=\"utf-8\"",
          "host": "192.168.178.115:55000",
          "pragma": "no-cache",
          "soapaction": "\"urn:panasonic-com:service:p00NetworkControl:1#X_GetAppList\"",
          "content-length": "285",
          "accept-encoding": "gzip, deflate, br"
        },
        "methodRewriting": false,
        "retry": {
          "limit": 0,
          "methods": [
            "GET",
            "PUT",
            "HEAD",
            "DELETE",
            "OPTIONS",
            "TRACE"
          ],
          "statusCodes": [
            408,
            413,
            429,
            500,
            502,
            503,
            504,
            521,
            522,
            524
          ],
          "errorCodes": [
            "ETIMEDOUT",
            "ECONNRESET",
            "EADDRINUSE",
            "ECONNREFUSED",
            "EPIPE",
            "ENOTFOUND",
            "ENETUNREACH",
            "EAI_AGAIN"
          ],
          "backoffLimit": null,
          "noise": 100
        },
        "method": "POST",
        "cacheOptions": {},
        "https": {},
        "resolveBodyOnly": false,
        "isStream": false,
        "responseType": "text",
        "url": "http://192.168.178.115:55000/nrc/control_0",
        "pagination": {
          "countLimit": null,
          "backoff": 0,
          "requestLimit": 10000,
          "stackAllItems": false
        },
        "setHost": true
      },
      "event": "request"
    }
  },
  "auth": {},
  "specs": {
    "friendlyName": "Viera",
    "manufacturer": "Panasonic",
    "modelName": "Panasonic VIErA",
    "modelNumber": "WT60",
    "requiresEncryption": false,
    "serialNumber": "4D454930-0200-1000-8001-20C6EBC3C18D"
  }
} {
  friendlyName: 'Viera ',
  ipAddress: '192.168.178.115',
  mac: 'C0:D9:62:D3:BE:C1',
  hdmiInputs: [ { id: '1', name: 'Denon' }, { id: '2', name: 'PS5' } ],
  disabledAppSupport: false,
  customVolumeSlider: true
}
[19/01/2022, 22:59:34] [PanasonicVieraTV] B {
  "friendlyName": "Viera",
  "manufacturer": "Panasonic",
  "modelName": "Panasonic VIErA",
  "modelNumber": "WT60",
  "requiresEncryption": false,
  "serialNumber": "4D454930-0200-1000-8001-20C6EBC3C18D"
}
[19/01/2022, 22:59:34] [PanasonicVieraTV] Using previously cached App listing.
[19/01/2022, 22:59:35] [PanasonicVieraTV] successfully loaded Viera
[19/01/2022, 22:59:35] Viera ED82 is running on port 45743.
[19/01/2022, 22:59:35] Please add [Viera ED82] manually in Home app. Setup Code: 031-45-154
[19/01/2022, 23:02:47] [Homebridge UI] [homebridge-vieramatic] Incoming Request: /ping
[19/01/2022, 23:02:48] [Homebridge UI] [homebridge-vieramatic] ---> (ping) 192.168.178.115 false
[19/01/2022, 23:02:56] [Homebridge UI] [homebridge-vieramatic] Terminating child process...
[19/01/2022, 23:02:56] [Homebridge UI] [homebridge-vieramatic] Child process ended
[19/01/2022, 23:12:23] [Homebridge UI] Starting terminal session
[19/01/2022, 23:18:09] [Homebridge UI] Terminal session ended.
AntonioMeireles commented 2 years ago

you don't get extra output when you try to turn TV on / off ?

bsoener commented 2 years ago

no