What is this? How this works? Originally designed for home automation, this is a daemon which is written in Perl, using POE (an event-driven, non-blocking, multitasking framework). Daemon can be run in different modes on different devices. Daemons communicate over TCP/IP using TCP transport with SSL (AES256, DHE, 2048bit keys). IPv6 support is designed in as one of the first features, with possibility to run on IPv6-only network (not yet tested in reality, currently running with dual-stack setup). Authentication is done using certificates only. Every device has own certificate and certificate's CN is used to address devices internally. I've got round-trip delays like 6.454 milliseconds on Ethernet network, which is pretty fast. One-way trip time 3.227 milliseconds should avoid any "press button, wait for light to come on" cases. It's currently designed to be run with one server, although failover operation is planned (both master / slave and multi-master). Master / slave failover can be implemented using CARP. Example of system layout can be like this: You have one daemon in server mode, running on somewhat higher powered hardware (like i386 / amd64) which handles all the data processing tasks (which might involve large SQL database) and several clients that handle physical I/O which can use low power embedded hardware (since they only forward data). I chose to use FreeBSD as OS and BeagleBone Black as first client device hardware, since it has lots of I/O already integrated to SoC and price is low compared with what you get. Next considerations include Carambola2 and devices based on same SoC. FreeBSD ARM support for that specific TI SoC is good enough for stable operation of this system. I'll try my best to work out any kinks there. The main requirement, digital 0/1 I/O works best. As of 2014-05-22, 4 PWM outputs also work (of 6 (8?) total), 7 ADC inputs work (one is internal, look at schematics), I2C bus'es work (all 3). GPIO interrupts basically work (2015-01-15, needs some polishing) (ability to reliably watch, for example, pulse outputs of power meters). Client in BBB and it's child processes are currently run with maximum realtime priority, to avoid normal system processes interfering with I/O that must be operate as fast as possible. POE allows nonblocking multitasking but not all my code is like that, so I forked off several child processes to cope with this. Those could later be implemented directly in POE. Children include: gpio {poll,change,ws2801} Perl code sysctl {get,set} Perl code ntpdc -ni from base, compiled C code dnschild Shell bbb-i2csysutil C code ownet Perl code owserver Shell wrapper for owserver watchdog Perl code gpio-irq-event C code ... On FreeBSD, you need to install following ports / packages: security/p5-POE-Filter-SSL devel/p5-Time-Duration sysutils/p5-BSD-Sysctl comms/p5-Device-SerialPort (optional) comms/owfs (optional) net/rsync (optional, only needed for remote upgrades) (they install lot of dependencies) Additionally I use Perl modules from MisterHouse & OWFS + POE::Component::AIO from CPAN (needs devel/p5-IO-AIO) I also use some local patches for POE & POE::Filter::SSL I'm working to include those bug fixes in upstream. And POE::Component::AIO should be added to ports. Yes, I'm bad when it comes to text longer than one sentence... -- 2014 Sulev-Madis Silber