Zwave addon and LARGE Openzwave log file

I’ve been using the ZWAVE addon w/o issue except that the OpenZwave logfile grows to a huge size. Every month or so when I remember I log in and clear the log file.

image

The zwave addon “configure” option has a “debug” option that is blank/empty and I wonder if it’s not provisioned correctly. I wish to disable debugging to reduce the amount of data being logged. Could not find any related documentation, although I almost input a “0” value just to test…

image

Any hints on how to stop openzwave logging so much?

Did some debugging and scanned the WT zwave addon code. The empty debug value is normal and used to pass debug options to openzwave using a comma-separated list of supported subsystems.

I input a test “false” value and obtained this error message when restarting. “false” is not an openzwave supported debug subsystem so the error message is expected.

Anyway, the excessive logging still occurs even though openzwave DEBUG_xxx is not enabled using the debug flag in WT. Not sure if it’s enabled elsewhere though…

@benfrancis did you know who is the maintainer of the z-wave addon or who can help with that?

Well, this mornings debug search lead to a configuration change that, I think works…

Found these pages about openzwave logging which led me to openzwave’s configuration file and what options it supports. See:

If you navigate to: mozilla-iot\addons\zwave-adapter\openzwave\config, there is a file called: options.xml

I added the following options to options.xml and restarted WT.

<!--  ELE:  added loglevel to restrict what's logged. 3 == Errors and higher (very quiet)-->
   <Option name="SaveLogLevel" value="3" />
  <Option name="QueueLogLevel" value="3" />
  <Option name="DumpLogLevel" value="3" />

After booting up there is practically nothing in the log file which is ok. I may lower the log file level to “5” which would include alerts & warning messages too…

@EricEdberg you could also try to open an issue on github

I settled on 3 new options to the open-zwave “options.xml” config file that limit to only ERROR, WARNING & ALERTS log level. The amount of data logged is reasonable.

Tried to locate how the open-zwave addon was EXEC’ed by WT (cli option), but it was not obvious on cursory inspection. There may be a way to pass log level options on the CLI when starting open-zwave rather than messing with the config file.

I’ll submit a ticket against the addon in any case.

Additionally, the LOCATION of the logfile should be provisional too. In my case I mount a USB stick on my Pi at boot to support docker persistence (not writing to the SD card). The open-zwave addon should be able to write to an alternate location (not on the SD card).

File: mozilla-iot\addons\zwave-adapter\openzwave\config\options.xml

<!--  ELE:  added loglevel to restrict what's logged. 3 == Errors and higher (very quiet) 5 include Alerts & Warnings too-->
<!--  ELE:  https://community.home-assistant.io/t/openzwave-logfile-not-written/41004/8   -->
<!--  ELE:  https://github.com/OpenZWave/open-zwave/wiki/Config-Options   -->
  <Option name="SaveLogLevel" value="5" />
  <Option name="QueueLogLevel" value="5" />
  <Option name="DumpLogLevel" value="5" />

I’m afraid the Z-Wave adapter module is currently lacking an owner, but pull requests are always welcome! Thank you for debugging this.