How to use mmWave presence sensor in rules?

I just added a Tuya mmWave presence sensor (as a "Tuya Zigbee mmWave sensor" device) and I'm trying to figure out how to use it with a rule. Basically, I want to do something simple like turn a light on when someone is in the room (whether they're moving or not) and turn it off when they leave. When I try to use it in a rule, it shows up as a motion sensor and not a presence sensor. Is this correct, or do I have something configured wrong?

This is correct. mmWave presence sensors are motion sensors in Hubitat.

Presence in Hubitat terms are generally arrival and departure from a location rather than in a room.

3 Likes

This is correct. It seems like most people, including myself, recommend using a traditional PIR sensor to turn lights on due to the speed of pir sensors, and probably false positives experienced with some mmWave sensors. Then use the mmWave sensor to turn the lights off after it becomes inactive.

2 Likes

mmWave presence sensors are motion sensors in Hubitat.

When I look at the states for this device, it seems to have three: present, not present, and moving. So, if this is treated as a motion detector (which typically just two states), is the present-but-not-moving treated as motion or no motion?

What driver is this using?

Tuya Zigbee mmWave Sensor v3.3.4 (driver)

As I'm sitting here, not moving...

image

That’s not a built-in driver. Best off checking with the author of that driver how the attributes and states should be used.

Looks like a question for @kkossev , best addressed by posting on the driver thread he created. I see that it has motion:inactive. Does it also have a pir sensor built in?

2 Likes

No, but I do see the illuminance value changing when I change the brightness of the room, so that may be useful.

So I am assuming big movement is motion active and small movement is human presence. I would create a virtual presence switch device and a RM rule to turn on the switch when Human presence is detected and off when it’s not. You’ll have to use the custom commands in RM for this. Then you can use both attributes in a motion lighting or room lighting rule.

Same driver Linptech mm occupancy sensor. Works without issues. Simple Automation Rules.

1 Like

Unfortunately, that doesn't work for me. When I tried it, I walked into the room and the light turned on, as expected. But when I sat down and didn't move (a lot), the light turned off after a few seconds because the sensor was reporting my presence, but no movement.

I solved my problem by giving up on the simple rules and using the rule machine instead. I'm triggering my events based on the presence attribute of the sensor.

Hi John,

Can you post a screenshot of the device details section (the Zigbee model/manufacturer), and a second screenshot of the Preferences tab?

image
Depending on the device model, these parameters may mean zero sensitivity.... or maximum sensitivity - every Tuya manufacturer has it's own interpretation. In both scenarios, zero is an edge value and is suspicious.

You must use the standard 'motion' attribute in the automation, and the 'motion' must change between 'active' and 'inactive' states.

The 'humanMotionState' attribute provides additional information on the 'motion active ' state - whether you are moving fast, moving slow or standing still. But again, this depends on the device model, and there are now probably 50 different Tuya mmWave sensors manufacturers, each is behaving differently.

2 Likes

image

For some reason, the two motion sensitivity parameters are empty... Are you on the latest HE platform version 2.4.0.145?

Enter a medium sensitivity value of 5 for both missing parameters and click on Save.
Will the 'Current States' section radarSensitivity and staticDetectionSensitivity attributes be updated to whatever number you set in the Preferences?

If the radarSensitivity and staticDetectionSensitivity attributes in the 'Current States' section are still zeroes, will hitting the 'Refresh' button make any change?

The static detection sensitivity is still 0 even though I set it to 5. So the human motion & motion states went from moving/active to present/active, to present/inactive, to none/inactive when I walked into the room and sat down and did not move.

image

There is something wrong with setting the staticDetectionSensitivity, this will explain why the detection changes to none/inactive when you do not move ...

Also, have you tried powering off the device for 30 seconds?
Is it 110V mains powered or DC/USB powered?

I am on the latest HE platform.
It is USB powered.
I did not try unplugging it, but I will.

It's this sensor:
https://www.amazon.com/gp/product/B0DGQD7DXB/ref=ppx_yo_dt_b_asin_title_o02_s00?ie=UTF8&psc=1

1 Like