[Release] - an app for AI camera/webcam motion/object detection/recognition (motion, person, pet, vehicle, face using tinyCam)

Thank you. Excellent !!!! working very good!!!!

1 Like

Many thanks!!!

1 Like

hello
I currently have bunch of mostly hikvision camera that are on my hik vision NVR. my home internet is LTE so i cannot do inbound ports.

is it possible to get this work ? it seems like i need device on my lan to get hte camerfeeds and that will then send them to hubitat via tiny cam?

The advantage of MotionEye would be you may be able to scale it better, and you can run on more platforms. It is also a free opensource product. I am not sure how powerful TinyCam is, but i can take Motion and put it on a unraid server in a docker, a VM, a raspberry pi, pretty much anything and support whatever camera count i want with it. It's biggest limit though is that it doesn't seem to integrate with cloud service based cameras like Arlo or blink like TinyCam. If the camera supports RTSP, or ONVIF though it is good.

From what i have been able to find with Tinycam it appears to need either a Android or IOS device. Is that true. What have you found to be a realistic camera limit for the main server running Tinycam pro.

1 Like

Yeah, I run TinyCam on a cheap 10.1" Teclast (Chinese) Android tablet which I also use to access my custom dashboard, so it's always on and remains in the house. It may certainly make sense to have a PC-based system if you have a large deployment of cameras. My system runs my 4 cameras quite well, no issues. You could certainly modify the app above to take webhooks from different systems. The app's simply a way to take an inbound GET url, decode the info from the parameters, and then activate the relevant virtual motion sensor.

You'd have to check your cameras are supported. I linked above somewhere to the tinyCam support page which lists the cameras they support. It's a huge list so you will probably be ok but best to check carefully.

Yes,you need an always-on Android​ ​computer running TinyCam on your LAN. The HE app above takes a Webhook which you set in the TinyCam app for each camera, and decodes that to drive virtual motion sensors you set up in HE for motion and the various object detection types (person, face, pet, vehicle). If you want to display your cameras on your dashboards then you use image tiles in your HE dashboard and simply put the url provided by TinyCam's webserver (again, see posts above) into the background field of the tile, so that the video is autoscaled to fill the dashboard tile.

So I just test this will the option in Motion to call a webhook. Worked like a charm. All I had to do was set the last part for the variable of what type of motion to hard code "Motion". So this means this will also work for anyone using that software as well.

1 Like

Yeah exactly. Nice solution!

I find that using motion for light on triggers is not that good (too many false positives for motion from cameras). But for keeping cameras on using the object detection in tinyCam to cancel timeouts, it works really well!

I noticed that in the driver it mentions TinyCam is available for PC -- but I can't find the download on the official site. Is this a mistake?

I think that's a mistake. Sorry about that. I recall someone used the app to get their Blue Iris integration working along similar lines (since at the end of the day this is just an app to decode a webhook and control virtual motion sensors accordingly). That system is definitely available on PC.

[UPDATE] - I edited the code segments above to indicate that tinyCam is an Android​ app only. Sorry for any confusion.

Curious about the Blue Iris thing -- if that doesn't pan out, I guess I can just run an Android VM. Most apps don't run well on x86 android, so I'd have to do an emulator. If/when I get around to testing that, I'll report back.

Sure, I just use one of my Android​ ​tablets I use as a dashboard to run tinyCam. It works pretty good. But I think when I get a fast home PC for games etc in the months ahead, I shall probably switch my setup to Blue Iris running on a PC.

So I think my cheap ESP32cam units can do motion and face detection, with the right code. I'd be interested in using this driver to connect it all. I was going to use mine for an omni-directional dash cam, but honestly the quality and frame-rate aren't that great. This might be the perfect use for these incredibly-cheap devices.

The solution above doesn't rely on any in-camera object or motion detection. You link your cameras (even dumb ones) to tinyCam and it provides the motion and AI object detection capabilities. The HE app takes webhooks triggered by tinyCam and activates virtual motion sensors in HE.

Ah yes, but my point is that perhaps tinycam can be completely avoided in this case. Though worst-case, these $5 wifi camera boards will stream to tinycam.

If you're looking for a good AI program to run on a computer you might want to check out OnGuard.

It's still being developed, but it works well. I've been using it for a few months now and I like what I'm seeing. It also supports MQTT and browser based triggers so integration with Hubitat is possible via Maker API.

3 Likes

Nice! A project for a gloomy weekend :slight_smile:

Decided to have a try of tinycam, no issues with leaving a phone plugged into the charger all the time?

The battery will eventually get killed quicker than if it was stored at ~40% charge. If you don't care about a dead/dying battery, it's no problem. I'm doing this:

1 Like

Thanks for the link - been a while since I made a new task - time for a new project!