Tuya ZigBee Multi-Sensor 4 in 1 Smart PIR Motion Humidity Light Temperature Sensor

Hi Copywiz,
I’m glad you’re able to get it some of it working. First, always test your service calls in Developer Tools to figure out how to do it correctly. That’s the best/easiest way to learn how to do this stuff. Lot’s of trial and error. The more you play, the easier this all gets.

In my example [IEEE] should be replaced with your device’s IEEE.
(To find your sensor’s IEEE, go to Settings → Devices & Services → Devices → Search for your multi-sensor → Look in the Device Info Box → It’s listed under Zigbee Info.)

Here’s my exact automation yaml:
If you cut and paste all of this, you must change the IEEE. In my experience, using names/entity IDs for this won’t work.

alias: Manually Refresh Multi Sensors
description: 'Forces an attribute read on temp and humid clusters'
trigger:
  - platform: time_pattern
    minutes: /5
condition: []
action:
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 8c:f0:00:ff:ff:00:00:99
      cluster: 1029
      attribute: 0
      tries: 10
      event_done: zha_done
  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: 8c:f0:00:ff:ff:00:00:99
      cluster: 1026
      attribute: 0
      tries: 10
      event_done: zha_done
mode: single

Hi Hesmith1029,
Based on what I’ve read, it does look like Zigbee2Mqtt users aren’t having this problem. When using ZHA the temp and humidity don’t report except when initially paired. Manually reading the clusters (either via ZHA toolkit or from “Manage Clusters” in the device directly) do report accurate readings.

It sounds like what you really want is an occupancy sensor or human presence sensor (so if you’re not moving it still detects your presence). Motion sensors like these are called PIR or passive infrared motion sensors, it requires movement to detect motion. Sitting at a desk probably isn’t enough movement for any PIR sensor; I’ve got the same issue too.

However, occupancy sensors use mmWave radar and the Doppler effect to determine if there’s a body in the room. AliExpress has a few of these:

I have that last one on order and I’ll let you know if it works any better once it arrives.

The tip from AliExpress about re-pairing to fix the temp and humidity doesn’t work for me. I tried it a few different times. Since things appear to be working on Z2M, I would guess that the problem will resolve on ZHA in a future update. As someone else pointed out, it might need a ZHA quirk too. The automation I made fixes things for now on ZHA.

Thank you @wryandginger for that automation. Works like a charm.

1 Like

Been following the conversation, I’m interested in this device but I’m curious though what the battery life is between charges. I sort of like the Aqara sensors in terms of just using a changeable battery, as it means I don’t have to move the device somewhere for it to recharge. How are you all handling the recharge process?

Unfortunately I don’t know about the battery life…Fortunately these take either CR123A batteries or you can use the micro USB port in the battery compartment. It’s not ideal, but maybe running a long micro usb cable might be a good option. The mount is also magnetic, so it’s easily removed to change batteries if you need to go that direction.

I read in another forum/thread that using rechargeable CR123A batteries messes with the motion sensor, giving false motion alerts due to battery voltage problems. I just decided to go with keeping it powered via USB to get around all the battery issues. You also cannot use batteries and the USB at the same time. The USB port straddles both battery slots, so I don’t see how you could fit even one battery and use the port. The documentation does say you can operate using one battery or two.

The issue with keeping it USB powered is the battery door doesn’t close with it plugged in. To account for this, I just drilled a small hole to let the cord pass through. You can also just leave the battery door off or there may be some extra slim usb cables that might fit with the door closed. Besides these small issues, it works just fine with USB power. (fwiw: The sensor is still an end device and doesn’t route when plugged in)

I feel like such a huge fanboy for these sensors. I have 4 of them and I love how responsive they are. They’re on par/better than Philips Hue motion sensors in my setup and I love that they’re significantly cheaper and never need batteries. I highly recommend these even with the reporting weirdness.

1 Like

Just following up on my post earlier (sorry If I’m spamming the thread). I just got two of these occupancy sensors in the mail yesterday.

Unfortunately they don’t yet work with ZHA. I put in a device support request. I tried appending the manufacturer info to the quirk for other mmWave devices, but I can’t get the entity to show motion. (see: [Device Support Request] · Issue #1590 · zigpy/zha-device-handlers · GitHub)

It appears to be the same basic design as the sensor mentioned here:

https://community.home-assistant.io/t/tuya-wifi-smart-human-body-sensor-radar-microwave-motion-sensor/426846

It will likely have the same kinds of issues as the wifi version given that they both use the same sensor module. So, I can’t really recommend the radar device at this time.

So, there’s a working custom quirk available on the ZHA device handlers github. In my house I have these on a wall pointed at places where I’d be sitting still/working but not making movement that a PIR would catch. So far there are very few false readings. I really like these so far. It seems like they take some time to calibrate – I had a lot of false alerts initially but none now for two days.

Assuming that a quirk is written to adjust cooldown time (24 seconds is what this can do!) and adjust target distance, this would be a perfect occupancy sensor.

hey mate, what do mean by calibration?

if it helps anyone reading this … for NO humidity & temperature you need to set the “Clusters” under device info for the unit … would appear the hum & temp arent pointing at anything

To what? How?

I have the same question :slight_smile: The sensor works fine, it does auto update in Decon, but I prefer to use ZHA. But in ZHA , humidity and temperature are not updated :frowning:

It “works”, but not really like a charm! The resolution seems way off.

It’s kinda working now, I hope official support will come soon…

The automation fixes the temp and humidity issue but for some reason it randomly reports motion to be reported even when there is no motion.

Are the cluster IDs unique or something? It’s a bit annoying when the lights come on in the middle of the night for no reason.

Do these sensors also work as zigbee router when powered with usb?

Unfortunately, the Fantem 4 in 1 sensors don’t act as routers. The mmWave presence sensor I posted about does act as a router and seems to do a good job.

Hey, I just wanted to add my experience with these - I’ve got two of the Immax ones.

Initially, I had trouble setting them up with Zigbee2MQTT, turns out they were already paired to something else, and didn’t want to go into pairing mode again. A factory reset solved this and they both connected fine. The Fantem ones say they are compatible with both ZHA & Zigbee2MQTT, but the Immax ones say they only work with Zigbee2MQTT, so be careful which one you buy.

In terms of reporting, one of them only reported tamper & occupancy, while the other had everything showing up, but that wasn’t a problem for me since one of them was going to be used as a motion detector for a hallway light. Since reading this thread, I’ve connected both of them to USB power and now everything seems to be working fine on both.

You mean all sensors (on the Fantem 4 in 1) work with ZHA as long as you connect through USB Power?

I have my answer, I tested it with ZHA, the device is still barely usable. With Zigbee2mqtt it really is a fantastic device!!

After 4 months, the battery % is still reporting as 100%. Looks like it’s another attribute that does not get properly reported.

I tried adding the following to my automation:

  - service: zha_toolkit.execute
    data:
      command: attr_read
      ieee: <redacted>
      endpoint: 1
      cluster: 1
      attribute: 33
      tries: 10
      event_done: zha_done

But that does not work (with or without the ‘endpoint’ attribute). Or maybe it does work and I have an infinite-life battery (cue twilight-zone theme).

Hi,

I’m having the exact problem with the sensor; no update on humidity or temperature.
Bit out my depth here. Have installed the ZHA toolkit. But don’t understand where the code goes!?. So tried using the ZHA dropdown options in an automation.
Any help appreciated

![Screenshot 2024-03-12 at 13.36.20|690x235]
(upload://t3KSUtFVDKx2Zv6ddEftfzAYUPx.png)