Is it possible to set if date is ...?

Post Reply
bkrajnc
Posts: 6
Joined: Tuesday 04 July 2017 20:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Is it possible to set if date is ...?

Post by bkrajnc » Friday 22 September 2017 20:33

Hello

I would like to set If date is 1.januar and Time is 7:00...... Is it possible do this with Blocky, to set specific DATE?

Best regards
Boris

bkrajnc
Posts: 6
Joined: Tuesday 04 July 2017 20:00
Target OS: Raspberry Pi
Domoticz version:
Contact:

Re: Is it possible to set if date is ...?

Post by bkrajnc » Saturday 23 September 2017 16:33

...nobody ? :cry:

User avatar
Derik
Posts: 1890
Joined: Friday 18 October 2013 23:33
Target OS: Raspberry Pi
Domoticz version: BETA
Location: Arnhem/Nijmegen Nederland
Contact:

Re: Is it possible to set if date is ...?

Post by Derik » Saturday 23 September 2017 17:22

you can connect domoticz to a gmail calendar....
Perhaps?
Xu4: Beta Extreme antenna RFXcomE,WU Fi Ping ip P1 Gen5 PVOutput Harmony HUE SolarmanPv OTG Winddelen Alive ESP Buienradar MySensors WOL Winddelen counting RPi: Beta SMAspot RFlinkTest Domoticz ...Different backups

DutchHans
Posts: 276
Joined: Friday 03 April 2015 20:44
Target OS: Raspberry Pi
Domoticz version:
Location: Germany (near dutch border)
Contact:

Re: Is it possible to set if date is ...?

Post by DutchHans » Saturday 23 September 2017 20:54

I've created a goodmorning script with birthdates in it..maybe this might put you in the right directiin

Code: Select all

local birthdays = {
          John="19/11/19xx-F", 
          Mary="17/11/19xx-F", 
          Jeff="22/11/19xx-M"

       } 

      for key, value in pairs(birthdays) do
         if (os.date("%d/%m") == string.sub(value, 1, 5)) and (string.sub(value, 12) == "M") then
		 
            sentence = sentence .. key .. " is having his birthday, today! Don't forget to send him a message or give him a call! "
		
		elseif (os.date("%d/%m") == string.sub(value, 1, 5)) and (string.sub(value, 12) == "F") then
		 
            sentence = sentence .. key .. " is having her birthday today! Don't forget to send her a message or give her a call! "
		 
		   
       end
   end

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest