December 31

Unofficial Openhab plugins

Openhab is excellent home automation software for geeks.  It has support for many bits of home automation hardware via its plugable bindings, of which there are many in the Openhab repositories.  In case this isn’t enough various people have written prototype bindings that are not yet complete and/or robust enough to make it into the official openhab distribution.

Here is a list, let me know if you find any more and I’ll update this post.

CM11A X10 Interface

An initial implementation written by myself.  Supports sending basic X10 commands but not receiving any.  Works well enough for that, though the CM11A hardware appears to lockup occassionally.

Source-code can be found at:

Chromecast binding

Basic chromecast binding.  Supports reading the current Chromecast state, and controlling volume.

Original source is at:

The same code incorporated into a fork of the openhab repo can be found at:

January 1

Using OpenDMX in Linux

Enttec makes a handy little USB to DMX converter called OpenDMX. (DMX is the standard theatrical lighting control protocol – a serial protocol where up to 512 lights are daisy chained together). Several people have made Linux kernel drivers for this device – for example: the DMX4Linux project and Erwin Rol – however, at the time I got one of these dongles, they either didn’t work with the 2.6.x kernels or required compiling a kernel module (irritating when apt-get keep installing new ones requiring a module recompile…). So, I set about using another approach – using just the stock Linux serial drivers.

Continue reading

January 1

SquidGuard and Polipo

SquidGuard is a high-speed URL filtering programme. It accepts URLs on stdin, matches them against a blacklist (of URLs, domains or regular expressions) and produces re-written URLs on stdout. It is designed to be used with the open-source ‘squid’ HTTP proxy. It’s primary purpose is for restricting access to unsavoury websites.

Polipo is a a fairly lightweight HTTP Proxy server designed for personal use. It is particularly designed to reduce the ill-effects of high-latency internet connections on web-browsing – making use of modern HTTP filters such as HTTP persistent connections, pipelining and cache-control headers.

Getting these to work together…

Though Polipo has support for ‘squid-style redirectors’ it does not work with squidGuard redirector out-of-the-box.

Continue reading

December 28

Compiling squidGuard 1.4 on CentOS 5.1

SquidGuard is a URL redirector for the Squid HTTP Proxy server.  Its main purpose is to restrict access to unsavoury websites.

I found that when compiling squidGuard 1.4 on the CentOS 5.1 distribution of Linux, the ‘make’ phase failed with the following error:

/bin/sh: -c: line 1: syntax error near unexpected token `then'
/bin/sh: -c: line 1: `   @if [ ! -x bison -y ]; then \'
make[1]: *** [] Error 2
make[1]: Leaving directory `/home/antgreen/downloads/squidGuard-1.4/src'
make: *** [all] Error 1

My workaround was to edit the file: src/Makefile and replace the following:

Continue reading