Skip to content

Add a Google Calendar to openHAB

openHAB can integrate Google Calendars. The functionality is kind of limited, it can only see the current and the next calendar event, but in my case that is enough. More about the use case in another blog post.

There are three different calendar bindings available, let's have a quick look:

  • CalDAV Personal Binding: this is a v1 binding, which means it will no longer work in the soon-to-be-released openHAB v3. Apparently this works with Google calendars, but has performance issues. It can show the current and next event.
  • Google Calendar Scheduler: also a v1 binding. Needs more work for presense simulation, and additional bindings.
  • iCalendar Binding: v2 binding, should work with v3. It can show the current and next event. That's the one I'm going to use.

 

Continue reading "Add a Google Calendar to openHAB"
  • Twitter
  • Bookmark Add a Google Calendar to openHAB at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Add a Google Calendar to openHAB
  • Bloglines Add a Google Calendar to openHAB
  • Technorati Add a Google Calendar to openHAB
  • Fark this: Add a Google Calendar to openHAB
  • Bookmark Add a Google Calendar to openHAB at YahooMyWeb
  • Bookmark Add a Google Calendar to openHAB at Furl.net
  • Bookmark Add a Google Calendar to openHAB at reddit.com
  • Bookmark Add a Google Calendar to openHAB at blinklist.com
  • Bookmark Add a Google Calendar to openHAB at Spurl.net
  • Bookmark Add a Google Calendar to openHAB at Simpy.com
  • Bookmark Add a Google Calendar to openHAB at blogmarks
  • Bookmark Add a Google Calendar to openHAB with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

git pre-commit Hooks

A very common use case for hooks in git is a "pre-commit" hook. This hook is used to verify the to-be-committed data before it is added to the repository.

One important note: hooks are not part of the repository itself. Everyone can install a hook on it's own checkout of a repository, but by default the hook is not there when you clone/checkout the repository. This avoids security problems by executing arbitrary code during "git commit", or any "git" operation.
Because of this implication it is common that developers install a hook from somewhere in the repository into the ".git/hooks" directory. And in addition, the server side (the repository) can run the same checks during "git push", to enforce the rules.

Hooks in git work in a simple way: whatever program or script is run as the hook has to set a return code. If the return code is "0", git proceeds. If it's not "0", git aborts the operation.

 

Continue reading "git pre-commit Hooks"
  • Twitter
  • Bookmark git pre-commit Hooks at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg git pre-commit Hooks
  • Bloglines git pre-commit Hooks
  • Technorati git pre-commit Hooks
  • Fark this: git pre-commit Hooks
  • Bookmark git pre-commit Hooks at YahooMyWeb
  • Bookmark git pre-commit Hooks at Furl.net
  • Bookmark git pre-commit Hooks at reddit.com
  • Bookmark git pre-commit Hooks at blinklist.com
  • Bookmark git pre-commit Hooks at Spurl.net
  • Bookmark git pre-commit Hooks at Simpy.com
  • Bookmark git pre-commit Hooks at blogmarks
  • Bookmark git pre-commit Hooks with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

openHAB: faster loading of rules files

openHAB rules files are lazy loaded. When a rule is used the first time, the entire rule file is loaded and compiled, which apparently is single-threaded and takes a couple seconds. Even on a reasonable powerful Rasperry Pi 4. This happens both after restarting openHAB and after changing the rules file. It also means that whatever the rule in question is supposed to do has to wait a couple seconds when requested for the first time. Imagine you have a light switch, enter a room, press the switch, and it takes 5-10 seconds until the light comes on.

To work around this problem, I add a piece of code in all rules files which triggers an immediate action right after loading the file. This way the rules file is already pre-loaded (which again takes a couple seconds, but likely at a time when the rule is not needed right now).

 

Continue reading "openHAB: faster loading of rules files"
  • Twitter
  • Bookmark openHAB: faster loading of rules files at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg openHAB: faster loading of rules files
  • Bloglines openHAB: faster loading of rules files
  • Technorati openHAB: faster loading of rules files
  • Fark this: openHAB: faster loading of rules files
  • Bookmark openHAB: faster loading of rules files at YahooMyWeb
  • Bookmark openHAB: faster loading of rules files at Furl.net
  • Bookmark openHAB: faster loading of rules files at reddit.com
  • Bookmark openHAB: faster loading of rules files at blinklist.com
  • Bookmark openHAB: faster loading of rules files at Spurl.net
  • Bookmark openHAB: faster loading of rules files at Simpy.com
  • Bookmark openHAB: faster loading of rules files at blogmarks
  • Bookmark openHAB: faster loading of rules files with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Remove duplicates from Huginn event stream

