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

Node error. Please see log below. Plugin no longer works. Homebridge 1.1.6 #32

Closed jvic1234 closed 4 years ago

jvic1234 commented 4 years ago

(node:1368) UnhandledPromiseRejectionWarning: Error: Pi Tag is not closed. at findClosingIndex (/usr/lib/node_modules/homebridge-vieramatic/node_modules/fast-xml-parser/src/xmlstr2xmlnode.js:335:11) at Object.getTraversalObj (/usr/lib/node_modules/homebridge-vieramatic/node_modules/fast-xml-parser/src/xmlstr2xmlnode.js:212:13) at Object.exports.parse (/usr/lib/node_modules/homebridge-vieramatic/node_modules/fast-xml-parser/src/parser.js:19:39) at getKey (/usr/lib/node_modules/homebridge-vieramatic/src/viera.ts:74:20) at callback (/usr/lib/node_modules/homebridge-vieramatic/src/viera.ts:828:19) at VieraTV.sendRequest (/usr/lib/node_modules/homebridge-vieramatic/src/viera.ts:401:14) at processTicksAndRejections (internal/process/task_queues.js:97:5) at VieramaticPlatform.deviceSetup (/usr/lib/node_modules/homebridge-vieramatic/src/platform.ts:133:17) at /usr/lib/node_modules/homebridge-vieramatic/src/platform.ts:64:7 (node:1368) 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:1368) [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.

AntonioMeireles commented 4 years ago

a) can you get here the log lines before that error (i.e. from homebridge/plugin initialization and until it blows) ? b) can you provide your homebridge config.json ? c) contents of accessories/vieramatic.json (under homebridge's config dir) d) details about your platform ? node version / hw / arch e) what panasonic model is this with ?

thanks!

AntonioMeireles commented 4 years ago

@jvic1234,

btw, does this issue means that you paste away #30 ?

stijndevries commented 4 years ago

I'm getting the same error. I will take a look the the debug log tomorrow.

jvic1234 commented 4 years ago

Request a)

