Shinobi - CCTV video software

I’ve started using Shinobi. It’s a free (for home use) CCTV solution that is an alternative to ZoneMinder and Blue Iris. It runs on Mac OS, Windows, and Linux.

I initially tried running it on an ODroid XU4 without much success. I’m now running it on an old Dell running Ubuntu 16.04 LTS alongside openHAB 2.2. So far I only have two cameras but it runs really well.

There is no openHAB binding (yet), but I do have jpegs from the camera feeds displayed on my sitemap along with mjpeg feeds on HABpanel. It also supports an API which should work with the http binding ( though I haven’t tested it yet).

I share this because, even without a binding, it integrates well with openHAB and I was looking for alternatives after frustration with ZoneMinder. I’d be curious to hear others’ experience with Shinobi, particularly with regards to openHAB integration.

10 Likes

Looks cool, just missing multi server support. :frowning:

Thanks for sharing. I’ve been having challenges with ZoneMinder as well. The Docker containers I find are out of date and it is not an easy program to install. This might be an adequate replacement (BI doesn’t run on Linux so it is out of consideration in my environment, I’m not anti-windows, I just don’t want to pay for a license just to run one service).

I’ll have to give it a look. I don’t expect I’ll ever have more than three or four cameras so lack of mutiserver support isn’t a problem for me.

However, while it has a pretty good API for controlling Shinobi, I’m not seeing a way for Shinobi to reach out and trigger OH or anything else when, for example, it detects motion or other OpenCV events. I only looked for like 5 minutes so I may have missed it.

But I’m as if not more interested in getting the motion events to OH than I am in using OH to trigger a camera to record.

It looks like they have a way to link servers, just not working yet.

Other than that I love this thing! It was super easy to get openHAB to trigger my cameras.

1 Like

Have you been able to get this to work with the http binding? I am trying:

Switch  Camera_01   "Force Alarm [%s]"  <switch>  (Motion)  {http=">[ON:POST:http://10.88.64.201:8080/r0g0Ni3BlVGNo5dMSLOyhLzMWWpskDWh/monitor/0nHEcQE/001/record] >[OFF:POST:http://10.88.64.201:8080/r0g0Ni3BlVGNo5dMSLOyhLzMWWpskDWh/monitor/0nHEcQE/001/start]"}
Switch  Camera_02   "Force Alarm [%s]"  <switch>  (Motion)  {http=">[ON:POST:http://10.88.64.202:8080/EwxVKJdtCQKoi6QcDfzjDxc5VxMk9TCx/monitor/Zulg439/002/record] >[OFF:POST:http://10.88.64.202:8080/EwxVKJdtCQKoi6QcDfzjDxc5VxMk9TCx/monitor/Zulg439/002/start]"}
Switch  Camera_03   "Force Alarm [%s]"  <switch>  (Motion)  {http=">[ON:POST:http://10.88.64.203:8080/Au7LgNWaDNb2P5FcogC0Mx8BQa0zxrzT/monitor/Jw41yUR/003/record] >[OFF:POST:http://10.88.64.203:8080/Au7LgNWaDNb2P5FcogC0Mx8BQa0zxrzT/monitor/Jw41yUR/003/start]"}

It does not like POST for some reason, but it does work with CURL.

[root@lisa openhab2]# curl http://10.88.64.203:8080/Au7LgNWaDNb2P5FcogC0Mx8BQa0zxrzT/monitor/Jw41yUR/003/record
{
   "ok": true,
   "msg": "Monitor mode changed : record",
   "cmd_at": "2018-01-26 15:35:48"
}[root@lisa openhab2]# curl http://10.88.64.203:8080/Au7LgNWaDNb2P5FcogC0Mx8BQa0zxrzT/monitor/Jw41yUR/003/start
{
   "ok": true,
   "msg": "Monitor mode changed : start",
   "cmd_at": "2018-01-26 15:35:52"
}[root@lisa openhab2]#

I think by default curl does a GET, not a POST. A quick scan of the API looks like all of these commands are expecting GETS so try using that in your Items and see if that works.

2 Likes

Changed from POST to GET and now it works!

1 Like

@sipvoip @rlkoshak This was actually my first change to play with the API, and I’ve had the same success with GET! I’m really happy you guys both like it so far.

@rlkoshak I agree that it looks like Shinobi doesn’t currently have a way to share its motion events via its API, though I’m going to install the motion plugin and play around with it.

