homebridge-plugins / homebridge-roomba2

Homebridge plugin to connect iRobot Roomba devices with Homebridge/HomeKit.
MIT License
144 stars 17 forks source link

Log SPAM #38

Closed solbadguy2010 closed 2 years ago

solbadguy2010 commented 3 years ago

Hi, would i be possible to move this Messages to Homebridge Debug Mode? In the normal Mode they only spam my log.

[23/03/2021, 23:01:08] [Roomba] Running status requested [23/03/2021, 23:01:08] [Roomba] Docked status requested [23/03/2021, 23:01:08] [Roomba] Bin status requested [23/03/2021, 23:01:08] [Roomba] Battery status requested [23/03/2021, 23:01:08] [Roomba] Running status requested [23/03/2021, 23:01:08] [Roomba] Docked status requested [23/03/2021, 23:01:08] [Roomba] Bin status requested [23/03/2021, 23:01:08] [Roomba] Battery status requested [23/03/2021, 23:01:09] [Roomba] Battery status requested [23/03/2021, 23:01:09] [Roomba] Running status requested [23/03/2021, 23:01:09] [Roomba] Docked status requested [23/03/2021, 23:01:09] [Roomba] Bin status requested [23/03/2021, 23:01:09] [Roomba] Battery status requested [23/03/2021, 23:01:11] [Roomba] Running status requested [23/03/2021, 23:01:11] [Roomba] Battery status requested [23/03/2021, 23:01:11] [Roomba] Docked status requested [23/03/2021, 23:03:22] [Roomba] Running status requested [23/03/2021, 23:03:22] [Roomba] Battery status requested [23/03/2021, 23:03:22] [Roomba] Docked status requested

ahrenstein commented 3 years ago

Yeah this really makes the log useless for debugging things to the point where I'm tempted to just remove this plugin.

d2ustin commented 3 years ago

bump! agree with this!!!!

solbadguy2010 commented 2 years ago

If someone is still interested in a solution, karlvr commited a change here https://github.com/karlvr/homebridge-roomba2/commit/450333e3604efab9784f1d1e1e17b21da2dba9a9 to move the "requested" log entries to the debug mode:

Sadly the dev never merged this to a published version, but you can edit the local file yourself and do the changes doing this:

  1. open homebridge website, click the three dots and start the Terminal
  2. type "sudo nano /usr/local/lib/node_modules/homebridge-roomba2/index.js"
  3. search the code for all "this.log" mentioned in the URL above and change them to "this.log.debug"
  4. save by pressing strg + o, then enter. Leave Nano with strg + x
  5. restart Homebridge

Warnings: The path in 2. is for the official Homebridge Image. It may be different on manual installations. A future update of the Plugin will overwrite these changes, but i do not see this to happen soon. Also, if you restore Homebridge from Backup or reinstall the Plugin you will have to do this changes again.

vsenn commented 2 years ago

@solbadguy2010 thank you for sharing this! This workaround works great on my setup, I managed to change all messages to debug and clean up the log.

For those with Homebridge Docker version the path is /homebridge/node_modules/homebridge-roomba2/index.js and vi editor just fine for the job.

solbadguy2010 commented 2 years ago

Solved with V1.2.2