Page 1 of 1

No logging of variable updates

Posted: Wednesday 11 February 2026 14:42
by jberinga
I have a Dzvents script that will update a user variable every minute and makes a note of the variable update in the log:
2026-02-11 13:51:00.735 Status: Set UserVariable nomotionCounter = 380

Is it possible not to update the log with (this) User variable updates? As this is information that I don't really need in the log.

Re: No logging of variable updates

Posted: Wednesday 11 February 2026 16:43
by waltervl
What version of Domoticz are you on?
Do you have a log statement in your script?
What is the log settings in your script?
What are the log settings of dzvents in menu setup settings - other?

To play with logging check the logging dzvents template in the eventeditor

Code: Select all

-- This example shows you how to work with various log levels
--
-- The script is triggered by a dummy switch called 'test'
--
-- when no log level is specified, the level is taken from the default application settings (dzVents)
--
-- when you specify LOG_STATUS as minimum log level, no logs will be displayed when using LOG_INFO or LOG_DEBUG
--
-- Order is: LOG_DEBUG, LOG_INFO, LOG_STATUS, LOG_ERROR
--
-- LOG_DEBUG will also cause Execution Info to be displayed (start/finished)
--
return {
	on = {
		devices = {
			'test'
		}
	},
	logging = {
		marker = 'log_script',
		level = domoticz.LOG_DEBUG
	},
	execute = function(domoticz, device)
		domoticz.log('INFO log line!', domoticz.LOG_INFO)
		domoticz.log('STATUS log line!', domoticz.LOG_STATUS)
		domoticz.log('ERROR log line!', domoticz.LOG_ERROR)
		domoticz.log('DEBUG log line!', domoticz.LOG_DEBUG)
	end
}

Re: No logging of variable updates

Posted: Wednesday 11 February 2026 16:49
by waltervl
I by the way just check in dzvents on myPIRdevice.lastUpdate.minutesAgo attribute. If that is longer then x minutes there is no movement for x minutes. No need to put it in a user variable.

Re: No logging of variable updates

Posted: Friday 13 February 2026 14:16
by jberinga
My Domotizc version: v2025.2 (build 17076) and no log statements in this script.
In the settings the log settings of dzvents is enabled.

I was hoping that you could disable the log level of variables, like you can for devices on the hardware page.

This is the script:
Spoiler: show
return {
on = {
timer = { 'every minute' },
devices = { 'SensorMotionKeuken', 'Voordeur', 'NaarBed', 'EntertainmentUit' },
},

execute = function(domoticz)

if
domoticz.devices('SensorMotionKeuken').state == 'Off' and
domoticz.devices('EntertainmentUit').state == 'On'
then
domoticz.variables('nomotionCounter').set(domoticz.variables('nomotionCounter').value + 1)
end

if
domoticz.devices('IemandThuis').state == 'On' and
domoticz.variables('nomotionCounter').value == 10
then
domoticz.devices('IemandThuis').switchOff()
end

if
domoticz.devices('IemandThuis').state == 'On' and
domoticz.devices('NaarBed').state == 'On'
then
domoticz.devices('IemandThuis').switchOff()
end

if
domoticz.devices('IemandThuis').state == 'Off' and
(domoticz.devices('SensorMotionKeuken').state == 'On' or
domoticz.devices('Voordeur').state == 'Open')
then
domoticz.devices('IemandThuis').switchOn()
domoticz.variables('nomotionCounter').set(0)
end

if
(domoticz.devices('SensorMotionKeuken').state == 'On' or
domoticz.devices('Voordeur').state == 'Open' or
domoticz.devices('EntertainmentUit').state == 'Off') and
domoticz.variables('nomotionCounter').value ~= 0
then
domoticz.variables('nomotionCounter').set(0)
end

if
domoticz.devices('Thuis').state == 'On' and
domoticz.variables('nomotionCounter').value == 720
then
domoticz.devices('Thuis').switchOff()
end

if
domoticz.devices('Thuis').state == 'Off' and
(domoticz.devices('SensorMotionKeuken').state == 'On' or
domoticz.devices('Voordeur').state == 'Open')
then
domoticz.devices('Thuis').switchOn()
end

if
domoticz.devices('Opstaan').state == 'On' and
domoticz.devices('SensorMotionKeuken').state == 'On'
then
domoticz.devices('Opstaan').switchOff()
end

if
domoticz.devices('NaarBed').state == 'On' and
domoticz.devices('SensorMotionKeuken').state == 'On' and
domoticz.time.matchesRule('between 4:00 and 22:00')
then
domoticz.devices('NaarBed').switchOff()
end

end
}

Re: No logging of variable updates

Posted: Friday 13 February 2026 18:44
by waltervl
Indeed that seems to be a system log and not a scripting log. As far as I know there is no possibility to switch off logging for user variables as it is not a hardware gateway.

Re: No logging of variable updates

Posted: Friday 13 February 2026 19:19
by jberinga
Okay, thanks for replying!
Maybe I will look for another way and your suggestion for myPIRdevice.lastUpdate.minutesAgo might work for me as well