Page 1 of 1

Disable Log per device

Posted: Friday 20 July 2018 20:31
by poudenes
Hi All,

Maybe a idea that you can disable logging per device. I have a motion sensor and i don't want a log for it.
Because it logs all the movement so within couple of days have more then 1000 log lines.

WHen you can disable it per device you can turn it on or off.

Re: Disable Log per device

Posted: Tuesday 31 July 2018 8:48
by SweetPants
You can also use a cron job to clear these lines directly in the database (that's is what I do for all my motion sensors) because of excessive log growth.

Code: Select all

#!/bin/bash

DAYS=1

/usr/bin/sqlite3 /home/pi/domoticz/domoticz.db "DELETE FROM lightinglog WHERE DeviceRowID IN (88,113,114,129) AND Date <= datetime(  'now', '-$DAYS day' );"