Occupancy sensor (again)

Hey guys, i’m interested in setting up simple light automation and wonder what logic to use here. I’ve read through the forums and don’t see much solutions besides room manager smart app which has been discontinued. My routine logic goes something like this:
-a motion sensor in the room detects movement and turns on virtual occupancy switch with a timer, counting to 5 min.
-if it’s the first time the switch has been tripped in last 5 min, turn on the lights.
-every time there’s a movement the timer resets
-when counter reaches 5 min, set virtual occupncy switch to off + turn off the lights.

I can probably strenghten this by adding second motion sensor, checking whether my phone is present in the room which would override the counter, and also working with a smartcam for detecting motion such as TV image changing.

Is my logic correct? Also is there a virtual switch with timer available for the new smartthings? I guess there must be a driver?

Thanks in advance

There used to be several different project approaches to solving this problem, but to be honest, beginning at the end of 2022 most people just started using millimeterwave radar occupancy sensors. These are fairly inexpensive now, there are several companies offering them for around $85, and one will cover an entire room with up to 30 different zones. they work regardless of the local temperature, lux level, or humidity level, which makes them useful in a number of rooms like bathrooms and laundry rooms where traditional PIR sensors didn’t work and cameras were not desirable for privacy reasons.

Traditional PIR (passive infrared) sensors could only detect large movements like a person walking, so they led to the problem of lights being turned off prematurely, because they could not detect fine movements like someone eating at a table or typing. And they could not detect very fine movements, like someone breathing.

MMWave sensors can detect both, so they can even know when someone is sleeping in a bed versus the bed being empty.

If you have your own reasons for wanting to design a multi device, custom software option, it could be a fun project, and I will leave that to others to discuss the various pieces of it. :thinking:

But if you just want to solve the use case of keeping the lights on when people are still in a room, I would look into the MMwave sensors. There’s one from aqara (the FP2) that’s getting a lot of buzz right now, and two from Tuya, and I’m pretty sure there’s an edge driver for at least one of those.

(Alternatively, both companies have promised Matter support eventually, so in a few months you might be able to buy one, connect it to its own inexpensive hub, then bring the device into smartthings that way. That’s not here yet, though.)

As for a virtual device with a timer, yes, there are some. Check the quick Browse lists in the community – created wiki, and look for the list for virtual devices.

https://thingsthataresmart.wiki/index.php?title=Quick_Browse_Lists_for_Edge_Drivers

2 Likes

I believe @X0mbie is using one of the Tuya MM wave sensors with smartthings and might be able to share some comments on how it’s working.

@ygerlovin has an edge Driver for Aqara devices which includes the now discontinued FP1 mm wave sensor. I don’t know if the FP2 has been added. :thinking:

2 Likes

My mmwave sensor is working great. I’m using W35l 3y’s driver.

If you watch this YouTube video it explains how to set it up.

Hope this helps.

4 Likes

A mmwave sensor is probably your best bet, especially in places like a living room wher you may be present but sitting still. I’m currently using Everything Smarthome’s EP1 sensor and getting it tuned in to my liking.

The next best option is using 1, or multiple, IR motion sensor and using a delay/remains for turning off the lights. i.e. no motion for X minutes. This can be done directly in the Routine condition without a virtual switch.

3 Likes

Thanks guys, looks like mmwave is definitely the way to go!

1 Like

Which sensor are you using?

I’m using one similar to this.

MAKIVI 1 Piece ZigBee Human Presence Sensor MmWave Radar High Precision Sensing Human Body Presence Sensor Support Tuya Plastic https://a.co/d/bG39DyQ

I can no longer find my exact one on Amazon.

I have had the FP1 in my bathroom for about a year now and overall, my experience has been mostly positive. The device is very sensitive and accurate and can even be installed behind obstacles. However, it does require a continuous power supply which limits the locations where it can be installed. Additionally, it tends to react to even the slightest movement, causing it to trigger multiple states throughout a washing machine cycle.

1 Like

I also use some Aqara FP1’s they are now very stable but as Andrew states they are very sensitive The don’t work well in rooms with ceiling fans if the fan is on they will report presence so you need to have other sensors and some creative routines to accommodate them. I also was surprised that the field of view is not as large as the specifications indicate.

1 Like

Lol i literally needed it to turn the fan on when rom is occupied. I guess that’s out of question unless i somehow block it’s field of view, or radar that it’s using.

I also have a cat, wonder if it’s
Gonna end up turning lights and dans on in the middle of the night :slight_smile:

It will turn the fan on, but you would need another way of turning it off, such as a timer or no-motion. Can’t speak about the cats but I assume it will more than likely detect them.I use other rooms FP1 to turn off unoccupied rooms with fans, but I can only do that when only one of us is home.

I have a cat, so all my motion automations are disabled at night

2 Likes

Got myself the aqara fp1 and it works great. Now i’m searching for a way to block the radio/radar to target it to one area. Aluminium foil? Something thicker?

1 Like

PIR sensors have a lens which detects changes in heat as an object moves across the field of you, so you can often narrow the detection field by taping over the lens.

MMwave sensors, though, are completely different technology, and don’t have a lens. They are basically sending out sonar waves and detecting the bounces as they come back. So you can’t block it the way you can with the PIR lens.

You can try positioning it at different places and different angles to see if that makes any difference.

But really the best way to do This is to connect it to a controller that can give you regions and then you just don’t get reports from the problematic region.

Unfortunately, smartthings doesn’t do that directly. :thinking:

You would probably have to connect it to an aqara hub or to home assistant, and then maybe use MQTT to bring it into smartthings. Which is a lot of work.

In the future, there may be an aqara hub which exposes it through matter, in which case each region will probably be exposed as an individual motion sensor. But we aren’t there yet.

Here’s a teardown on the FP1.

2 Likes

Hi,
So you’re saying there is no way to block the sonar waves? So for example if I put the sensor in a steel box, it would still function just fine?

No, you can always block radio waves.

It’s rather that with a PIR lens it’s easy to know where to block.

With a mmWave sensor the information comes back to the sensor at a less predictable angle, so it’s harder to know where to put the block if you were trying to put it on the sensor itself. But again, you can experiment if you want. That’s the same thing as angling it in a different way.