Make a motion sensor device from a SecuritySpy camera?

Posted on
Thu Aug 01, 2019 6:43 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Make a motion sensor device from a SecuritySpy camera?

Ah yes. That would be a... uh... bug. :-(

Fixed (1.2.1).

Cheers
-- perry

Posted on
Sat Aug 03, 2019 4:19 am
Grognard offline
User avatar
Posts: 53
Joined: May 17, 2011
Location: Seabrook, TX

Re: Make a motion sensor device from a SecuritySpy camera?

I can confirm that with the 1.2.1 update to Cynical Behaviors, combining Cynical SecuritySpy with Presence devices now works as described for me (dropdown in trigger action is correctly populated with Presence devices).

Very handy, thanks!

Posted on
Fri Oct 18, 2019 12:55 am
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: Make a motion sensor device from a SecuritySpy camera?

what I'd like to do leverage this functionality to work as a presence sensor rather than motion sensor, specifically for cars in a driveway.
A parked car in a driveway will only be recognised if it (or something in front of it) moves.

This would mean requesting SS to analyse an image periodically for presence of vehicles.

I can see a few challenges (not possible to identify which subset of the screen to send to the AI engine, so probably not a routine to run every second), however there are some obvious use-cases.

I can't see a way of achieving this right now - any thoughts?


[edit: I see from the Ben software site that SS actually uses the whole image for recognition, not just the area of movement...so that's good...]

Posted on
Sat Oct 19, 2019 10:30 pm
Perry The Cynic offline
Posts: 836
Joined: Apr 07, 2008

Re: Make a motion sensor device from a SecuritySpy camera?

agame wrote:
what I'd like to do leverage this functionality to work as a presence sensor rather than motion sensor, specifically for cars in a driveway.
A parked car in a driveway will only be recognised if it (or something in front of it) moves.

This would mean requesting SS to analyse an image periodically for presence of vehicles.

I can see a few challenges (not possible to identify which subset of the screen to send to the AI engine, so probably not a routine to run every second), however there are some obvious use-cases.

I can't see a way of achieving this right now - any thoughts?

I talked to Ben (maker of SecuritySpy) when I did the last update, and he confirmed that there's currently no way to ask it to (re-)analyze images explicitly. All image recognition is triggered by picture changes.

On the other hand (he points out rightly), a car is not going to disappear from your driveway without moving. (We hope.) So if you keep the "car last seen" state around and update it on motion, you should fairly reliably know whether a car is there right now or not. You can model that with a simple boolean Indigo variable and suitable camera triggers. (Or use a Cynical Behaviors Presence device for that. For this simple use, you can have the triggers simply turn the Presence device on and off directly.)

As to what triggers to use: Try Camera Motion Events configured to Detect: Vehicle (with a fairly high threshold; start at 80 and experiment). And nobly note that there's a Negate checkbox right underneath that's specifically designed to detect when there's motion but there is not a vehicle (or whatever you've specified above)... which is exactly the way you detect that the (last) car has left the picture. So try a pair of triggers, configured identically except one has the negate box checked, to record "car there" and "car not there" respectively. Only one of them (at most) will fire for any change.

Cheers
-- perry

Posted on
Sat Oct 19, 2019 10:54 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: Make a motion sensor device from a SecuritySpy camera?

thanks for that detailed response.

I have a further challenge, which is that the drive is rather long (4 cameras cover parts of it) and it has dual entrances. And several vehicles could be present. So I think this sort of logic might be difficult to apply. In the absence of something other than a vehicle to trigger recognition, vehicles will be detected in the last (exiting) motion detection event of each camera also, so I think at best this will give me 'vehicle last confirmed to be present (or exiting)'.

But what might try is just dialling down the sensitivity threshold for the raw motion-detection...there's possibly enough wind/sun/animal activity to trigger fairly frequent recognition events. The challenge is to find a way of running the recognition algorithm on each of the images regularly - provided I can't achieve this, the approach (as you suggest of finding images with no vehicles present) should work fine.

Posted on
Mon Oct 21, 2019 4:59 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Make a motion sensor device from a SecuritySpy camera?

Vehicles: I think ideally a platform where the vehicle provided the ID (like badging in and out of the property via a card or having a RFID tag or Bluetooth tag on each vehicle) would be the preferred way to go to be as accurate as possible.

Another method would be to leverage LPR technology. I don't think SS is using this yet, so that may lead to switching platforms. I believe Blue Iris has that capability and there is a plugin for that as well. Minus the cost of adding a PC to your ecosystem (or a virtual box on existing system), their software is relatively inexpensive and could be run in tandem with SS. If you then run an LPR on exit and entry, you would have a pretty good dataset of the # of vehicles on site and which vehicles they are.

A couple interesting reads on the topic for a cloud based system:
https://community.smartthings.com/t/blueiris-machine-learning-for-vehicle-and-people-detection-webcore-make-your-ip-cameras-smarter/168624
https://www.sighthound.com/products/cloud

The ability to track items that don't move is still relatively new and I haven't seen it in the public yet. That tech was originally designed for the Heathrow airport to track things like a suitcase that is set down and then left. So it compares the image to a saved state, ignores movement and the remainder is something that isn't moving and isn't part of the original background. I haven't heard of anyone using that technology for vehicles (even though the concept is similar), most use LPR to achieve that.

Bill
My Plugin: My People

Posted on
Mon Oct 21, 2019 5:19 pm
whmoorejr offline
User avatar
Posts: 762
Joined: Jan 15, 2013
Location: Houston, TX

Re: Make a motion sensor device from a SecuritySpy camera?

emergent wrote:
Is this possible and how would you go about it? I want to make a motion sensor device that changes stastes when the camera detects motion.



Motion Device: This is my solution for creating motion devices from cameras. (Using a "Timer" device as a Motion Sensor device)

For each camera, I created 2 triggers, 2 variables and 1 timer device. For discussion, I'll call it GarageCam.

Trigger1: "Garage Cam Motion Received" -> Set variable GarageCamMotion to true, insert timestamp into variable GarageCamDTG, restart timer "GarageCam"
(I use "restart" timer because that will start with the initial value of the timer if the timer is inactive or restart the timer to the initial value if it was triggered again while actively counting down)

Trigger2: "Garage Cam Timer End" -> Set variable GarageCamMotion to false

With the above setup, I can easily adjust how long motion stays indicated "dwell time" by adjusting the initial amount value of the timer device. I can also see the status of camera motion with either the variable or by looking at the timer device.

I went this route because as I kept changing cameras, NVRs, software, etc, I would have to change out plugins and all the triggers, devices, control pages, etc associated with them. Now if I decide to add a new technology or switch out a technology, I would just have the new system set to trigger my current timers and variables. (no cascade of changes elsewhere.... I hope).

Bill
My Plugin: My People

Posted on
Mon Oct 21, 2019 10:15 pm
agame offline
Posts: 514
Joined: Jul 13, 2017
Location: Melbourne, Australia

Re: Make a motion sensor device from a SecuritySpy camera?

whmoorejr wrote:
Vehicles: I think ideally a platform where the vehicle provided the ID (like badging in and out of the property via a card or having a RFID tag or Bluetooth tag on each vehicle) would be the preferred way to go to be as accurate as possible.

Another method would be to leverage LPR technology..



Indeed those would be other approaches, however I want to detect any vehicle, not specifically equipped ones. Oddly enough I'm currently in Singapore at the world's main transport tech conference...all these things are certainly possible and on show here however what I want to achieve is a bit simpler (I don't need to identify specific vehicles or number plates). I also don't want to send data to the cloud for recognition as this is a remote location with satellite uplink.

Oddly enough, I have found the Unifi plugin's feature that reports 'neighbouring access points' very handy for identifying a few specific vehicles just for an experiment. Will only work with a car having a wifi footprint of course, however dash cams generally do.

I've found artificially increasing the sensitivity of the 'raw' motion detection, and decreasing sensitivity of the vehicle recognition...is working reasonably well now.

Who is online

Users browsing this forum: No registered users and 7 guests

cron