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

Settings for Disable all logs

Open mrykin opened this issue 3 years ago • 13 comments

Please add the settings for disable this logs:

[Tuya] Heard back from Yandex Outlet with command 8
[Tuya] Sending Yandex Outlet {"1":true}
[Tuya] Heard back from Yandex Outlet with command 8
[Tuya] Sending Yandex Outlet {"1":false}
[Tuya] Heard back from Yandex Outlet with command 8
[Tuya] Sending Yandex Outlet {"1":true}
[Tuya] Heard back from Yandex Outlet with command 8
[Tuya] Sending Yandex Outlet {"1":false}
[Tuya] Heard back from Yandex Outlet with command 8
[Tuya] Sending Yandex Outlet {"1":true}
[Tuya] Heard back from Yandex Outlet with command 8
[Tuya] Sending Yandex Outlet {"1":false}
[Tuya] Heard back from Yandex Outlet with command 8
[Tuya] setColorTemperature: 232
[Tuya] Sending Hall Lamp 2 {"21":"white","23":389}
[Tuya] Heard back from Hall Lamp 2 with command 8
[Tuya] setColorTemperature: 232
[Tuya] Sending Hall Lamp 2 {"21":"white","23":389}
[Tuya] Heard back from Hall Lamp 2 with command 8
[Tuya] Sending Hall Lamp 2 {"20":false}
[Tuya] Heard back from Hall Lamp 2 with command 8
[Tuya] Sending Bathroom 1 {"20":false}
[Tuya] Sending Bathroom 2 {"20":false}
[Tuya] Heard back from Bathroom 2 with command 8
[Tuya] Heard back from Bathroom 1 with command 8```

mrykin avatar Apr 25 '21 14:04 mrykin

Thanks for this! All logs other than the setColorTemperature should be hidden if you have the latest version of the plugin. A new major update will be out soon that will enable a global debug mode option which otherwise will hide ~99% of messages from this plugin.

ElphaX avatar Apr 25 '21 15:04 ElphaX

I have the last version. setColorTemperature - is not hidden. image

image

I'll wait for the update, thanks!

mrykin avatar Apr 26 '21 08:04 mrykin

The latest changes with the log clean up was not published in a release. Last release was 3/25, Log changes were 4/10.

rcoletti116 avatar May 04 '21 13:05 rcoletti116

I was including beta releases in my comment, nevertheless a public release with several updates are around the corner.

ElphaX avatar May 04 '21 14:05 ElphaX

Please provide us with a way to disable logs, or to change their verbosity to only errors. This is way too much logging... image

alejandroeclair avatar May 16 '21 09:05 alejandroeclair

Please provide us with a way to disable logs, or to change their verbosity to only errors. This is way too much logging...

As Edwin has said, an update is being worked on.

You are free to compile the plugin from the master branch yourself, or wait for a beta/release. We're not here to rush out bad updates.

iRayanKhan avatar May 16 '21 15:05 iRayanKhan

Did the debug option not make it into the August release?

CGDaveMac avatar Dec 04 '21 16:12 CGDaveMac

Wondering the same thing..

adragan10 avatar Dec 14 '21 12:12 adragan10

Please provide us with a way to disable logs, or to change their verbosity to only errors. This is way too much logging...

As Edwin has said, an update is being worked on.

You are free to compile the plugin from the master branch yourself, or wait for a beta/release. We're not here to rush out bad updates.

Is this update out yet?

shubhamshah02 avatar May 31 '22 06:05 shubhamshah02

@shubhamshah02 @adragan10 @CGDaveMac @alejandroeclair @rcoletti116 @mrykin FYI you can just change the code to hide the messages you do not want, as follows:

  1. Navigate to the module's library folder (mine is /usr/local/lib/node_modules/homebridge-tuya/lib/)
  2. Edit file TuyaAccessory.js
  3. Comment all log entries you want to get rid of (Tuya DEBUG is a good start) by adding // at the beginning of the line of code. For instance: //console.log(`[Tuya DEBUG] reconnect called for ${this.context.name}`);
  4. Restart homebridge

jfmach avatar Jun 29 '22 14:06 jfmach

^I will check this out. Thank you.

Does anyone know if this plugin been abandoned? It's been over a year since there have been any updates and it looks like this disable log function was never implemented.

dibsies avatar Jul 26 '22 20:07 dibsies

I think a ton of the logging I see comes from the bulbs tracking daylight color temps through the day. Is there any way to disable that? Example:

[Tuya] Heard back from Entry 3 with command 8 [Tuya] Heard back from Entry 1 with command 8 [Tuya] Heard back from Hall 2 with command 8 [Tuya] Heard back from Chandelier 2 with command 8 [Tuya] setColorTemperature: 215 [Tuya] Sending Chandelier 1 {"21":"white","23":440} [Tuya] Heard back from Chandelier 1 with command 8 [Tuya] setColorTemperature: 215 [Tuya] Sending Paseo 2 {"21":"white","23":440} [Tuya] setColorTemperature: 215 [Tuya] Sending Paseo 1 {"21":"white","23":440} [Tuya] setColorTemperature: 292 [Tuya] Sending Hall 1 {"21":"white","23":155} [Tuya] setColorTemperature: 215 [Tuya] Sending Chandelier 4 {"21":"white","23":440} [Tuya] setColorTemperature: 215 [Tuya] Sending Entry 2 {"21":"white","23":440} [Tuya] Heard back from Paseo 2 with command 8 [Tuya] Heard back from Paseo 1 with command 8 [Tuya] Heard back from Hall 1 with command 8 [Tuya] Heard back from Entry 2 with command 8 [Tuya] Heard back from Chandelier 4 with command 8 [Tuya] setColorTemperature: 215 [Tuya] Sending Chandelier 5 {"21":"white","23":440} [Tuya] setColorTemperature: 215 [Tuya] Sending Chandelier 3 {"21":"white","23":440} [Tuya] Heard back from Chandelier 5 with command 8 [Tuya] Heard back from Chandelier 3 with command 8 [Tuya] setColorTemperature: 215 [Tuya] Sending Entry 1 {"21":"white","23":440} [Tuya] setColorTemperature: 215 [Tuya] Sending Entry 3 {"21":"white","23":440} [Tuya] setColorTemperature: 215 [Tuya] Sending Chandelier 2 {"21":"white","23":440} [Tuya] setColorTemperature: 292 [Tuya] Sending Hall 2 {"21":"white","23":155} [Tuya] Heard back from Entry 3 with command 8

dibsies avatar Jul 28 '22 15:07 dibsies

Reviving a slightly old post :) I have pushed a fix for this in 3.1.0 (beta is published to NPM with this ready for testing). Debug logging can be toggled on using the Debug toggle from the homebridge UI.

05TEVE avatar Jan 16 '24 00:01 05TEVE