One of the things I'm using Huginn for is monitoring for Twitter keywords. Some of them might appear in pairs, as example people like to tag Tweets about PostgreSQL with both #postgresql and #postgres. When I was using IFTTT this always created two emails, one for each hashtag. With Huginn I can deduplicate the events, and only notify about the first occurrence.

I need the following agents for this scenario:

 

 

Continue reading "Remove duplicates from Huginn event stream"
  • Twitter
  • Bookmark Remove duplicates from Huginn event stream at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Remove duplicates from Huginn event stream
  • Bloglines Remove duplicates from Huginn event stream
  • Technorati Remove duplicates from Huginn event stream
  • Fark this: Remove duplicates from Huginn event stream
  • Bookmark Remove duplicates from Huginn event stream at YahooMyWeb
  • Bookmark Remove duplicates from Huginn event stream at Furl.net
  • Bookmark Remove duplicates from Huginn event stream at reddit.com
  • Bookmark Remove duplicates from Huginn event stream at blinklist.com
  • Bookmark Remove duplicates from Huginn event stream at Spurl.net
  • Bookmark Remove duplicates from Huginn event stream at Simpy.com
  • Bookmark Remove duplicates from Huginn event stream at blogmarks
  • Bookmark Remove duplicates from Huginn event stream with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Enable Huginn Twitter integration

Huginn comes with a number of Twitter agents, but before they can be used you need to authenticate them. That process requires multiple steps, and they are not well documented.

The basics are described on the "Configuring OAuth applications" Wiki page.

For the Twitter integration one must know that you are using a single Twitter app for all users, but every Huginn user can (and should) have this app authenticated against their own Twitter account. Therefore if you want to use multiple Twitter accounts in Huginn, you need multiple Huginn users.

 

Continue reading "Enable Huginn Twitter integration"
  • Twitter
  • Bookmark Enable Huginn Twitter integration at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Enable Huginn Twitter integration
  • Bloglines Enable Huginn Twitter integration
  • Technorati Enable Huginn Twitter integration
  • Fark this: Enable Huginn Twitter integration
  • Bookmark Enable Huginn Twitter integration at YahooMyWeb
  • Bookmark Enable Huginn Twitter integration at Furl.net
  • Bookmark Enable Huginn Twitter integration at reddit.com
  • Bookmark Enable Huginn Twitter integration at blinklist.com
  • Bookmark Enable Huginn Twitter integration at Spurl.net
  • Bookmark Enable Huginn Twitter integration at Simpy.com
  • Bookmark Enable Huginn Twitter integration at blogmarks
  • Bookmark Enable Huginn Twitter integration with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Monitor software version changes with Huginn

Huginn is a great piece of software, but the documentation is ... a bit sparse. Especially when it comes to details of the agents. I'm going to blog about a couple more more examples in the future.

For another project I'm using Leaflet, a JavaScript library for rendering maps in a browser. New versions are released occasionally, and I want to know when it's time to update the project website. Huginn can do that.

 

Continue reading "Monitor software version changes with Huginn"
  • Twitter
  • Bookmark Monitor software version changes with Huginn at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Monitor software version changes with Huginn
  • Bloglines Monitor software version changes with Huginn
  • Technorati Monitor software version changes with Huginn
  • Fark this: Monitor software version changes with Huginn
  • Bookmark Monitor software version changes with Huginn at YahooMyWeb
  • Bookmark Monitor software version changes with Huginn at Furl.net
  • Bookmark Monitor software version changes with Huginn at reddit.com
  • Bookmark Monitor software version changes with Huginn at blinklist.com
  • Bookmark Monitor software version changes with Huginn at Spurl.net
  • Bookmark Monitor software version changes with Huginn at Simpy.com
  • Bookmark Monitor software version changes with Huginn at blogmarks
  • Bookmark Monitor software version changes with Huginn with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Text-to-Speech in openHAB

In my ongoing endeavor to improve our home, a while ago I added a notification when the washing machine and the dryer are finished. The notification is send to a Telegram channel. Over the summer vacation I added a number new ChromeCast Audio devices (Google no longer offers the Audio CC, if you need one get one now). One is placed in the kitchen. Not only can I listen to music while eating breakfast, I can also output notifications, by using the CC as an audio sink in openHAB.

To make that useful, I decided to use a Text-to-Speech system. openHAB offers a couple different TTS systems, however most of them need a cloud integration, and therefore a working Internet connection. The "Pico TTS" works standalone, and was my favorite choice for this implementation.

 