It looks like there’s a plugin in development to connect Home Assistant and Shinobi, though it doesn’t look like importing motion events is an option yet there either. I’ll plan to keep an eye on their efforts, though I doubt I have the skills to duplicate it in a binding.

I posted a question about this over on the Shinobi forum.

1 Like

I’m happy to report that I have motion events successfully importing in to openHAB!

My Items file:

Switch  Camera_01_Force     "Force Alarm [%s]"    {http=">[ON:GET:http://192.168.1.2:8082/[apikey]/monitor/[groupkey]/[monitorid]/record] >[OFF:GET:http://192.168.1.2:8082/[apikey]/monitor/[groupkey]/[monitorid]/start]"}
Switch  Camera_02_Force     "Force Alarm [%s]"    {http=">[ON:GET:http://192.168.1.2:8082/[apikey]/monitor/[groupkey]/[monitorid]/record] >[OFF:GET:http://192.168.1.2:8082/[apikey]/monitor/[groupkey]/[monitorid]/start]"}
Switch  Camera_01_Motion    "Camera 1 Motion"     {expire="1m,OFF"}
Switch  Camera_02_Motion    "Camera 2 Motion"     {expire="1m,OFF"}

Then I followed the instructions on the Shinobi Motion Detection docs page to get the motion detection plugin working.

Next, I opened up my monitor settings pages (each one is done separately. Hit “Advanced” at the bottom, and make sure it says “Detector: Motion Connected” on the left. Click that heading, turn Enabled to “Yes,” and Command on Trigger, to “Yes.” Then, put the curl command in the “command” field - here’s one of mine:

curl -X POST --header "Content-Type: text/plain" --header "Accept: application/json" -d "ON" "http://192.168.1.2:8080/rest/items/Camera_01_Motion"

I’d also suggest making a few tweaks. Mine was way too sensitive so I turned the “indifference” up to 500 (in both the monitor page and the region edit page), though I’ll need to mess with it further. I’d also turn “Allow Next Command” down significantly, I set mine to 1 to match the minute in the Expire binding.

And, it works! I can’t believe it was that easy.

6 Likes

Goodbye Zoneminder, hello Shinobi!

Thanks for posting. I guess my weekend project priorities have changed.

Compared to other systems I can’t believe how easy Shinobi is to use. We don’t really even need a binding.

2 Likes

But I have not been able to start it (configure) yet in docker container…

Well, it does say the docker deployment is not officially supported so I’m not surprised. I’ll probably deploy it to an existing VM.

Hey. Currently I’m working on a custom docker image for Shinobi CCTV based on Shinobi Pro . I’ll let you know when you will be able to find it at Docker Hub, if you’re interested in. Right now I’m fighting some issues regarding True Type Fonts and timestamps related to Alpine Linux.

3 Likes

I’m going to be setting up Shinobi within the next week and will try to integrate with OH. I’m keeping an eye on this thread.

Great! Hope it goes well for you!

I have build custom docker images for Shinobi CCTV based on Shinobi Pro. Thanks to MoeIsCool for his great work and inspiration. You will find it on Docker Hub https://hub.docker.com/r/migoller/shinobi/ .
The Alpine images fails right now on Shinobi’s timestamp features because because Alpine’s ffmpeg package is missing the configuration “–enable-libfreetype”. Compiling ffmpeg from the sources did not the trick.
That’s why I decided to add a Debian based docker image; Debian’s ffmpeg package does not miss any required configuration options. API-access is working so Dome’s items should be able to access Shinobi’s monitors and groups.
I’ll add some stuff for setting up the database on remote MariaDB or MySQL servers. Right now you’ll find a script and corresponding sql-files on GitHub https://github.com/MiGoller/docker-shinobi/tree/master/sql .

2 Likes

hey there, i was trying your docker image but i couldn’t get it to run :frowning: i got this error. please help

docker: Error response from daemon: OCI runtime create failed: container_linux.go:296: starting container process caused "exec: \"/opt/shinobi/docker-entrypoint.sh\": permission denied": unknown.

also thank you very much for taking the time to build up an image :smiley: this has always been a pain for me, ugh.

1 Like

Hey Moe. Thank you for your feedback. Looks like the execution permission is missing on docker-entrypoint.sh. I’ll fix this and let you know. You will find this issue on https://github.com/MiGoller/docker-shinobi/issues/2 .

Hey Moe. I’ve just updated both images, alpine and debian, on Docker Hub. Building the images succeeds locally and on Docker Hub. I’m running my debian image, which I pulled from Docker Hub, without any errors while starting up. Can you give it a try, please? Regards.