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

Plugin fails to load/initialize #54

Closed msbc42 closed 3 years ago

msbc42 commented 3 years ago

Describe your issue Error at server start prevents plugin from loading.

Issue Context Plugin was working fine on Homebridge 1.2.5. Re-installed Homebridge 1.1.7, to fix issue with a different plugin, and now see error at startup:

found a 'Panasonic VIErA' TV (TH-65FZ950U) at '192.168.XX.XX' (requires crypto for comunication).

(node:160655) UnhandledPromiseRejectionWarning: Error: Cannot add a Service with the same UUID '000000D9-0000-1000-8000-0026BB765291' and subtype '1' as another Service in this Accessory.
    at Accessory._this.addService (/usr/local/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Accessory.js:187:31)
    at PlatformAccessory.addService (/usr/local/lib/node_modules/homebridge/lib/platformAccessory.js:45:45)
    at VieramaticPlatformAccessory.configureInputSource (/homebridge/node_modules/homebridge-vieramatic/dist/accessory.js:230:39)
    at /homebridge/node_modules/homebridge-vieramatic/dist/accessory.js:174:18
    at Proxy.forEach (<anonymous>:null:null)
    at new VieramaticPlatformAccessory (/homebridge/node_modules/homebridge-vieramatic/dist/accessory.js:172:39)
    at VieramaticPlatform.deviceSetup (/homebridge/node_modules/homebridge-vieramatic/dist/platform.js:127:9)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at /homebridge/node_modules/homebridge-vieramatic/dist/platform.js:54:13

(Use `node --trace-warnings ...` to show where the warning was created)
(node:160655) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:160655) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Removed the plug-in and re-installed. See exact same error.

AntonioMeireles commented 3 years ago

Humm, at sight this is a local issue. when reinstalling homebridge, in order for that to be from scratch, you also need to wipe it's data namely the /persistent/ directory (under same dir as you homebridge's config.json and only then restart homebridge. You also need to remove your homebridge bridge from home.app in IOS and then add it again. Please check if this is your issue.

msbc42 commented 3 years ago

Cleaning out the old data fixed this problem. Plug-in now starts correctly and paired with my TV. Accessories appear in Homebridge and I can control my TV. But, no accessories in Home app - seems to be same issue as #53 so I'll add to that and close this one.