iRayanKhan / homebridge-tuya

A Homebridge plugin to control Tuya devices locally.
MIT License
403 stars 166 forks source link

Settings for Disable all logs #265

Open mrykin opened 3 years ago

mrykin commented 3 years ago

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```
ElphaX commented 3 years ago

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.

mrykin commented 3 years ago

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

image

I'll wait for the update, thanks!

rcoletti116 commented 3 years ago

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

ElphaX commented 3 years ago

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

alejandroeclair commented 3 years ago

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

image
iRayanKhan commented 3 years ago

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.

CGDaveMac commented 2 years ago

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

adragan10 commented 2 years ago

Wondering the same thing..

shubhamshah02 commented 2 years ago

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?

jfmach commented 2 years ago

@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
dibsies commented 2 years ago

^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 commented 2 years ago

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

05TEVE commented 10 months ago

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.

Faisalthe01 commented 2 weeks ago

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.

Hi @05TEVE I am on 3.1.1, can you please let me know where to find the Debug toggle?