Alarm clock

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
kar12
Posts: 2
Joined: Thursday 24 December 2020 15:53
Target OS: Windows
Domoticz version:

Alarm clock

Post by kar12 »

Alarm clock
Hello all

Do you know how to setup an alarm clock to action a switch ?

I'd like when the alarm in on , switch on a device like a coffee machine.
Do you know any device to do that?
wkossen
Posts: 62
Joined: Friday 06 November 2020 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Re: Alarm clock

Post by wkossen »

Interesting idea. i'm no coder, but my hunch is that you could create a script that runs every day at a specific time.

to start you might try something like:

Code: Select all

return {
	on = {
		timer = {
            'at 6:30 on mon, tue, wed, thu, fri',
            'at 8:00 on sat, sun',
            },
	},
	execute = function(domoticz, device)
		if (devices.on) then 
 			domoticz.notify('Time to get up!', 'Time to get up...', PRIORITY_HIGH, nil, nil)    
	end
end
}
then you could try creating a user specified parameter with get up times and get data from those in the script. and instead of notifications you could do commands to turn on lights, sockets or other devices. haven't done that yet, so i have no example code, but there is plenty on the forum, i guess. Hope this helps you get going. And I'll follow this to implement it myself as well :)

Cheers
User avatar
kiddigital
Posts: 438
Joined: Thursday 10 August 2017 6:52
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: Netherlands
Contact:

Re: Alarm clock

Post by kiddigital »

kar12 wrote:Alarm clock
Hello all

Do you know how to setup an alarm clock to action a switch ?

I'd like when the alarm in on , switch on a device like a coffee machine.
Do you know any device to do that?
Take a look at devices that have a ‘timer’ option. Most switches and other devices that can ‘set’ things.

For example your ‘coffeemachine’ switch could have its own timer.

If you want to ‘react’ to another device, than you can make use of the ‘notification’ system.

Should be possible to achieve this without the need to ‘program’ anything.

You can also look at Blockly/dzVents possibilities.

Let us know if and how you succeeded.
One RPi with Domoticz, RFX433e, aeon labs z-wave plus stick GEN5, ha-bridge 5.4.0 for Alexa, Philips Hue Bridge, Pimoroni Automation Hat
One RPi with Pi foundation standard touch screen to display Dashticz
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest