mmende / homebridge-samsungtv-control2

homebridge-samsungtv-control2
MIT License
71 stars 17 forks source link

Slow down error in HB log #55

Open PrimaryInc opened 3 years ago

PrimaryInc commented 3 years ago

Hi,

just noticed that i get a warning messages in HB that the this plugin slows down homebridge.

Slowdown

https://github.com/homebridge/homebridge/wiki/Characteristic-Warnings

I've installed plugin but never got it to work as expected. Was hoping for a fix, but do understand it is time consuming and perhaps not even possible to fix. Non the less, just wanted to update you on the message from HB logs :)

TheEngineerGuy commented 3 years ago

Which version of HB are you running?

PrimaryInc commented 3 years ago

Hi, v 1.3.2, latest as of now.

TheEngineerGuy commented 3 years ago

Are you not getting this error in you HB since 1.3.0?

TypeError: Cannot read property 'log' of undefined at debug (/usr/lib/node_modules/homebridge/src/logger.ts:143:10) at checkDeviceDetails (/usr/lib/node_modules/homebridge-samsungtv-control/src/utils/detectDevices.ts:85:5) at processTicksAndRejections (node:internal/process/task_queues:93:5)

My HB service goes into a restart loop if this plugin is enabled since 1.3.0

PrimaryInc commented 3 years ago

I did noticed message in logs after upgrading from 1.2.7 to 1.3.1 and stil present in 1.3.2 Now my HB works fine, but not sure if performance is severely impaired.

TheEngineerGuy commented 3 years ago

hmm... so you still see that error in 1.3.2, but it is not stuck in restart loop? Weird, I tried 1.3.2 this morning and it was still restart looping after throwing that error.

TheEngineerGuy commented 3 years ago

Can you paste your config for this plugin here? Maybe I have something unwanted in my config.

PrimaryInc commented 3 years ago

{ "devices": [ { "name": "TV Livingroom", "usn": "UUID", "token": "string", "delay": 100 } ], "platform": "SamsungTVControl" }

This is what I have, but I dont get my pairing to work, I have a open issue on that as well. Might be the reason that my does not loop. Removed UUID and Token from config over.

TheEngineerGuy commented 3 years ago

Other than me never having to use Token and delay our configs are identical. My hunt continues. And hopefully @mmende can take a peek.

PrimaryInc commented 3 years ago

25 ia my other issue if makes any sence to look at it.

mmende commented 3 years ago

@TheEngineerGuy The ...property 'log' of undefined... issue should now hopefully be fixed with the latest patch (v2.0.2). This however does not fix the slow down error. I guess homebridge initially requests all characteristics at once and the subsequent processing of all of these requests by the connected TV's just takes too long which is then interpreted as timeout.

iperniaf commented 3 years ago

property 'log' of undefined fixed for me thx @mmende