Continue reading "Text-to-Speech in openHAB"
  • Twitter
  • Bookmark Text-to-Speech in openHAB at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Text-to-Speech in openHAB
  • Bloglines Text-to-Speech in openHAB
  • Technorati Text-to-Speech in openHAB
  • Fark this: Text-to-Speech in openHAB
  • Bookmark Text-to-Speech in openHAB at YahooMyWeb
  • Bookmark Text-to-Speech in openHAB at Furl.net
  • Bookmark Text-to-Speech in openHAB at reddit.com
  • Bookmark Text-to-Speech in openHAB at blinklist.com
  • Bookmark Text-to-Speech in openHAB at Spurl.net
  • Bookmark Text-to-Speech in openHAB at Simpy.com
  • Bookmark Text-to-Speech in openHAB at blogmarks
  • Bookmark Text-to-Speech in openHAB with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

openHAB and Tankerkönig gas prices + Telegram integration - Second iteration

In my previous blog post about "Tankerkönig" I explained the details of how to integrate this binding into openHAB and provide a Telegram interface.

Someone on the openHAB community forum pointed out that Telegram bots allow queries, where one can present the user with options, and the user only has to click on one of the options. That makes it easier to use, and less typing is required as well. I went ahead and implemented that.

 

 

Continue reading "openHAB and Tankerkönig gas prices + Telegram integration - Second iteration"
  • Twitter
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration - Second iteration at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg openHAB and Tankerkönig gas prices + Telegram integration - Second iteration
  • Bloglines openHAB and Tankerkönig gas prices + Telegram integration - Second iteration
  • Technorati openHAB and Tankerkönig gas prices + Telegram integration - Second iteration
  • Fark this: openHAB and Tankerkönig gas prices + Telegram integration - Second iteration
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration - Second iteration at YahooMyWeb
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration - Second iteration at Furl.net
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration - Second iteration at reddit.com
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration - Second iteration at blinklist.com
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration - Second iteration at Spurl.net
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration - Second iteration at Simpy.com
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration - Second iteration at blogmarks
  • Bookmark openHAB and Tankerkönig gas prices + Telegram integration - Second iteration with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Install openHABian image on Linux

My plan is to reinstall openHABian on a bigger SDcard, and on a Raspberry Pi 4. The latest release (v1.5) supports the new Pi 4, and I decided it's time to do a fresh install, and see if all my Playbooks are still working.

Raspberry Pi 4 with Sectronics Armor (cooling) Case

As always, I'm searching my shell history for the right command how to install the image ... but came up empty.

 

Continue reading "Install openHABian image on Linux"
  • Twitter
  • Bookmark Install openHABian image on Linux at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Install openHABian image on Linux
  • Bloglines Install openHABian image on Linux
  • Technorati Install openHABian image on Linux
  • Fark this: Install openHABian image on Linux
  • Bookmark Install openHABian image on Linux at YahooMyWeb
  • Bookmark Install openHABian image on Linux at Furl.net
  • Bookmark Install openHABian image on Linux at reddit.com
  • Bookmark Install openHABian image on Linux at blinklist.com
  • Bookmark Install openHABian image on Linux at Spurl.net
  • Bookmark Install openHABian image on Linux at Simpy.com
  • Bookmark Install openHABian image on Linux at blogmarks
  • Bookmark Install openHABian image on Linux with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca

Improve openHAB Rules response time

By default, openHAB only starts 5 threads to deal with execution of Rules. That's not a lot, and if all threads are busy, rules have to wait until a slot is free. This results in slow Rule response time.

This can be improved.

 

Continue reading "Improve openHAB Rules response time"
  • Twitter
  • Bookmark Improve openHAB Rules response time at del.icio.us
  • Facebook
  • Google Bookmarks
  • FriendFeed
  • Digg Improve openHAB Rules response time
  • Bloglines Improve openHAB Rules response time
  • Technorati Improve openHAB Rules response time
  • Fark this: Improve openHAB Rules response time
  • Bookmark Improve openHAB Rules response time at YahooMyWeb
  • Bookmark Improve openHAB Rules response time at Furl.net
  • Bookmark Improve openHAB Rules response time at reddit.com
  • Bookmark Improve openHAB Rules response time at blinklist.com
  • Bookmark Improve openHAB Rules response time at Spurl.net
  • Bookmark Improve openHAB Rules response time at Simpy.com
  • Bookmark Improve openHAB Rules response time at blogmarks
  • Bookmark Improve openHAB Rules response time with wists
  • wong it!
  • Bookmark using any bookmark manager!
  • Stumble It!
  • Identi.ca