Share: alarm lights and music

Post Reply
markjgabb
Posts: 127
Joined: Wednesday 25 January 2017 0:00
Target OS: Raspberry Pi
Domoticz version: 3.8153
Location: Australia
Contact:

Share: alarm lights and music

Post by markjgabb » Saturday 05 August 2017 13:31

hi everyone thought i would share a really quick one ive made for anyone else who is interested

its a DZvents for the morning....

i have a tablet beside my bed with tasker on it
i have a scene to set a alarm time for the morning...
when tasker alarm time = true it sends a play command to the kodi box in my room, and sends a ariable update command to domoticz...
the rest is history

Code: Select all

-- Check the wiki at
-- http://www.domoticz.com/wiki/%27dzVents%27:_next_generation_LUA_scripting
return {

	-- 'active' controls if this entire script is considered or not
	active = true, -- set to false to disable this script

	-- trigger
	-- can be a combination:
	on = {
	variables = { 'Alarm'
	    },
	},

	-- actual event code
	-- in case of a timer event or security event, device == nil
	execute = function(domoticz, device)
		--[[

		The domoticz object holds all information about your Domoticz system. E.g.:

		local myDevice = domoticz.devices('myDevice')
		local myVariable = domoticz.variables('myUserVariable')
		local myGroup = domoticz.groups('myGroup')
		local myScene = domoticz.sceneds('myScene')

		The device object is the device that was triggered due to the device in the 'on' section above.
		]] --
		-- example
		if (myUserVariable.state == 'yes') then
		    domoticz.myUserVariable('Alarm').set('no')
			domoticz.devices('Limitless Lounge All').switchOn().forMin(45)
			
		end
	end
}
V 3.8153 RPI 3
RFlink 334 mhz
mysensors
broadlink
wemo

Post Reply

Who is online

Users browsing this forum: No registered users and 8 guests