vinodsr / node-red-contrib-tuya-smart-device

a node-red module for managing tuya smart devices
https://flows.nodered.org/node/node-red-contrib-tuya-smart-device
MIT License
47 stars 15 forks source link

Cluttered log file #140

Open fmarzocca opened 10 months ago

fmarzocca commented 10 months ago

I noticed that this palette is cluttering too much the log. I have hundreds of these lines:

2024-01-12T08:21:30.828663+01:00 liliorest Node-RED[478]: 12 Jan 08:21:30 - [info] [tuya-smart-device:Stato Luce Monitor] Recieved input : {"payload":{"operation":"CONTROL","action":"CONNECT"},"tab":3,"name":"Studio Francesco","socketid":"RU60YUA6-U18sRAVAAD_","socketip":"10.0.0.66","params":{},"_msgid":"622328b8415820d8"}
2024-01-12T08:24:06.240312+01:00 liliorest Node-RED[478]: 12 Jan 08:24:06 - [info] [tuya-smart-device:Stato Luce Monitor] Recieved input : {"payload":{"operation":"CONTROL","action":"CONNECT"},"tab":3,"name":"Studio Francesco","socketid":"uVjK3Ia7VgLGpRlPAAEB","socketip":"10.0.0.66","params":{},"_msgid":"0f6e8b78e0a5a216"}

Is there a way to reduce the logging of the palette?

msillano commented 10 months ago

Do you need to reduce the Log or the data throughput? Usually, the log is not a problem: I copy-paste the log to an editor (Notepad++), and then... The unique solution for the log is to customize the code by adding a filter based on the ID that leads to the decimation of messages.

But, I see from messages that you have a serious CONNECTION problem. Usually, any device sends only one CONNECTION message at the start! Or (alternative) the device is intentionally disconnected and you want to reduce messages? See ISSUE#83. One (partial) solution is to use a dynamic connection interval mechanism. For example, see 'dynamic retry' here: https://github.com/msillano/tuyaDAEMON/wiki/20.-ver.-2.0--milestones#devices-control

About the data throughput (I have devices that send data every second !) some options are presented here: https://github.com/msillano/tuyaDEAMON-applications/tree/main/daemon.energy#step-1-fine-tuning-tuyadeamon Best regards.

fmarzocca commented 10 months ago

Hi Marco,

no, the problem is the log which gets full of "tuya" lines. I am used to watch and verify the log daily, and those hundreds of lines keep me confused.

8666 commented 10 months ago

I have this problem too. I have a device that is not always connected to the socket, and nodered is retrying to connect. It is not needed to log every connection error, maybe only once when device goes offline.

I send to logs to a graylog server and it fills the storage / mess the stats. I miss real error messages

fmarzocca commented 9 months ago

If this cannot be fixed, I must remove the palette as I am missing important NodeRed messages. Can't continue like this.

8666 commented 8 months ago

I get spammed with messages like this. Can not find where this is in the source code:

"Error: Error from socket: connect EHOSTUNREACH 192.168.x.x:6668" There are also "Device not connected. Can't send the GET commmand" but is not that frequent

Both errors are fine, sometimes it is OK if the device is unplugged

8666 commented 4 months ago

I see there is new logging options in 0.5.3 but they are not visible in node red UI

vinodsr commented 4 months ago

Please share a screenshot also try clearing cache and restarting node red

On Tue, 30 Jul 2024 at 3:15 AM, 8666 @.***> wrote:

I see there is new logging options in 0.5.3 but they are not visible in node red UI

— Reply to this email directly, view it on GitHub https://github.com/vinodsr/node-red-contrib-tuya-smart-device/issues/140#issuecomment-2257064037, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQ6OGTR5GARCOIZ3IDCLLZO2ZX3AVCNFSM6AAAAABBX53GI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDENJXGA3DIMBTG4 . You are receiving this because you are subscribed to this thread.Message ID: <vinodsr/node-red-contrib-tuya-smart-device/issues/140/2257064037@ github.com>

8666 commented 2 months ago

What version of NodeRed do I need to run this properly. It is getting messy as I have bunch of plugins

vinodsr commented 2 months ago

It supports the latest version

Thanks

Vinod S R

On Mon, 2 Sep 2024 at 6:56 PM, 8666 @.***> wrote:

What version of NodeRed do I need to run this properly. It is getting messy as I have bunch of plugins

— Reply to this email directly, view it on GitHub https://github.com/vinodsr/node-red-contrib-tuya-smart-device/issues/140#issuecomment-2324760495, or unsubscribe https://github.com/notifications/unsubscribe-auth/AADQ6OE4S42ZCKOD4TYT6KLZURRRBAVCNFSM6AAAAABBX53GI2VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMRUG43DANBZGU . You are receiving this because you commented.Message ID: @.*** com>