Time actions

Easy to use, 100% Lua-based event scripting framework.

Moderator: leecollings

Post Reply
arjan93
Posts: 25
Joined: Friday 16 November 2018 11:58
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Time actions

Post by arjan93 »

Hii all,

I`m new with dzVents programming and for so far it works well for me.
There is only one thing i don`t get work for now. I have a program with multiple timer actions.
Is there a way to simply activate a switch or something on a specifically time?

I mean something like:

if (domoticz.time == '13:52') then
Test.switchOn()
rrozema
Posts: 470
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Delft
Contact:

Re: Time actions

Post by rrozema »

You don't need a script for that: you can do that in the user interface. Click on the "Timers" button in the 'Switches' tab and add the timer using the "On time" option.
User avatar
heggink
Posts: 980
Joined: Tuesday 08 September 2015 21:44
Target OS: Raspberry Pi / ODroid
Domoticz version: 12451
Location: NL
Contact:

Re: Time actions

Post by heggink »

If you wanted to use dzvents, you could use a simple timer trigger rule:

Code: Select all

on = { 
        timer = { 'at 13:45' } ,
...
You can combine timer rules with device trigger rules in which case you can check what triggered the script. It's quite well described in the wiki (https://www.domoticz.com/wiki/DzVents:_ ... gger_rules) but feel free PM me if you need more help.

H
Docker in Truenas scale, close to latest beta
DASHTICZ 🙃
RFXCOM, zwavejs2mqtt, zigbee2mqtt,
P1 meter & solar panel
Google home, Wifi Cams motion detection
Geofence iCloud, Bluetooth & Wifi ping
Harmony hub, Nest, lots more :-)
solarboy
Posts: 345
Joined: Thursday 01 November 2018 19:47
Target OS: Raspberry Pi / ODroid
Domoticz version: 2024.6
Location: Portugal
Contact:

Re: Time actions

Post by solarboy »

If however, you do want to have this in a script function, how could you achieve it ?
Intel NUC with Ubuntu Server VM (Proxmox),mosquitto(docker),RFXtrx433E,zwavejsUI (docker),Zigbee2mqtt(docker),SMA Hub (docker),Harmony Hub plugin, Kodi plugin,Homebridge(docker)+Google Home,APC UPS,SMA Modbus,Mitsubishi MQTT, Broadlink,Dombus
rrozema
Posts: 470
Joined: Thursday 26 October 2017 13:37
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Delft
Contact:

Re: Time actions

Post by rrozema »

dzvents is a script function.

Go into the Events page ('Settings' -> 'More Options' -> 'Events'), click the +-sign at the right most of the tab header(s). Select 'dzvents' -> 'Timer' and you'll get a newly created example script with lots of timer-trigger examples to choose from.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest