Geekzone: technology news, blogs, forums
Guest
Welcome Guest.
You haven't logged in yet. If you don't have an account you can register now.


SumnerBoy

2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

#204899 21-Oct-2016 23:33
Send private message

Thought someone might find this useful (it is based on the work from another kiwi user, @john, on the openHAB forums). I am using this script via a cronjob which runs each night at 12.01am. It checks if *today* is a holiday and updates an openHAB item (via the REST API). I can then use this item in my various automation rules to ensure the morning wakeup alarm doesn't go off etc.

 

Actually, I can't work out how to post a code snippet in here. Does the forum support pre-formatted code blocks?

 

I don't want to post the script as text as all the indentation gets lost.

 

If anyone is interested drop a line on this thread or PM me and I can email it to you.


Create new topic

UHD

UHD
655 posts

Ultimate Geek
+1 received by user: 298
Inactive user


  #1656024 22-Oct-2016 01:16
Send private message

Post a link to the GitHub repository?




reven
3748 posts

Uber Geek
+1 received by user: 874

Trusted

  #1656078 22-Oct-2016 08:42
Send private message

john on openhab is me!!!!!!!! :P


SumnerBoy

2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1656080 22-Oct-2016 08:49
Send private message

haha - wondered if it was you!




SumnerBoy

2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

Behodar
11101 posts

Uber Geek
+1 received by user: 6090

Trusted
Lifetime subscriber

  #1656086 22-Oct-2016 09:02
Send private message

The calculate_easter_sunday looks about as complicated as the one we have at work (in T-SQL) tongue-out


SumnerBoy

2079 posts

Uber Geek
+1 received by user: 306

ID Verified
Lifetime subscriber

  #1656087 22-Oct-2016 09:05
Send private message

Yep i have no idea what it is doing but it works!

Create new topic








Geekzone Live »

Try automatic live updates from Geekzone directly in your browser, without refreshing the page, with Geekzone Live now.



Are you subscribed to our RSS feed? You can download the latest headlines and summaries from our stories directly to your computer or smartphone by using a feed reader.