Hardware Choice Pi or PC?

I’m very happy with the performance of Pi2 or more recent single-board computers running openHAB. The only general weakness (not shared by all) is wearing out flash memory with disk writes, so an external USB2.0 disk is advised (mechanical or SSD).

Like the Vera, having a separate, low-power, always-on, mainly dedicated SBC processor is generally more convenient. If the Raspberry Pi you transitioned off Vera a year ago is a B+ or older, then you will notice a dramatic improvement in recent models.

1 Like

I have experince from other projects that uses the PI that the SD card is a weak point. And that will affect stability of openhab.

Interestingly, i’m thinking about doing just this. I have a rule which runs a curl script and no amount of re-writing or compartmentalising the rule in OH2 has it return anything other than Null when run on my Pi3. However on my windows machine I can run the exact same code and the script runs perfectly.


I admit sometimes it can be frustrating to get external web page processing to run properly on Linux because you have to apply the right character escaping and stuff like that, and the more time you’ve already spent, the more attractive it becomes to avoid the problem rather than to solve it.
But to speak frankly, that’s no good motivation for a migration (because it would buy you a bunch of other disadvantages).
Post your problem/script here (new thread), maybe someone on the forum can help.

1 Like

Wow. This is cool. I’m assuming that the power bank stays plugged in all the time and RPi is attached to the output? Is there a recommended power bank for the RPi3? Do they all supply the right amount of power for the power hungry RPi3?

Yes, the power bank stays looped in. No, as far as I know there are no special or recommended banks. RPis aren’t power hungry (unless you attach something hungry to USB), so most if not all should do.
Mine is a promotional gift. Just try using any of yours. Note you need to find one that does charge WHILE powering the Pi. Unfortunately that’s a trial-and-error thing.

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?).


Personally running on my VM host - home built server with Xeon E3, 20gb ECC ram, 4tb zfs storage.

I ran for a while on my old RPi 1 that used to run XBMC. Once started, things ran OK, but when first getting started with OH, the frequent reboots were unbearable.

I’ve definitely gone back and forth in my mind between the two. The Pi certainly has some positives, even if you already have a computer running 24x7 like myself. Low power, cheap, easily replaceable.
The server is on a battery backup that should keep it running for 10-15 minutes. I finally decided that if the power is off, it doesn’t really matter if my HA system is on or not because none of the devices it controls will be on anyway. :wink:

And with as many services as the server is running, I can’t even say that the HA system would be top priority in the even of hardware failure.

Thank you for all for the input. OpenHab on the Pi 2 has been basically bullet proof except for the one issue that I created. While setting it up I logged WAY TOO MUCH stuff and with poor retention rules, after a while it blew out the SD card with so many logs it wouldn’t boot.
The ‘server’ that I have is basically a media/NAS linux box. Mini-ITX with a Intel Core I3 and 6TB of zfs storage.

My initial thought was to consolidate devices to reduce ‘overhead’ on my part, but that may just be some lean mindset spilling over from work. Losing inputs on the Pi isn’t an issue I have never even tried using any of them. Most of the hardware I have done so far has been on ESP8266 with MQTT. One of the ‘Pros’ I had was freeing up with Pi to try some new stuff.

I run openHAB for several months now on a Banana Pi (1st generation). The advantage compared to a Raspberry is the SATA port external storage. I have a Samsung SSD attached to it. With SATA, you also have TRIM support, which improves SSD operation.
I started with a Raspberry Pi but found out that besides of the more powerful processor of the Banana Pi also the SD-Card survived the high IO-rate of the MySQL database for only a few months. So I strongly recommend to use a real SSD or harddisk for openHAB, because the IO will kill most of the SD cards after a short time. Maybe there are SD cards out there that have powerful wear leveling algorithms and therefore will survive the IO frequency of openHAB persistence, but I did not yet read of any.

I currently plan switching to an Odroid XU4 with a USB3-attached SSD, but did not yet do this. I also found out that this platform currently has no TRIM support for SSDs, so I am not yet sure whether to really use it. So for the moment my best recommendation is Banana PI because of the SATA port.




