timer, every 5 minutes ?

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

timer, every 5 minutes ?

Post by tontze »

Do i remember wrong, or DID domoticz have "every nn:nn" timer at some point under switch preferences ?

I would like to flip a switch every 5 minutes, but i really cannot use "on time" for this ...

-T
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: timer, every 5 minutes ?

Post by waaren »

You need a script to do this. With dzVents it would be very simple to implement.

Code: Select all

 return {
        
    on = { timer = {"every 5 minutes"} },
    
	execute = function(domoticz, _)
		local myDevice = domoticz.devices("your device name")
    	
		if myDevice.state == "On" then
			myDevice.switchOff()
		else
			myDevice.switchOn()
		end
	end		
}
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: timer, every 5 minutes ?

Post by tontze »

dont have dzvents, what it looks like in lua ?
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
User avatar
waaren
Posts: 6028
Joined: Tuesday 03 January 2017 14:18
Target OS: Linux
Domoticz version: Beta
Location: Netherlands
Contact:

Re: timer, every 5 minutes ?

Post by waaren »

dzVents is integrated in domoticz. So unless you have a very old version of domoticz you should have it.

[ad alert] dzVents /diː ziː vɛnts/, short for Domoticz Easy Events, brings Lua scripting in Domoticz to a whole new level. Writing scripts for Domoticz has never been so easy. Not only can you define triggers more easily, and have full control over timer-based scripts with extensive scheduling support, dzVents presents you with an easy to use API to all necessary information in Domoticz. No longer do you have to combine all kinds of information given to you by Domoticz in many different data tables. You don't have to construct complex commandArrays anymore. dzVents encapsulates all the Domoticz peculiarities regarding controlling and querying your devices. And on top of that, script performance has increased a lot if you have many scripts because Domoticz will fetch all device information only once for all your device scripts and timer scripts. And ... it is 100% Lua! So if you already have a bunch of event scripts for Domoticz, upgrading should be fairly easy. [ad alert]
Debian buster, bullseye on RPI-4, Intel NUC.
dz Beta, Z-Wave, RFLink, RFXtrx433e, P1, Youless, Hue, Yeelight, Xiaomi, MQTT
==>> dzVents wiki
tontze
Posts: 317
Joined: Thursday 12 January 2017 15:30
Target OS: Linux
Domoticz version: Beta Ch
Location: Finland
Contact:

Re: timer, every 5 minutes ?

Post by tontze »

waaren wrote: Friday 16 March 2018 7:19 dzVents is integrated in domoticz. So unless you have a very old version of domoticz you should have it.

[ad alert] dzVents /diː ziː vɛnts/, short for Domoticz Easy Events, brings Lua scripting in Domoticz to a whole new level. Writing scripts for Domoticz has never been so easy. Not only can you define triggers more easily, and have full control over timer-based scripts with extensive scheduling support, dzVents presents you with an easy to use API to all necessary information in Domoticz. No longer do you have to combine all kinds of information given to you by Domoticz in many different data tables. You don't have to construct complex commandArrays anymore. dzVents encapsulates all the Domoticz peculiarities regarding controlling and querying your devices. And on top of that, script performance has increased a lot if you have many scripts because Domoticz will fetch all device information only once for all your device scripts and timer scripts. And ... it is 100% Lua! So if you already have a bunch of event scripts for Domoticz, upgrading should be fairly easy. [ad alert]
Ah okay, i just remember back in time when i installed it for the test :)
-----------------------------------------
Smartthings
zigbee2mqtt
RFLink 433mhz / Nrf 2.4Ghz
Mi Light
esp8266MiLight Hub
OpenHab/HomeAssistant/Domoticz
HP T610 & Debian 5.10.19-1 x86_64[/b]
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest