homebridge-vieramatic icon indicating copy to clipboard operation
homebridge-vieramatic copied to clipboard

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

Open bsoener opened this issue 3 years ago • 103 comments

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"
        },

bsoener avatar Jan 17 '22 14:01 bsoener

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 avatar Jan 17 '22 14:01 AntonioMeireles

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 avatar Jan 17 '22 15:01 AntonioMeireles

@bsoener

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

thanks in advance!

AntonioMeireles avatar Jan 17 '22 15:01 AntonioMeireles

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?

bsoener avatar Jan 17 '22 15:01 bsoener

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

AntonioMeireles avatar Jan 17 '22 15:01 AntonioMeireles

{"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"}}}}

bsoener avatar Jan 17 '22 15:01 bsoener

@bsoener

can you please give a try to [email protected] ? does it change anything ?

thanks in advance!

AntonioMeireles avatar Jan 17 '22 15:01 AntonioMeireles

[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..

bsoener avatar Jan 17 '22 15:01 bsoener

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

AntonioMeireles avatar Jan 17 '22 15:01 AntonioMeireles

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

bsoener avatar Jan 17 '22 16:01 bsoener

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

AntonioMeireles avatar Jan 17 '22 16:01 AntonioMeireles

[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?

bsoener avatar Jan 18 '22 15:01 bsoener

sad to hear that. it's strange.

do this please:

  • a) attach again existing vieramatic.json
  • b) delete it (vieramatic.json), turn TV ON, and restart homebridge then attach again the newly generated vieramatic.json. hopefully the new one will be somewhat different from the old one and may explain this...
  • c) also, could you attach full homebridge logs (since yesterday - to check if something else may be triggering this) ?

thanks in advance for your patience!

AntonioMeireles avatar Jan 18 '22 15:01 AntonioMeireles

I will try it later. Let me know then

bsoener avatar Jan 18 '22 16:01 bsoener

[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...

bsoener avatar Jan 18 '22 19:01 bsoener

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? 🤷‍♂️

tjm7844 avatar Jan 18 '22 19:01 tjm7844

@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 avatar Jan 18 '22 20:01 AntonioMeireles

@bsoener @tjm7844

could you also both give a try to [email protected]. it should NOT crash whole homebridge anymore and also give us (hopefully) a bit more precise error message... (attach it please)

thanks in advance!

AntonioMeireles avatar Jan 18 '22 20:01 AntonioMeireles

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

bsoener avatar Jan 18 '22 20:01 bsoener

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.

tjm7844 avatar Jan 19 '22 05:01 tjm7844

@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 avatar Jan 19 '22 09:01 AntonioMeireles

@tjm7844, @bsoener

i've pushed a new release [email protected] (tagged as beta) so you need to npm i [email protected] 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!

AntonioMeireles avatar Jan 19 '22 10:01 AntonioMeireles

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.

bsoener avatar Jan 19 '22 19:01 bsoener

@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 avatar Jan 19 '22 19:01 AntonioMeireles

@bsoener

when you have the time install please [email protected] (npm i [email protected]), restart homebridge and paste output...

AntonioMeireles avatar Jan 19 '22 20:01 AntonioMeireles

[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.

bsoener avatar Jan 19 '22 21:01 bsoener

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

AntonioMeireles avatar Jan 19 '22 21:01 AntonioMeireles

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 avatar Jan 19 '22 21:01 bsoener

[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

bsoener avatar Jan 19 '22 21:01 bsoener

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 avatar Jan 19 '22 21:01 AntonioMeireles