Has anyone tried to use Openhab and Zoneminder?

I am thinking of building this setup:

Openhab for automation and control.
Zoneminder for surveillance and monitoring of driveway,house entrance/parking lot and diary cows.

OS alternatives for running Openhab and Zoneminder on:
FreeNAS ( bulletproof OpenZFS file system )

Later optional addons:
For sound:
Raspberry PI with Picoreplayer and HiFiBerry AMP+

Asterisk/FreePBX as it looks handy.

The hardware I think I will use:

z-wave stuff:
Door lock:
ID Lock 150 (with Z-wave module )

Z-wave controller:
Aeotec Z-Stick Gen5 ( 868,42 MHz here in Europe)

Z-wave swithes for lighting:
Qubino 1D relay ZMNHND1,as these can be installed behind existing switches, it adds Z-wave capabilities and the switch will also work as normal.

Light dimmer:
Z-WaveMe’s ZMNHND1

Zoneminder stuff:

House Outdoors:
3 stationary cameras with IR, D-Link DCS DCS-4705E for driveway, house entrance/parking lot.
Specifications: https://eu.dlink.com/uk/en/products/dcs-4705e-vigilance-5megapixel-outdoor-mini-bullet-camera
Motion detection and possible car and person detection.

Barn indoors:
3 cameras with pan,tilt and zoom.
Vivotek FD8369A-V
specifications: https://www.vivotek.vn/fd8369a-v/

Barn outdoors:
2x D-Link DCS DCS-4705E for farmyard and barn/milking stable acess.

Motion detection and possible car,truck and person detection ( is bovines possible ?) Do I need a GPU for that?

Computer/server hardware:
Quad core processor or better.
16 GB RAM or better.

2x 120GB SSD drives in raid-0 for OS storage.

Disk space needed for 14 days with motion detection ( assuming some moderate activity):
1.622 Terabytes house outdoors
1.081 Terabytes barn outdoors
2.74 TB total disc space for recorded events.
3TB rounded up.

Disks alternative 1
4x Seagate IronWolf 4TB 3.5’’ NAS HDD
RAID type: RAID-Z2
ZFS usable storage capacity:
7.68 TB
3TB of space for recorded events.
That gives 4,68 TB space for computer backups,music,media etc…

Disks alternative 2
2x Seagate IronWolf 4TB 3.5’’ NAS HDD
RAID type: RAID-Z1
ZFS usable storage capacity:
3.96 TB
3TB of space for recorded events.
That gives 0.96 TB space for computer backups,music,media etc…

For sound:
Raspberry PI with Max2Play and HiFiBerry AMP+

Here’s a link that you may find helpful.What system to use for home camera surveillance?

Bovine detection, now this is an intersting topic. Do we have a tag for that? :grin:

I think some of your hardware spec is overkill. 1x SSD is probably more than enough, if you are running any flavor of GNU/Linux. A lot of these distributions could run off a USB stick, SD card, or EMMC (but I am mostly using small embedded devices nowadays, read on…).

Speaking of OS choice, I am personally not a fan of these “ready to go” appliance type OSes. IMO, just install plain Debian and then the packages you need. Yes it will take you longer at first (perhaps much longer). However you will learn a lot more that way, and then you won’t be helpless when something breaks.

Let me rephrase that. How experienced are you with tech in general? Linux in particular? Because it has taken me a good couple years at least to really start to know what I am doing (and there is still much more to learn). OTOH, I see you live in a rural area, so I am going to venture a guess that you value self sufficiency (as do I) so perhaps it would be worth the extra effort and learning curve initially, for you (personal question).

Back to the hardware… I personally don’t think it’s necessary to do any kind of ZFS just for captured video. I mean, ZFS is the bees knees, but save it for your important data like family photos (and don’t forget to do backups, preferably off-site). If you insist on ZFS, just do straight mirrors. Much more efficient in terms of CPU usage and disk churning. And rebuilds don’t take as long, etc.

And disks are cheap nowadays. Wait until they go on sale for $80 each (4TB Seagates) and buy a couple/few. Then wait a few months and buy a couple more next time they go on sale. Mix up the batches to protect against a bad day at the factory.

Check out those HDD ratings at that storage place (Backblaze?). They confirm what I have suspected for years, which is that there is very little (other than marketing) separating “consumer” from “enterprise” disks. Well maybe there is, but at the price difference it doesn’t matter. You are on the right track setting up good redundancy and fault tolerance in software (which is the way it has been done since forever in big datacenters).

Those Hi-FiBerry (and similar devices) look super neat, but I haven’t had a chance to play with them yet. So let us know how that goes. :slight_smile:

If you can forego the ZFS requirement (which would necessitate 64-bit) you can save a lot on hardware and go with a few Single Board Computers and set up a sort of distributed network with them. Which is not only a more fault-tolerant type design, but would likely still be cheaper than one big Intel/AMD system. And also use less power. See my recommendations in the thread @H102 linked, above (I also recommend some different cameras, if you are dead set on a full power x86(/-64) based system).

I am somewhat familiar with Linux, so installing packages and things like that is not a problem.

I think it’s possible to get hold of a old workstation or similar with enough SATA ports since I am a fan of “upcycling”.

Bowine detection event is something that should be possible, I included it just for fun. Some of those can develop the skills of an escape artist, and venture outside of fences, go on the Main road and cause all kinds of trouble.

I also know that DeLaval automatic milking machines do run embedded Linux, but I don’t know if there is any API that can be leveraged to include information from that system in to openHAB. It does seem to use closed source.

At least the cows collars use RFID, so it should be possible to monitor the cows traffic from outside to inside if a reader is placed in a door opening.

Heat loss can be avoided using a door fitted with this:

Please be aware that a ZFS pool should never use more than 80% of available disk space, so your disk space is more like 6.14TByte for Disk alternative 1 and 3,17TByte for Disk alternative 2.

For your bovine detection, you will need something quite long range. I have been reading recently about LoRa but don’t know a lot about it. But you are taking about making something quite sturdy, with a battery, likely antenna, etc…

MySensors.org might be a good starting point if you are interested in rolling your own solution along those lines. But be advised, you will essentially be soldering your own circuits together out of (for example) Arduino Pro Minis and LoRa radios (if those even have enough range). But there are a lot of guides and good info there to get your started.

Or did you just want to do something locally when bringing them in for milking? That could be done with RFID.

If you have an old PC sitting around, sure it’s easy to turn that into your server. But it will likely use a lot more power. These little embedded devices just sip power. My Cubietruck uses maybe $20 per year in electricity, where an old PC is probably more like leaving a couple hundred watt light bulb on 24/7/365. But start out with what you have on hand if you like. Just food for thought.