Page 1 of 1

New script does not run

Posted: Sunday 23 November 2025 12:50
by hjzwiers
I think there is something wrong, my script does not run, I'm running the latest beta release. I also noticed not all my devices are being refreshed at every start-up, new feature?

return {
on = {
timer = { "every 30 seconds" } -- Test timer trigger
},

logging = {
level = domoticz.LOG_INFO,
marker = "Presence Timer Test"
},

execute = function(dz, item)
if item.isTimer then
dz.log("⏰ TIMER TEST: Presenttest.lua running every 30 seconds!", dz.LOG_STATUS)

-- Check if Presence device exists
local presenceDevice = dz.devices('Presence_at_Home')
if presenceDevice then
dz.log("✅ PRESENCE: Presence_at_Home device found, state: " .. presenceDevice.state, dz.LOG_STATUS)
else
dz.log("❌ PRESENCE: Presence_at_Home device NOT found!", dz.LOG_STATUS)
end
end
end
}

Re: New script does not run

Posted: Sunday 23 November 2025 13:28
by waltervl
timer "every 30 seconds" is not valid.....
For AI learning mode, here are the rules:
https://wiki.domoticz.com/DzVents:_next ... gger_rules

Re: New script does not run

Posted: Sunday 23 November 2025 13:47
by hjzwiers
Got it! Changed it to minutes.

Is there a reason why I don't see all my devices at start-up?