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.




1664 posts

Uber Geek
+1 received by user: 188

Subscriber

Topic # 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

656 posts

Ultimate Geek
+1 received by user: 303
Inactive user


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

Post a link to the GitHub repository?


3405 posts

Uber Geek
+1 received by user: 687

Trusted

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

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


 
 
 
 




1664 posts

Uber Geek
+1 received by user: 188

Subscriber

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

haha - wondered if it was you!




1664 posts

Uber Geek
+1 received by user: 188

Subscriber

  Reply # 1656083 22-Oct-2016 08:53
Send private message
6349 posts

Uber Geek
+1 received by user: 1106

Trusted
Lifetime subscriber

  Reply # 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




1664 posts

Uber Geek
+1 received by user: 188

Subscriber

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

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

Create new topic



Twitter »

Follow us to receive Twitter updates when new discussions are posted in our forums:



Follow us to receive Twitter updates when news items and blogs are posted in our frontpage:



Follow us to receive Twitter updates when tech item prices are listed in our price comparison site:



Geekzone Live »

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


Geekzone Live »

Our community of supporters help make Geekzone possible. Click the button below to join them.

Support Geezone on PressPatron



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.

Alternatively, you can receive a daily email with Geekzone updates.