gnhast
gnhast - Garbled's NetBSD Home Automation Scripting Tools
...These programs can be written in any language, and the central daemon handles all the intercommunication. It is designed to be easily extensible for new device types and protocols.
The core system is BSD Licensed (3-clause), however scripts or additional data collectors may be written under any acceptable lic.
While the primary development environment for this is NetBSD, it can be used on other UNIX variants, such as Linux, or other BSD's.