My Zwave log keeps expanding with my apprx 30 zwave devices. Is there a way to disable logging every zwave detail? Or would it be possible to move the logfile to a backup dir every now and then, for example using an automation?
I created a .sh file with this command:
mv -f OZW_Log.txt ./archive/OZW_Log.txt
then I defined this in configuration.yaml
shell_command:
cleanlog: ./cleanlog.sh
And finally created an automation:
- id: '1234'
alias: clean the log
initial_state: true
trigger:
- platform: time
at: "00:00:00"
action:
- service: shell_command.cleanlog
But is does’n seem to work because the data element is missing for the action. (what should I define as data element to call a shell script?)
You don’t have to stop the logging completely. If you prefer, you can choose a log level in options.xml - see Open ZWave Config Options. I have mine set to 4 (warning or higher) like this:
Additionally, if you want to rotate the log. You are probably better off doing it outside of HA using the OS native logrotate utility. Instead of an automation (IMO)