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

viera-pair error #35

Closed daciand closed 4 years ago

daciand commented 4 years ago

Since latest update (2.0.4) I found out I cannot control the TX-55FZ800 TV anymore. I found the following error in the log:

Sep 13 15:28:56 raspberrypi homebridge[24504]: [9/13/2020, 15:28:56] [PanasonicVieraTV] Initializing PanasonicVieraTV platform...
Sep 13 15:28:57 raspberrypi homebridge[24504]: [9/13/2020, 15:28:57] [PanasonicVieraTV] handling 192.168.0.153 from config.json
Sep 13 15:28:59 raspberrypi homebridge[24504]: found a 'Panasonic VIErA' TV (TX-55FZ800E) at '192.168.0.153' (requires crypto for comunication).
Sep 13 15:29:01 raspberrypi homebridge[24504]: (node:24504) UnhandledPromiseRejectionWarning: Error: Cannot add a Service with the same UUID '000000D9-0000-1000-8000-0026BB765291' and subtype '1' as another Service in this Accessory.
Sep 13 15:29:01 raspberrypi homebridge[24504]:     at Accessory._this.addService (/usr/lib/node_modules/homebridge/node_modules/hap-nodejs/dist/lib/Accessory.js:187:31)
Sep 13 15:29:01 raspberrypi homebridge[24504]:     at PlatformAccessory.addService (/usr/lib/node_modules/homebridge/lib/platformAccessory.js:45:45)
Sep 13 15:29:01 raspberrypi homebridge[24504]:     at VieramaticPlatformAccessory.configureInputSource (/usr/lib/node_modules/homebridge-vieramatic/dist/accessory.js:233:39)
Sep 13 15:29:01 raspberrypi homebridge[24504]:     at /usr/lib/node_modules/homebridge-vieramatic/dist/accessory.js:173:18
Sep 13 15:29:01 raspberrypi homebridge[24504]:     at Proxy.forEach (<anonymous>:null:null)
Sep 13 15:29:01 raspberrypi homebridge[24504]:     at new VieramaticPlatformAccessory (/usr/lib/node_modules/homebridge-vieramatic/dist/accessory.js:172:39)
Sep 13 15:29:01 raspberrypi homebridge[24504]:     at VieramaticPlatform.deviceSetup (/usr/lib/node_modules/homebridge-vieramatic/dist/platform.js:99:9)
Sep 13 15:29:01 raspberrypi homebridge[24504]:     at processTicksAndRejections (internal/process/task_queues.js:97:5)
Sep 13 15:29:01 raspberrypi homebridge[24504]:     at /usr/lib/node_modules/homebridge-vieramatic/dist/platform.js:40:13
Sep 13 15:29:01 raspberrypi homebridge[24504]: (node:24504) 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)
Sep 13 15:29:01 raspberrypi homebridge[24504]: (node:24504) [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.

This is my plugin configuration:

        {
            "tvs": [
                {
                    "ipAddress": "192.168.0.153",
                    "encKey": "<...>",
                    "appId": "<...>",
                    "hdmiInputs": [
                        {
                            "id": "1",
                            "name": "Apple TV 4K"
                        },
                        {
                            "id": "2",
                            "name": "Raspberry Pi 3B+"
                        }
                    ],
                    "customVolumeSlider": false
                }
            ],
            "platform": "PanasonicVieraTV"
        },

So I have tried to pair the TV again, but viera-pair no longer work:

pi@raspberrypi:~ $ viera-pair 192.168.0.153
/usr/bin/viera-pair: line 1: use strict: command not found
/usr/bin/viera-pair: line 2: syntax error near unexpected token `('
/usr/bin/viera-pair: line 2: `var __importDefault = (this && this.__importDefault) || function (mod) {'
pi@raspberrypi:~ $ sudo viera-pair 192.168.0.153
/usr/bin/viera-pair: 1: /usr/bin/viera-pair: use strict: not found
/usr/bin/viera-pair: 2: /usr/bin/viera-pair: Syntax error: "(" unexpected

I'm running homebridge on a Raspberry Pi 3 B+

pi@raspberrypi:~ $ uname -a
Linux raspberrypi 5.4.51-v7+ #1333 SMP Mon Aug 10 16:45:19 BST 2020 armv7l GNU/Linux
pi@raspberrypi:~ $ node -v
v12.18.3
pi@raspberrypi:~ $ homebridge --version
1.1.6

I am able to connect and control the TV via TV Remote 3 app.

daciand commented 4 years ago

I managed to make it work fine again my deleting "vieramatic.json" file and restarted homebridge service. So it seems that I don't need "viera-pair" anymore, but still does't run. I get the same error as above. But at least the TV is controllable via HomeKit 👍

AntonioMeireles commented 4 years ago

@daciand

viera-pair fixed in 2.0.5 that just got published.

thanks for reporting and have a great weekend!.

P.S. just reopen if i missed something obvious