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.
No logging of variable updates
Moderators: leecollings, remb0
- waltervl
- Posts: 6677
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: No logging of variable updates
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
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
}Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
- waltervl
- Posts: 6677
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: No logging of variable updates
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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
jberinga
- Posts: 67
- Joined: Tuesday 11 August 2015 14:20
- Target OS: NAS (Synology & others)
- Domoticz version: 2024.7
- Location: The Netherlands
- Contact:
Re: No logging of variable updates
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:
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
- waltervl
- Posts: 6677
- Joined: Monday 28 January 2019 18:48
- Target OS: Linux
- Domoticz version: 2025.1
- Location: NL
- Contact:
Re: No logging of variable updates
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.
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
-
jberinga
- Posts: 67
- Joined: Tuesday 11 August 2015 14:20
- Target OS: NAS (Synology & others)
- Domoticz version: 2024.7
- Location: The Netherlands
- Contact:
Re: No logging of variable updates
Okay, thanks for replying!
Maybe I will look for another way and your suggestion for myPIRdevice.lastUpdate.minutesAgo might work for me as well
Maybe I will look for another way and your suggestion for myPIRdevice.lastUpdate.minutesAgo might work for me as well
Who is online
Users browsing this forum: No registered users and 1 guest