Disable Log per device

Use this forum to discuss possible implementation of a new feature before opening a ticket.
A developer shall edit the topic title with "[xxx]" where xxx is the id of the accompanying tracker id.
Duplicate posts about the same id. +1 posts are not allowed.

Moderators: leecollings, remb0

Post Reply
poudenes
Posts: 667
Joined: Wednesday 08 March 2017 9:42
Target OS: Linux
Domoticz version: 3.8993
Location: Amsterdam
Contact:

Disable Log per device

Post 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.
RPi3 B+, Debain Stretch, Domoticz, Homebridge, Dashticz, RFLink, Milight, Z-Wave, Fibaro, Nanoleaf, Nest, Harmony Hub, Now try to understand pass2php
SweetPants

Re: Disable Log per device

Post 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' );"
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest