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

Nothing else is needed. Just the parent app and as many child apps as you have cameras to control. Standard virtual motion sensors. And tinyCam of course running on a pc/tablet/phone on your network. Did you put the local url provided by the child app into tinyCam Motion Webhook for the camera?

it should be something like this...

http://your_he_hub_ip/apps/api/1234/?access_token=blah-de-blah&motion=%MOTION_TYPE%

Make sure you have all the motion types you want activated in tinyCam by ticking the checkboxes in the camera settings, under motion detection (in-app motion detection, object detection, face detection).

Does tinyCam show the motion in its Live View ok? Pls show me the Webhook you are using (but delete out your token of course). Sorry if it's not working. I will try to help you get it set up!

A good way to test is to make sure tinyCam is showing the motion on the screen of the computer running tinyCam and then view the logs on HE on another device accessing your HE hub. You should see 2 logs on motion - first the webhook command and then your virtual motion sensor will fire (the one to fire will depend on whether tinyCam sees a person, face or just motion etc.). Make sure that you set up tinyCam background mode on the camera(s) if you want to run another app on that computer and are not keeping tinyCam live/to the front of your session.

I've suggested to Alex that he change the little red man in his live view that shows the motion to an icon that represents the motion type (eg. person, vehicle, pet, face, or just plain motion). He is considering it I think for a future release. I'm doing it like this on my custom dashboard...

this is motion:

2020-06-24 21_12_55-192.168.0.102_index.htm#

this is person:

2020-06-24 20_54_47-192.168.0.102_index.htm#

etc....

Here is my api etc and on my phone it is showing motion dectection by the picture come up and an icon of motion? Still no change on virtual devices??

do I have to use maker api? if so how would I set it up?

So you put the local url into tinyCam? Pls show me screen shot of the url in tinyCam camera motion settings.

Also remember if you are running tinyCam on your mobile phone to switch on the tinyCam background mode for that camera otherwise it will stop sending the motion notification webhook once you open another app (like a browser to work on HE) and tinyCam goes into the background. Click on background mode, select the camera and press the orange play icon. It will use a lot of battery/cpu and your phone may get warm. So it's best really to run the tinyCam app on a tablet or PC in the house ideally.

No need to set that up for this. The app does all the inbound processing needed.

@Angus_M I'm really intrigued by this and trying to figure out what components I need to make it work. Understanding the overall architecture is a little above my level. Ideally, I'd like to re-purpose an unused Android (Nexus 5) phone as a camera and host for tinyCam.

Might it be as simple as putting tinyCam on the phone and mounting it to give the phone camera the proper field of view; then install your HE app to receive the alerts to RM?

Thank you for putting this together.

Yes that should absolutely work.

The steps are:

Install tinyCam and get this working on your spare mobile phone. Just select your phone when you set up the new camera in Manage Cameras in tinyCam...

If you are using a web/ip cam then you can use the other options to connect your camera.

That's the first step. Make sure it is sensing motion, person, face etc just within the tinyCam app first. It will display motion on the Live View. If you don't want to keep tinyCam running as the live view on your mobile, make sure to activate Background Mode so that it continues to work even if the app is in the background. Select the camera(s) and start the background mode running.

Decide which motion types you want to activate on this camera and set up virtual motion sensors in HE accordingly. You can name them anything you like but maybe something like this...

Cam 1 - Living Room - motion
Cam 1 - Living Room - person
Cam 1 - Living Room - face
Etc.

Set each of these to have a timeout of 30 seconds in the device preferences in HE.

Then install the parent app and then the child app in HE. The child app will generate a local url for you with unique app number and token. Take that local url and stick it into the Webhook for the camera in tinyCam (in camera settings, motion settings). Make sure you activate the motion and object tracking options in tinyCam of course (in Camera Settings).

Now open your HE log on another device and watch for the motion types to be activated and the virtual motion sensors to be triggered.

Then finally use those motion sensors in your rules. I don't use them to trigger lights but I use them to help keep them on. It works perfectly. Even when my Xiaomi motion sensors don't register movement because I'm sat watching TV, the camera will sense me as a "person" and keep the lights on :grinning:

It may seem a bit daunting but is actually quite straightforward to set up :grinning: pls try it and I will try to help if you get stuck.

1 Like

@Angus_M sorry I didn't send this to you yesterday but I change from my phone and put it on TinyCam on a pc and I still have the same issue? It still not triggering the Motion?

hi @leeonestop
Just wanted to ask how you run Tinycam on a pc, I used the Bluestack software, but it ran under a different ip range and I was unable to access my local network cameras? I could not find a way to make it run with the same ip as the local network?

@greglsh I'm using Bluestack and it working good and I'm using the regular IP of my camera? I using IP cam and no issues? When you say a different IP range as I put in the ip of my camera so not sure about the different range issue?

@Angus_M I also notice in the direction about you circle the android camera and I'm using the ip camera does that make a difference? Thanks

Hi, no you can use any camera supported by tinyCam. Just make sure it is sensing motion/objects in tinyCam first using the live view. Then it should be sending the webhook to HE for the child app to read.

@Angus_M I get the motion on the camera but the webhook is not coming through? I don't see it in the logs?

image

Thanks for all you help @Angus_M finally got it and it was my typing that got me in trouble. Thanks. I having another issue when one of my camera becomes active with motion(Office) the other one shows motion(Garage) and there is no one in the Garage just office??? I check the settings and both is the showing the correct settings? I just try again and I even check IP and port? Thanks

You must have 2 child apps installed - one for each camera. Then put the relevant local url from each child app into the Webhook for the relevant camera.

Just a note regarding sensitivity. I had a camera in my Living Room identify a vehicle and a person while no one was in the room lol :grinning:

While there could have been a person, there definitely should not be a vehicle! :rofl:

There is an option in tinyCam settings for the camera to zoom into the area of motion or object detection. This is very helpful in these cases. I saw that the system had identified a person in a photo ha ha ha and a vehicle from my curtains (actually it was a boat so not sure what it was really seeing?!?!). Anyway, by adjusting the sensitivity down in tinyCam I could stop these false positives.

thanks for the info. I just added another camera and it ok. Sensitivity did fix those two that were following each other.

1 Like

Glad you got it working. Cool :wink:
Enjoy!

Me, too. Followed your detailed instructions and everything is working using an Android phone as a camera. Thank you for the app and taking the time to give me the step-by-step.

I had a little hiccup because I forgot to authorize oAuth but that was quickly resolved.

FWIW, my use case is for a motion detector inside a window monitoring an outside porch that has been difficult for me to find a PIR sensors that works well. This should do it!

1 Like