Event for Christmas

Post Reply
kllngtme
Posts: 49
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi
Domoticz version: Beta
Location: East Coast, USA
Contact:

Event for Christmas

Post by kllngtme » Thursday 07 December 2017 4:59

Could someone show me a way on getting started with this? How do I create an event to turn on a switch on Christmas at 8:00AM? I've been trying to figure out how to do it with blockly but I'm getting stuck even starting it.

Essentially I want a LMS player to play a certain playlist on Christmas. I figure I can get the player to do what I want, I just need to figure out how to control or specify the date it happens on.

Thanks in advance!

User avatar
jannl
Posts: 955
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi
Domoticz version: Beta
Location: Geleen
Contact:

Re: Event for Christmas

Post by jannl » Thursday 07 December 2017 9:08

With lua or so you can check the date and the time to activate an event, should not be that hard.

kllngtme
Posts: 49
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi
Domoticz version: Beta
Location: East Coast, USA
Contact:

Re: Event for Christmas

Post by kllngtme » Thursday 07 December 2017 21:09

I just created a dummy switch to get Christmas going that way. Now for the rest of the programming..

User avatar
EdwinK
Posts: 1281
Joined: Sunday 22 January 2017 22:46
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Event for Christmas

Post by EdwinK » Thursday 07 December 2017 22:07

Please show the finished product :)
Running latest BETA on a Pi-3 | Toon Thermostat | RFxcom | Dashticz V2 |

kllngtme
Posts: 49
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi
Domoticz version: Beta
Location: East Coast, USA
Contact:

Re: Event for Christmas

Post by kllngtme » Friday 08 December 2017 5:42

So I got it going and tested. This turns on my Squeezebox boom in my bathroom and plays a playlist I created in LMS called XmasDay on Christmas morning at 8AM

- I created a virtual switch named Christmas, then went to Switches and selected Manual Light/Switch and created a dummy switch called Xmas Day.
- Then I set a timer on the Xmas Day switch to turn the switch on 12/25/17 at 8:00AM

- I went to Events and created a blockly script.
The blockly script is using an If/Do from Control. It says:
If Xmas Day=On
Do Open url: http://username:password@192.168.1.2:90 ... 0:xx:xx:xx

You will need to put in your login credentials before hand or delete that part if you aren't using security on LMS, and you will need to get the player's mac address you want it to play on.

User avatar
Egregius
Posts: 2713
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Event for Christmas

Post by Egregius » Friday 08 December 2017 7:12

Why didn't you choose a timer for this?
Now you have a script that will check on every device update, or every minute that it is Christmas or not.

kllngtme
Posts: 49
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi
Domoticz version: Beta
Location: East Coast, USA
Contact:

Re: Event for Christmas

Post by kllngtme » Friday 08 December 2017 14:12

Egregius wrote:
Friday 08 December 2017 7:12
Why didn't you choose a timer for this?
Now you have a script that will check on every device update, or every minute that it is Christmas or not.
What do you mean exactly? Put the blockly script on a timer?

User avatar
Egregius
Posts: 2713
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: Beta
Location: Beitem, BE
Contact:

Re: Event for Christmas

Post by Egregius » Friday 08 December 2017 16:05

I don't use blockly :P
But it should be easy to have a script triggered only by 1 switch, in worst case with the on-action.

kllngtme
Posts: 49
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi
Domoticz version: Beta
Location: East Coast, USA
Contact:

Re: Event for Christmas

Post by kllngtme » Friday 08 December 2017 17:24

Egregius wrote:
Friday 08 December 2017 16:05
I don't use blockly :P
But it should be easy to have a script triggered only by 1 switch, in worst case with the on-action.
LOL - I don't know WHY I did this now that you said that. I just did more work than I needed. LOL. Thanks for the advice!

kuifje
Posts: 16
Joined: Wednesday 25 October 2017 16:38
Target OS: Windows
Domoticz version:
Contact:

Re: Event for Christmas

Post by kuifje » Monday 11 December 2017 0:47

It's done in the chapter switches in a switch-timers. There you can choose when a switch is turned on or off on a specific date and time.

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

Re: Event for Christmas

Post by markjgabb » Monday 11 December 2017 1:41

ok obviously im really dense on this one....how do i set a swtich for a specific time and date? im now wanting to do something similar....
V 3.8153 RPI 3
RFlink 334 mhz
mysensors
broadlink
wemo

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

Re: Event for Christmas

Post by markjgabb » Tuesday 12 December 2017 11:14

Ok have now been through all. Menus on demoticz and I think half of the wiki. But no luck at all. How did you guys resolve this.... I would just like a timer that runs at 7am on the 24th of december
V 3.8153 RPI 3
RFlink 334 mhz
mysensors
broadlink
wemo

kllngtme
Posts: 49
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi
Domoticz version: Beta
Location: East Coast, USA
Contact:

Re: Event for Christmas

Post by kllngtme » Tuesday 12 December 2017 16:33

markjgabb wrote:
Tuesday 12 December 2017 11:14
Ok have now been through all. Menus on demoticz and I think half of the wiki. But no luck at all. How did you guys resolve this.... I would just like a timer that runs at 7am on the 24th of december
I kinda went over what I did, step by step almost. But the beginning basics to get it going, here you go:

Click setup, click hardware. Under type select Dummy and name it to whatever you want. It will show up under your hardware as what you named it.
Now create the virtual switch. Go to swtiches, click Manual Light/Switch - name it what you want and select the dummy you just created and named in the previous step.

That gets you the instance of a virtual switch. Now create a timer on that switch for an On event. Then you can have or create things to do once that switch turns on based on the timer event.

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

Re: Event for Christmas

Post by markjgabb » Tuesday 12 December 2017 22:58

My apologies for not being clear. I had assumed you had found a solution for Switchibg on a particular date. Or 24/12. Unless I have an issue I can only select day of the week or such things under my timer section
V 3.8153 RPI 3
RFlink 334 mhz
mysensors
broadlink
wemo

Nautilus
Posts: 760
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi
Domoticz version: beta
Location: Finland
Contact:

Re: Event for Christmas

Post by Nautilus » Wednesday 13 December 2017 0:24

markjgabb wrote:
Tuesday 12 December 2017 22:58
My apologies for not being clear. I had assumed you had found a solution for Switchibg on a particular date. Or 24/12. Unless I have an issue I can only select day of the week or such things under my timer section
In the "Type" drop-down menu you should have plenty of options, e.g. "Yearly" where you can set a particular date and time. If for some reason you don't see these you can try clearing cache (also appcache) and/or update to latest (beta) version.

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

Re: Event for Christmas

Post by markjgabb » Wednesday 13 December 2017 0:27

@nautilus champion...that was the exact issue.... cleared chache and options all appeared

thanks for that, this will be magnificent
V 3.8153 RPI 3
RFlink 334 mhz
mysensors
broadlink
wemo

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest