New script does not run Topic is solved

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
hjzwiers
Posts: 289
Joined: Friday 12 January 2018 8:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

New script does not run

Post 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
}
User avatar
waltervl
Posts: 6677
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2025.1
Location: NL
Contact:

Re: New script does not run

Post 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
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
hjzwiers
Posts: 289
Joined: Friday 12 January 2018 8:26
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: New script does not run

Post by hjzwiers »

Got it! Changed it to minutes.

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

Who is online

Users browsing this forum: No registered users and 1 guest