Camera as occupancy sensor?

The “normal” way that I’ve been doing occupancy detection is using motion sensors - if no motion has been detected for X amount of time, assume no occupancy, otherwise there is someone there. This works fairly well - until I curl up on the couch with a good book, or to watch TV or the like. At that point, no motion is detected, and no occupancy is assumed (incorrectly, of course!).

It occurred to me that Since EzVidoo has object - and person - detection capabilities, perhaps a camera could be used for occupancy detection? The idea would be that the image would be checked for objects - specifically people - every so often (say, every 30 seconds or 1 minute, perhaps user configurable), and if a person is detected, then assume occupancy, otherwise if no person is detected in multiple checks over X minutes, assume no occupancy.

In essence, there would be a “person” sensor associated with the camera that behaves exactly like a motion sensor, except it is triggered by the detection or absence of a person in the image. This sensor could then be used in meshbots in the same way as a motion sensor would.

I actually implemented this concept externally using Python and PyCoral (https://coral.ai) on my driveway security camera to excellent effect. I have that running at 5 frames per second so I get immediate notification of anything interesting in my driveway - though there I look for more than just people (cars, trucks, cats, dogs, moose…). It would be really cool if it could be integrated with the Ezlo ecosystem, however, so I could use it to do things like turn on lights if it is night.

Indeed you can do that today with our Meshbots and vidoo.

Ok, right now I can’t even figure out how to make a meshbot for my Video virtual hub :slight_smile: I thought I was able to access a ezlogic page for it, but I don’t recall now how to do that. In any case, if the VistaCam 1203 device on my Ezlo Plus is any indication, all that you can do at the moment is fine-tune motion detection to only trigger if there is an object. Unfortunately, that doesn’t solve the issue of detecting people when there isn’t motion.

If, in fact, you can currently detect people, even when there is no motion, how would I do that? Or, more specifically, how would I make a meshbot that triggers when there are no people in the shot?

You have to setup vidoo…
Then when creating a meshbot, select the vidoo Hub ID (each vidoo has its own Hub ID)…
Ezlogic will then give you all the capabilities available…including person detection…

Right. I did that:


So it shows up, and is listed as “online”.

But it is not an option to select when creating a meshbot:
Screen Shot 2022-03-24 at 9.52.45 AM
Just my two Atoms and the Ezlo Plus.

It’s Unassigned. Try adding the vidoo controller to the Ezlo Main group.

Ok, so apparently a controller has to be part of a group to be able to create mesh bots on it. Works though - go figure. :man_shrugging:

In any case, with that sorted, I still don’t see how I could use the camera as an improved occupancy sensor. I can set it up to trigger on “object detection”, which would presumably trigger the first time an object is detected???, and I can choose NOT for that rule (or make an action when that is False) - though I don’t grasp what that would do, but I don’t see a function option such that I can say “When I haven’t detected a person for X amount of time”, do something, such as I can do with motion sensors. Am I missing something still?

How does this trigger actually work? What is happening under the hood here to make this trigger fire, and under what scenario would an action on “False” actually run?

Sorry to be so dense! This looks promising though!

@Levent is the guy to answer Vidoo questions.

Hi @ibrewster , You are right, vidoo in ezlogic just works when the motion is detected. So for now we don’t have “when motion detection is stopped” functionality yet. But that can be added of course.
In addition the feature you need is detecting people when there isn’t motion.
Also You need to combine that with our FOR function. You can’t use functions directly for Vidoo triggers yet but you can use it for the whole trigger block.

1 Like

Exactly. I would note that I don’t actually “need” this feature - I just think it would be a cool addition if it was possible. :slight_smile:

Good morning ibrewster

My answer may not be directly applicable to your question, but here is what I have done to correct the occupancy issue.

  1. The primary duty of this specific motion sensor is to activate living room secondary lights, it is made to detect activity based on a light sensor and at certain time of the day, in my case ( if it is dark in the room between 4:00 pm and sunrise arm the motion sensor.

  2. Now, if motion is detected turn secondary lights on for 30 minutes, ( I would have to assume that within that 30 min window, movement is bound to happen ).

Dom

Yeah, in my case, while I would likely use this for lights as well, I have a “digital photo frame/house status board” device that I would be turning off when there is no one in the room (and turning back on when someone is). The turning on part works fine, based solely on motion, but if I curl up with a good book for a while (or watch a tv show), then no motion is detected for an extended period of time, and the screen turns off even though I am still in the room.

Being able to use a camera that is continually checking for “people” in the scene - even if there is no motion - and triggering off of that instead would solve the issue handily, but is not currently an option.

I can (and have) written a stand-alone script to do this, but having it nicely integrated with the home automation system would be a nice touch! :smiley: