After many years of home automation, I have used several combinations of platform so would like to share a few thoughts on their abilities:
-
Old desktop PC
Pro: Cheap, readily available, able to run Windows, Linux, etc.
Con: expensive to run 7x24, noisy, serial and digital I/O interfaces are getting harder (no serial ports, PIO cards expensive, hacks via printer ports gone). USB interfaces are getting easier - multi-port serial, 1-Wire, but for digital I/O you probably need to add an Arduino as an expander.
-
Old server PC
Pro: Better reliability than a PC, remote console and power management help, faster disks helps add file server and backup tasks.
Con: VERY expensive to power, LOTS of fan noise, parts can be expensive (e.g. SCSI/ SAS disks, memory to allow multiple VMâs)
-
Compromise x86 - e.g. HP microserver, mini-ITX
Pro: Smaller, cheaper, quieter but still flexible with x86 OS options, disk speed, file and print server. Purchase cost less than a yearâs electricity cost for a desktop PC!
Con: Still a bit large and power hungry, less able to hardware hack without USB or serial linked to Arduino, ESP8266, etc.
-
Embedded ARM - e.g. RPi, Pine 64
Pro: Very cheap, small, battery options (check Adafruit for LiPo interfaces, many USB batteries EITHER charge OR discharge so are useless as UPS), lots of hackable I/O, lots of community support for hardware projects and code to re-use. Linux works well for me. Basically disposable, so cold standby very effective. Sideways scalable - at this price, use one per task! Easy to rebuild or clone via ddâing an image to a new SD card.
Con: Higher learning curve with Linux. Slower disk interfaces so less useful for file/ print, older uSD cards were unreliable (fixed with modern Class 10 cards).
Currently, Iâm moving HA from a HP Microserver running Linux and MrHouse to RPi 2 servers for the hardware convenience. RPi 3âs are faster with Wi-Fi, but the added Bluetooth breaks the serial console port needed for the RaZberry interface. I have RPi3âs with a touch screen which might end up as front-end GUI controllers. For OH2, Iâd say a fast uSD card makes more impact than moving from RPi2 to RPi3.
The Microserver continues with file/ print/ NAS/ mail/ web server duties using RAID disks, but HA control has moved to the Pi. The key is to play to the strengths of the platforms.
As an example, my text to speech runs from OH2 to a hack shell script on the Pi which calls Festival on the Microserver. This is little more than one line of script using netcat, although curl might also have worked. The server can be used as a desktop, with speakers and also play announcements.
Both are on a UPS, so power fail alerts go from the RPi2 to the Microserver mail server and out to the Internet. I prefer to separate home automation from Internet-facing server duties to allow security hardening and patching without breaking my core control platform.
After moving from SD to Class 10 and faster uSD cards, wear flash memory levelling seems to be a whole lot better, and a lot of the disk issues early Pi users suffered have gone. Just in case, the Pi runs a regular backup script and copies the key files across to the Microserver RAID disks automatically (cron, tar and scp).
Armed with an image of the uSD card, a bare metal restore would take less than half an hour!
@pahansen - There are a few posts showing issues using executeCommandLine and curl, which suggests you are not alone and this is tricky to get right.
I add lots of logging (LogInfo() in OH2 / printf in the shell script), and break things down into testable blocks so you can see parts work step-by-step. Most of my integration issues so far have been on the OH2 side with string / type conversions failing in impenetrable ways and escaping control characters.
I guess another point to check is the version of curl - a Wintel port may be different from the Pi, or have different parameters (âfoo verses -foo, bash shell eating delimiter characters that works with CMD,EXE?).