I have had a lot of experience with OH and OH2 on RPi and PC with Ubuntu, Mint, Arch and Windows on. I have tried old PC’s Servers, Laptops - just about all of them. I am currently running a Nuc and is great. Low power usage, quiet, small. Now as far as OS…
By far, the best, most reliable, easiest to use, setup, maintain, modify is easily Windows.

I know this won’t be popular however I simply don’t understand why so many of OH users go with Linux. It is a pain to work with, add software to, setup and maintain. I realize that Windows is not free but it is a small price to pay in the grand scheme of things for ease of use and setup.


Another happy Windows user here!

I have no former linux experience… I initially tried to use it on RPi but frankly spent too much time trying to understand how use linux, rather than learn openHAB.


I was just about to ask this very question. I’ve currently got an HP Microserver which acts as a file/print/web server, Plex Server and Netcam Studio Server.

Because I had the Pi Zero laying around without a project I decided to use that to host OH, even though I’m more comfortable on Windows environments. My OH implementation is fairly basic - Some AV control and MQTT Temp/Humidity logging.

I really like the sound of @FloatingBoater’s implementation and is making me think that throwing OH onto the server isn’t the best option. That said, like @cameronaps, I feel much more comfortable on Windows and the server is on 24/7 anyway.

Because we don’t want to have to reboot it every day. :wink: But on a serious note, I support Windows at work every day and I regularly find myself more than a little annoyed with it.

Resources is also another factor. In my case, where I virtualize everything, I generally spin up a VM per “service.” That way if I break one thing it doesn’t take down everything. My starting point for an Ubuntu server VM is 512MB of ram and a 6GB drive. Running Windows on less than 2GB and a 15-20GB drive is starting to ask for headaches.

I had been running OH2 on a PI for a while. I was also running a PI for my Ubiquiti UniFi WIFI controller. I was running a UniFi NVR on my desktop computer. This required it to be on 24x7. I just recently migrated to a PC. I went with a Zotac BI323. It has a 6W Celeron quad core. It has 8gb of RAM and a 750g spindle drive for recording the streams from my camera. The PC is running a headless Ubuntu OS. The setup works very well and doesn’t use much more power than a PI.

Well, you might just as well change the order of Linux/Windows and you’ll see our point… :wink:
I stopped using windows at home since about fifteen years, and since about 10 years at work. I since them live a better, less frustrated, life. Sure, there are times that I get in contact with Windows, but those times I remember the bad old times - it is far from the simple and comfortable environment of linux.

Currently I run OH2 on my mail/webserver, and I suppose I will continue doing so, since it works so well. It is also UPS:ed. I do use RPI’s for random stuff, since it is so simple to test things on them, and I guess it would work just fine, perhaps a little bit slower
I have about 240 items at the moment.

Surely it must be using “lots” more power than a Raspberry PI, or? According to the specifications, the power supply that comes with the package seems to be rated at 65W. Am I missing something?

Also, it is equipped with a fan for cooling. Any noticeable noise from this?

The system is silent. I am only seeing around 5% CPU utilization. The CPU is rated for a max of 6W but at 5% it is using much less. The SATA drive is probably pulling around 6W. I wish I had a way to measure how much it is really pulling.

I used to run OH on my HP microserver, together with a lot of other services. Later on, I just wanted to have a separate machine for my home automation/security. I just went with debian on an old eeepc I had left gathering dust during the last 3 or 4 years. It is perfect for that use.

If anybody is going the PC route, I would suggest them to use an old laptop. Even a 10 years old one would be more than sufficient to run OH, if the O/S is Linux, of course. Also, laptops consume considerably less power than full-blown PCs (although not comparable to a rPI), and if the battery is not dead, they have an in-built UPS. And keyboard/screen for local use, if need be.

1 Like

Whew, a OH box does not have to perform I/O like a fileserver has to. You don’t need to care about USB3, SATA or TRIM.
A RPi2 or 3 is fine. If you really wanna go with an Odroid, better check out the C2. More bang for the buck, you can even run a 4K capable media server in addition to OH if you want to.
And as - surprise - you’re not the first to raise this topic, check out this thread for an older discussion. Also check out the link at the end of this thread for a comparison of single-board computers.

On SD (and even SSD!) corruption, check out this post.