[9/8/2020, 3:45:59 PM] [Config] Homebridge log truncated by admin. [9/8/2020, 3:46:06 PM] [Config] Homebridge restart request received [9/8/2020, 3:46:06 PM] [Config] UI / Bridge settings have not changed; only restarting Homebridge process [9/8/2020, 3:46:06 PM] [HB Supervisor] Sending SIGTERM to Homebridge [9/8/2020, 3:46:06 PM] Got SIGTERM, shutting down Homebridge... [9/8/2020, 3:46:11 PM] [HB Supervisor] Homebridge Process Ended. Code: 143, Signal: null [9/8/2020, 3:46:16 PM] [HB Supervisor] Restarting Homebridge... [9/8/2020, 3:46:16 PM] [HB Supervisor] Starting Homebridge with extra flags: -I [9/8/2020, 3:46:16 PM] [HB Supervisor] Started Homebridge v1.1.6 with PID: 2346 [9/8/2020, 3:46:16 PM] Loaded config.json with 3 accessories and 6 platforms. [9/8/2020, 3:46:16 PM] --- [9/8/2020, 3:46:17 PM] Loaded plugin: homebridge-bravia@2.3.1 [9/8/2020, 3:46:17 PM] Registering platform 'homebridge-bravia.BraviaPlatform' [9/8/2020, 3:46:17 PM] --- [9/8/2020, 3:46:17 PM] Loaded plugin: homebridge-config-ui-x@4.27.1 [9/8/2020, 3:46:17 PM] Registering platform 'homebridge-config-ui-x.config' [9/8/2020, 3:46:17 PM] --- [9/8/2020, 3:46:17 PM] Loaded plugin: homebridge-dummy@0.4.1 [9/8/2020, 3:46:17 PM] Registering accessory 'homebridge-dummy.DummySwitch' [9/8/2020, 3:46:17 PM] --- [9/8/2020, 3:46:18 PM] Loaded plugin: homebridge-mi-led-desk-lamp@1.2.0 [9/8/2020, 3:46:18 PM] Registering accessory 'homebridge-mi-led-desk-lamp.mi-led-desk-lamp' [9/8/2020, 3:46:18 PM] --- [9/8/2020, 3:46:18 PM] Loaded plugin: homebridge-nest-cam@5.2.0 [9/8/2020, 3:46:18 PM] Registering platform 'homebridge-nest-cam.Nest-cam' [9/8/2020, 3:46:18 PM] --- [9/8/2020, 3:46:18 PM] Loaded plugin: homebridge-pico@0.0.4 [9/8/2020, 3:46:18 PM] Registering platform 'homebridge-pico.Pico' [9/8/2020, 3:46:18 PM] --- [9/8/2020, 3:46:18 PM] Loaded plugin: homebridge-tplink-smarthome@5.1.0 [9/8/2020, 3:46:18 PM] Registering platform 'homebridge-tplink-smarthome.TplinkSmarthome' [9/8/2020, 3:46:18 PM] --- [9/8/2020, 3:46:18 PM] Loaded plugin: homebridge-vieramatic@2.0.0 [9/8/2020, 3:46:18 PM] Registering platform 'homebridge-vieramatic.PanasonicVieraTV' [9/8/2020, 3:46:18 PM] --- [9/8/2020, 3:46:19 PM] Loaded plugin: homebridge-xiaomi-roborock-vacuum@0.13.4 [9/8/2020, 3:46:19 PM] Registering accessory 'homebridge-xiaomi-roborock-vacuum.XiaomiRoborockVacuum' [9/8/2020, 3:46:19 PM] --- [9/8/2020, 3:46:19 PM] Loading 6 platforms... [9/8/2020, 3:46:19 PM] [Config] Initializing config platform... [9/8/2020, 3:46:19 PM] [Config] Running in Service Mode [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Initializing TplinkSmarthome platform... [9/8/2020, 3:46:19 PM] [TplinkSmarthome] homebridge-tplink-smarthome v5.1.0, node v12.18.3, homebridge v1.1.6 [9/8/2020, 3:46:19 PM] [PanasonicVieraTV] Initializing PanasonicVieraTV platform... [9/8/2020, 3:46:19 PM] [Pico] Initializing Pico platform... [9/8/2020, 3:46:19 PM] [Pico] Pico Plugin Loaded - Version 0.0.4 [9/8/2020, 3:46:19 PM] [Pico] Quiet logging mode [9/8/2020, 3:46:19 PM] [Pico] [undefined] Caseta Pro Initializing [9/8/2020, 3:46:19 PM] [Pico] [192.168.5.10] Attempting connection [9/8/2020, 3:46:19 PM] [Pico] 192.168.5.10: "Master Pico" - PJ2-3BRL - 15 [9/8/2020, 3:46:19 PM] [Pico] Creating PJ2-3BRL switch: Master Pico [9/8/2020, 3:46:19 PM] [Pico] 192.168.5.10: "Kitchen Pico" - PJ2-3BRL - 9 [9/8/2020, 3:46:19 PM] [Pico] Creating PJ2-3BRL switch: Kitchen Pico [9/8/2020, 3:46:19 PM] Initializing platform accessory 'Master Pico'... [9/8/2020, 3:46:19 PM] [Pico] Switch "Master Pico" Button "On" created [9/8/2020, 3:46:19 PM] [Pico] Switch "Master Pico" Button "Up" created [9/8/2020, 3:46:19 PM] [Pico] Switch "Master Pico" Button "Favorite" created [9/8/2020, 3:46:19 PM] [Pico] Switch "Master Pico" Button "Down" created [9/8/2020, 3:46:19 PM] [Pico] Switch "Master Pico" Button "Off" created [9/8/2020, 3:46:19 PM] Initializing platform accessory 'Kitchen Pico'... [9/8/2020, 3:46:19 PM] [Pico] Switch "Kitchen Pico" Button "On" created [9/8/2020, 3:46:19 PM] [Pico] Switch "Kitchen Pico" Button "Up" created [9/8/2020, 3:46:19 PM] [Pico] Switch "Kitchen Pico" Button "Favorite" created [9/8/2020, 3:46:19 PM] [Pico] Switch "Kitchen Pico" Button "Down" created [9/8/2020, 3:46:19 PM] [Pico] Switch "Kitchen Pico" Button "Off" created [9/8/2020, 3:46:19 PM] [BraviaPlatform] Initializing BraviaPlatform platform... [9/8/2020, 3:46:19 PM] [Nest-cam] Initializing Nest-cam platform... [9/8/2020, 3:46:19 PM] Loading 3 accessories... [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] Initializing XiaomiRoborockVacuum accessory... HAP Warning: Characteristic 000000AC-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 00000040-0000-1000-8000-0026BB765291. Adding anyway. HAP Warning: Characteristic 000000AB-0000-1000-8000-0026BB765291 not in required or optional characteristics for service 00000040-0000-1000-8000-0026BB765291. Adding anyway. [9/8/2020, 3:46:19 PM] [My desk lamp] Initializing mi-led-desk-lamp accessory... [9/8/2020, 3:46:19 PM] [My desk lamp] Connect to device [9/8/2020, 3:46:19 PM] [Dummy Sitch Alarm] Initializing DummySwitch accessory... [9/8/2020, 3:46:19 PM] [Dummy Sitch Alarm] Setting switch to false [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Configuring cached accessory: [Living room fan] 8006B59C4D94632AADB549EE91F7CB021D3F939D00 9ab68852-d519-4099-b883-0bcffc888d02 [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Configuring cached accessory: [Plug 2] 8006B59C4D94632AADB549EE91F7CB021D3F939D01 757c0867-efc9-473d-80f6-87c3c9e26b6b [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Configuring cached accessory: [Plug 3] 8006B59C4D94632AADB549EE91F7CB021D3F939D02 a6e02def-bf04-4a49-bbb0-0d5028f582ff [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Configuring cached accessory: [Office heater] 800690CBAB794BB3AD9E141ECE0E73551902E6C2 6b965781-5700-4ace-ab89-46f02b3f3d55 [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Configuring cached accessory: [Master bedroom fan] 8006A725AB8E07A2C2E2D802618D2D051902BC93 9768e899-0930-40b3-9e2f-1d5826b15dd5 [9/8/2020, 3:46:19 PM] [Nest-cam] Configuring accessory Bedroom [9/8/2020, 3:46:19 PM] [Nest-cam] Configuring accessory Driveway [9/8/2020, 3:46:19 PM] [Nest-cam] Configuring accessory Front Door [9/8/2020, 3:46:19 PM] [Nest-cam] Configuring accessory Living Room [9/8/2020, 3:46:19 PM] [Nest-cam] Configuring accessory Patio [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Configuring cached accessory: [Spare 1] 80061566BE6229E650D149DB341DA3541901160B 7866730e-4773-4825-a57c-5797cb9beb36 [9/8/2020, 3:46:19 PM] [PanasonicVieraTV] handling 192.168.5.50 from config.json [9/8/2020, 3:46:19 PM] [BraviaPlatform] Creating new accessory for Sony Tv [9/8/2020, 3:46:19 PM] [BraviaPlatform] New TV Sony Tv, will be queried for channels/apps and added to HomeKit Setup Payload: X-HM://0024LO6CJ9INO Enter this code with your HomeKit app on your iOS device to pair with Homebridge:

┌────────────┐     
│ 684-26-531 │     
└────────────┘     

[9/8/2020, 3:46:19 PM] Homebridge is running on port 51382. [9/8/2020, 3:46:19 PM] [Pico] [192.168.5.10] Caseta Pro Connected [9/8/2020, 3:46:19 PM] [TplinkSmarthome] New Device Online: [Master bedroom fan] plug [8006A725AB8E07A2C2E2D802618D2D051902BC93] 192.168.5.105 9999 [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Adding: [Master bedroom fan] plug [8006A725AB8E07A2C2E2D802618D2D051902BC93] [9/8/2020, 3:46:19 PM] [TplinkSmarthome] New Device Online: [Spare 1] plug [80061566BE6229E650D149DB341DA3541901160B] 192.168.5.107 9999 [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Adding: [Spare 1] plug [80061566BE6229E650D149DB341DA3541901160B] [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] STA getDevice | Connected to: 192.168.5.70 [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] STA getDevice | Model: roborock.vacuum.s5 [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] STA getDevice | State: charging [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] STA getDevice | FanSpeed: 104 [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] STA getDevice | BatteryLevel: 100 found a 'Panasonic VIErA' TV (TC-65EZ950C) at '192.168.5.50' .

[9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] INF getSerialNumber | roborock.vacuum.s5 | Serial Number is R0018S81505200 [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] STA getDevice | Serialnumber: R0018S81505200 [9/8/2020, 3:46:19 PM] [TplinkSmarthome] New Device Online: [Living room fan] plug [8006B59C4D94632AADB549EE91F7CB021D3F939D00] 192.168.5.148 9999 [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Adding: [Living room fan] plug [8006B59C4D94632AADB549EE91F7CB021D3F939D00] [9/8/2020, 3:46:19 PM] [TplinkSmarthome] New Device Online: [Plug 2] plug [8006B59C4D94632AADB549EE91F7CB021D3F939D01] 192.168.5.148 9999 [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Adding: [Plug 2] plug [8006B59C4D94632AADB549EE91F7CB021D3F939D01] [9/8/2020, 3:46:19 PM] [TplinkSmarthome] New Device Online: [Plug 3] plug [8006B59C4D94632AADB549EE91F7CB021D3F939D02] 192.168.5.148 9999 [9/8/2020, 3:46:19 PM] [TplinkSmarthome] Adding: [Plug 3] plug [8006B59C4D94632AADB549EE91F7CB021D3F939D02] [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] INF getFirmware | roborock.vacuum.s5 | Firmwareversion is 3.5.7_002008 [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] STA getDevice | Firmwareversion: 3.5.7_002008 (node:2346) UnhandledPromiseRejectionWarning: Error: Pi Tag is not closed. at findClosingIndex (/usr/lib/node_modules/homebridge-vieramatic/node_modules/fast-xml-parser/src/xmlstr2xmlnode.js:335:11) at Object.getTraversalObj (/usr/lib/node_modules/homebridge-vieramatic/node_modules/fast-xml-parser/src/xmlstr2xmlnode.js:212:13) at Object.exports.parse (/usr/lib/node_modules/homebridge-vieramatic/node_modules/fast-xml-parser/src/parser.js:19:39) at getKey (/usr/lib/node_modules/homebridge-vieramatic/src/viera.ts:74:20) at callback (/usr/lib/node_modules/homebridge-vieramatic/src/viera.ts:828:19) at VieraTV.sendRequest (/usr/lib/node_modules/homebridge-vieramatic/src/viera.ts:401:14) at processTicksAndRejections (internal/process/task_queues.js:97:5) at VieramaticPlatform.deviceSetup (/usr/lib/node_modules/homebridge-vieramatic/src/platform.ts:133:17) at /usr/lib/node_modules/homebridge-vieramatic/src/platform.ts:64:7 (node:2346) 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:2346) [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. [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedCleaning | roborock.vacuum.s5 | Cleaning is OFF. [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] MON changedCharging | roborock.vacuum.s5 | ChargingState is now true [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedCharging | roborock.vacuum.s5 | Charging is active [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedCharging | roborock.vacuum.s5 | Robot was docked. [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] MON changedSpeed | roborock.vacuum.s5 | FanSpeed is now 104% [9/8/2020, 3:46:19 PM] [Xiaomi Mi Robot Vaccum 1st Generation] INF changedSpeed | roborock.vacuum.s5 | Speed was changed to 104% (Max), for HomeKit 100% [9/8/2020, 3:46:19 PM] [BraviaPlatform] Need to authenticate with TV! [9/8/2020, 3:46:19 PM] [BraviaPlatform] Please enter the PIN that appears on your TV at http://pi4:8999 [9/8/2020, 3:46:19 PM] [BraviaPlatform] PIN entry web server listening [9/8/2020, 3:46:19 PM] [Pico] [192.168.5.10] Logged in [9/8/2020, 3:46:23 PM] [Xiaomi Mi Robot Vaccum 1st Generation] INF getBatteryLow | roborock.vacuum.s5 | Batterylevel is 100% [9/8/2020, 3:46:23 PM] [Xiaomi Mi Robot Vaccum 1st Generation] INF getCleaning | roborock.vacuum.s5 | Cleaning is false [9/8/2020, 3:46:23 PM] [Xiaomi Mi Robot Vaccum 1st Generation] INF getDocked | roborock.vacuum.s5 | Robot Docked is true (Status is charging) [9/8/2020, 3:46:24 PM] [My desk lamp] Get state... [9/8/2020, 3:46:29 PM] [TplinkSmarthome] New Device Online: [Office heater] plug [800690CBAB794BB3AD9E141ECE0E73551902E6C2] 192.168.5.147 9999 [9/8/2020, 3:46:29 PM] [TplinkSmarthome] Adding: [Office heater] plug [800690CBAB794BB3AD9E141ECE0E73551902E6C2]

AntonioMeireles commented 4 years ago

deleted your config as at sight it had private data (tokens)... plz repost it sanitized

AntonioMeireles commented 4 years ago

late here, enough data to sort this hopefully early tomorrow! thanks all for the patience!

jvic1234 commented 4 years ago

dont worry about tokens, they are all bad, I edited the tokens so they dont match

AntonioMeireles commented 4 years ago

dont worry about tokens, they are all bad

good to know, then !

jvic1234 commented 4 years ago

request c)

{"4D454930-0200-1000-8001-D8AFF1452312":{"data":{"inputs":{"hdmi":[],"applications":{"0":{"name":"Apps Market","id":"0387878700000102","hiden":1},"1":{"name":"Netflix","id":"0010000200000001","hiden":1},"2":{"name":"YouTube","id":"0070000200170001","hiden":1},"3":{"name":"TWN","id":"0010003300000001","hiden":1},"4":{"name":"Calendar","id":"0387878700150020","hiden":1},"5":{"name":"VIERA Link","id":"0387878700000016","hiden":1},"6":{"name":"Browser","id":"0077777700160002","hiden":1},"7":{"name":"TuneIn","id":"0010001800000001","hiden":1},"8":{"name":"SHOUTcast Radio","id":"0070000400000001","hiden":1},"9":{"name":"AccuWeather.com","id":"0070000C00000001","hiden":1},"10":{"name":"Wild TV","id":"0070002100000001","hiden":1},"11":{"name":"HuffPost Live","id":"0010002800000003","hiden":1},"12":{"name":"Digital Concert Hall","id":"0076002307170001","hiden":1},"13":{"name":"My App","id":"0387878700000130","hiden":1}},"TUNER":{"hiden":1}},"specs":{"friendlyName":"Panasonic","modelName":"Panasonic VIErA","modelNumber":"TC-65EZ950C","manufacturer":"Panasonic","serialNumber":"4D454930-0200-1000-8001-D8AFF1452312","requiresEncryption":false}}}}

jvic1234 commented 4 years ago

request d)

Raspbian GNU/Linux Buster (10) pi4 Homebridge 1.1.6 node v12.18.3 npm v6.14.8

jvic1234 commented 4 years ago

Reguest e)

TC-65EZ950C

AntonioMeireles commented 4 years ago

@stijndevries, @jvic1234

could you both please give a try to 2.0.1 that i just got out ? (and paste the boot logs again with it).

Thanks agin for your patience

stijndevries commented 4 years ago

Hi Antonio, the 2.0.1 update fixed the issue for me! Thanks!

AntonioMeireles commented 4 years ago

Hi Antonio, the 2.0.1 update fixed the issue for me! Thanks!

WooT! @stijndevries that's great to hear!

@jvic1234 and on your side ?

jvic1234 commented 4 years ago

The plugin is working again. Although my tv won’t turn on as it doesn’t support network standby.

I also use a Sony tv plugin. Bravia

This plugin does have the option to wake the tv up using Wol.

I know I am probably in the minority here but an option to configure the wake up feature using wol would be awesome.

The plugin does recognize when I manually turn on the tv. It can also power it off. Just unable to turn it on since Panasonic drooped the ball on this oled model. :(

AntonioMeireles commented 4 years ago

closing per @stijndevries and @jvic1234 feedback. WoL issue will continue in #30

Thank you all !