Shinobi is out and Kerberos is in
A couple of days ago I was choosing which software to use with my new IP camera as the recording software. I had originally decided on Shinobi. The UI was pleasant enough and it was fairly feature rich.
During the whole process though, at one point I crashed my server. Shinobi had tried to create multiple, multi-gigabyte timeline snapshots, and properly locked up in some loop in the software as well. At the time, I had assumed I had royally screwed up some config.
So, I rebooted the PC, started the image with a fresh DB and configured things again. System ran fine. Until this morning. I was browsing the internet on my phone and all of a sudden the internet on my device stopped working. At first I ignored it, sometimes my network or my phone glitch out. But, then I realized why it wasn't working. My VPN was dead. Which of course makes very little sense. OpenVPN is a well established project and it is only serving a single client at the moment.
At that point, I knew what had happened. Shinobi had borked itself again. I ran upstairs and sure enough, just like the other day, my PC is running, but barely registering mouse movement. When I reboot I find a 16GB picture in my snapshots directory again. It wasn't me after all. It was the software.
Not the end of the world really. The Shinobi Docker image doesn't have official support. On top of which it bundled in a MariaDB instance and it was flaky. I knew I was eventually going to need to either replace it or dive in further to try and reduce the resources it hogged and improve its reliability.
So, then I switched over to my #2 choice. Kerberos.io. It is very much more Docker friendly. The image is MUCH lighter. At least, when it is running. My CPU with Shinobi had one thread pretty much idling at 20% CPU all the time and my RAM usage (total including other apps/containers) was hovering steadily at about 60%. Now that I'm running Kerberos, I don't see any CPU cores idling higher than 5-10% (that's with 10 active containers) and my RAM usage is now hovering around 40% which isn't any worse than it was before I fired it up.
This doesn't surprise me a ton. There is no bulky DB at play here. And the system is more or less designed with microservices in mind. Heck, I even need to spin up multiple instances if I want multiple cameras. Not a big deal.
What originally turned me off it was getting everything to a state where I could restart a container and get everything up and running right off the bat. But, that really just took a bit of digging around. Their site isn't perfect, but the documentation is still a LOT better than what Shinobi had.
I started by mounting a volume for the video capture. Then, fired up the container and configured it. Then I went into the console and copied the config directory contents into the capture folder so it was available on my host PC. I moved those files into a new folder which I then mounted to the config folder inside of Kerberos. These are separated into different folders per camera.
Then there was just the matter of the login. Turns out, this is just stored in a .php file. So, I copied that off using the same trick I used with the config, and moved it to a common area. Now, if I ever need to add more cameras I can share the common elements while retaining separate configs and capture folders.
Similarly, it looks like I could probably copy out the pages and css for the web views into a common folder as well. Their color scheme isn't my favorite. But that is more of a longer term thing I think.
ZoneMinder was going to be my fallback if that all failed.
Now, to better understand the reasoning behind my decisions though, I think I need to circle back and provide some commentary as I know ZoneMinder is the default option for most people. So, it might seem weird that it is a last resort for me.
Firstly, I don't really need external access. I can achieve this through my VPN anyway, and Home Assistant is what I use for live monitoring, event reporting etc...
This exists to replace the Nest Aware subscription I had with the prior camera. And, all I really care to record is the activity associated with motion detection. I don't need a continuous feed of my camera stored anywhere.
In short, it primarily exists as a fascination with a bit of an ability to fallback as security solution if need be.
Given that fascination was the primary motivator, you can see how things like appearance and ease of use rose to the top quickly. Beyond that, it really just needs to be a solution which allows me to apply some rules to motion detection to control WHEN it decides to record. It is getting stored locally first and foremost and I don't want to bloat out my hardware with video of every waking moment.
Shinobi was the best for ticking those boxes. It was a little more complex than it needed to be. But ultimately, before it blew up in my face, it was the best option. It looked the nicest and had a rich set of motion detection options. Kerberos by contrast is rather light on that. But, it does allow me to define a zone using a fairly complex polygon. So, I'm happy.
It also has MQTT support. Which, I might actually use to drive the Tensorflow processing in Home Assistant rather than my current approach. Though, maybe not, I have had issues with that in past with Nest where the event that triggered the processing didn't line up with the image fed into the processing. But, MQTT support is a pretty awesome thing to have.
I may also want to look into a solution for syncing my files automatically with some cloud provider, like Google Drive for days when I'm out of the house and want to make sure someone breaking in can't just trash the computer to destroy the evidence.
Anyway, that is my adventure for today.
During the whole process though, at one point I crashed my server. Shinobi had tried to create multiple, multi-gigabyte timeline snapshots, and properly locked up in some loop in the software as well. At the time, I had assumed I had royally screwed up some config.
So, I rebooted the PC, started the image with a fresh DB and configured things again. System ran fine. Until this morning. I was browsing the internet on my phone and all of a sudden the internet on my device stopped working. At first I ignored it, sometimes my network or my phone glitch out. But, then I realized why it wasn't working. My VPN was dead. Which of course makes very little sense. OpenVPN is a well established project and it is only serving a single client at the moment.
At that point, I knew what had happened. Shinobi had borked itself again. I ran upstairs and sure enough, just like the other day, my PC is running, but barely registering mouse movement. When I reboot I find a 16GB picture in my snapshots directory again. It wasn't me after all. It was the software.
Not the end of the world really. The Shinobi Docker image doesn't have official support. On top of which it bundled in a MariaDB instance and it was flaky. I knew I was eventually going to need to either replace it or dive in further to try and reduce the resources it hogged and improve its reliability.
So, then I switched over to my #2 choice. Kerberos.io. It is very much more Docker friendly. The image is MUCH lighter. At least, when it is running. My CPU with Shinobi had one thread pretty much idling at 20% CPU all the time and my RAM usage (total including other apps/containers) was hovering steadily at about 60%. Now that I'm running Kerberos, I don't see any CPU cores idling higher than 5-10% (that's with 10 active containers) and my RAM usage is now hovering around 40% which isn't any worse than it was before I fired it up.
This doesn't surprise me a ton. There is no bulky DB at play here. And the system is more or less designed with microservices in mind. Heck, I even need to spin up multiple instances if I want multiple cameras. Not a big deal.
What originally turned me off it was getting everything to a state where I could restart a container and get everything up and running right off the bat. But, that really just took a bit of digging around. Their site isn't perfect, but the documentation is still a LOT better than what Shinobi had.
I started by mounting a volume for the video capture. Then, fired up the container and configured it. Then I went into the console and copied the config directory contents into the capture folder so it was available on my host PC. I moved those files into a new folder which I then mounted to the config folder inside of Kerberos. These are separated into different folders per camera.
Then there was just the matter of the login. Turns out, this is just stored in a .php file. So, I copied that off using the same trick I used with the config, and moved it to a common area. Now, if I ever need to add more cameras I can share the common elements while retaining separate configs and capture folders.
Similarly, it looks like I could probably copy out the pages and css for the web views into a common folder as well. Their color scheme isn't my favorite. But that is more of a longer term thing I think.
ZoneMinder was going to be my fallback if that all failed.
Now, to better understand the reasoning behind my decisions though, I think I need to circle back and provide some commentary as I know ZoneMinder is the default option for most people. So, it might seem weird that it is a last resort for me.
Firstly, I don't really need external access. I can achieve this through my VPN anyway, and Home Assistant is what I use for live monitoring, event reporting etc...
This exists to replace the Nest Aware subscription I had with the prior camera. And, all I really care to record is the activity associated with motion detection. I don't need a continuous feed of my camera stored anywhere.
In short, it primarily exists as a fascination with a bit of an ability to fallback as security solution if need be.
Given that fascination was the primary motivator, you can see how things like appearance and ease of use rose to the top quickly. Beyond that, it really just needs to be a solution which allows me to apply some rules to motion detection to control WHEN it decides to record. It is getting stored locally first and foremost and I don't want to bloat out my hardware with video of every waking moment.
Shinobi was the best for ticking those boxes. It was a little more complex than it needed to be. But ultimately, before it blew up in my face, it was the best option. It looked the nicest and had a rich set of motion detection options. Kerberos by contrast is rather light on that. But, it does allow me to define a zone using a fairly complex polygon. So, I'm happy.
It also has MQTT support. Which, I might actually use to drive the Tensorflow processing in Home Assistant rather than my current approach. Though, maybe not, I have had issues with that in past with Nest where the event that triggered the processing didn't line up with the image fed into the processing. But, MQTT support is a pretty awesome thing to have.
I may also want to look into a solution for syncing my files automatically with some cloud provider, like Google Drive for days when I'm out of the house and want to make sure someone breaking in can't just trash the computer to destroy the evidence.
Anyway, that is my adventure for today.
Comments
Post a Comment