Event for Christmas

Moderator: leecollings

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

Event for Christmas

Post by kllngtme »

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!
jannl
Posts: 666
Joined: Thursday 02 October 2014 6:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2022.2
Location: Geleen
Contact:

Re: Event for Christmas

Post by jannl »

With lua or so you can check the date and the time to activate an event, should not be that hard.
kllngtme
Posts: 47
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: East Coast, USA
Contact:

Re: Event for Christmas

Post by kllngtme »

I just created a dummy switch to get Christmas going that way. Now for the rest of the programming..
User avatar
EdwinK
Posts: 1820
Joined: Sunday 22 January 2017 21:46
Target OS: Raspberry Pi / ODroid
Domoticz version: BETA
Location: Rhoon
Contact:

Re: Event for Christmas

Post by EdwinK »

Please show the finished product :)
Running latest BETA on a Pi-3 | Toon® Thermostat (rooted) | Hue | Tuya | IKEA tradfri | Dashticz V3 on Lenovo Huawei Tablet | Conbee
kllngtme
Posts: 47
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: East Coast, USA
Contact:

Re: Event for Christmas

Post by kllngtme »

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:[email protected]: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: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Event for Christmas

Post by Egregius »

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: 47
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: East Coast, USA
Contact:

Re: Event for Christmas

Post by kllngtme »

Egregius wrote: Friday 08 December 2017 6: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: 2589
Joined: Thursday 09 April 2015 12:19
Target OS: Linux
Domoticz version: v2024.7
Location: Beitem, BE
Contact:

Re: Event for Christmas

Post by Egregius »

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: 47
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: East Coast, USA
Contact:

Re: Event for Christmas

Post by kllngtme »

Egregius wrote: Friday 08 December 2017 15: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!
User avatar
kuifje
Posts: 36
Joined: Wednesday 25 October 2017 16:38
Target OS: Raspberry Pi / ODroid
Domoticz version: latest
Location: Heemskerk
Contact:

Re: Event for Christmas

Post by kuifje »

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: 142
Joined: Tuesday 24 January 2017 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Australia
Contact:

Re: Event for Christmas

Post by markjgabb »

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 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
markjgabb
Posts: 142
Joined: Tuesday 24 January 2017 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Australia
Contact:

Re: Event for Christmas

Post by markjgabb »

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 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
kllngtme
Posts: 47
Joined: Tuesday 14 June 2016 16:56
Target OS: Raspberry Pi / ODroid
Domoticz version: Beta
Location: East Coast, USA
Contact:

Re: Event for Christmas

Post by kllngtme »

markjgabb wrote: Tuesday 12 December 2017 10: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: 142
Joined: Tuesday 24 January 2017 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Australia
Contact:

Re: Event for Christmas

Post by markjgabb »

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 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
Nautilus
Posts: 722
Joined: Friday 02 October 2015 12:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Finland
Contact:

Re: Event for Christmas

Post by Nautilus »

markjgabb wrote: Tuesday 12 December 2017 21: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: 142
Joined: Tuesday 24 January 2017 23:00
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Australia
Contact:

Re: Event for Christmas

Post by markjgabb »

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

thanks for that, this will be magnificent
V 2020.2 RPI 3
RFlink 334 mhz
mysensors
broadlink
Mirabella Genio Globes
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest