I have four of these sensors at home and I can test your driver, but you need to add the link so we can subscribe to your channel and install the driver.
To keep the configuration I’ve selected remove device (without deleting data/factory resetting) and then added the device in smartthings.
Expectation was that this configuration will be reflected / sustained in the smartthings app, but, after adding the device this is the configuration that appears:
Just to clarify, your driver reads the configuration values from the device on commissioning or this is just the default values of the driver?
Another question about the detection method: from the documentation I’ve understood that pir+radar was the option that substituted “PIR Only” bit that not seams to be the case in your driver.
During the pairing process, the device does not send its previously stored configuration values to SmartThings. This is a limitation of the device firmware
The values you see initially in SmartThings are simply default placeholders created by the driver.
However, when you change any configuration through SmartThings, the device correctly applies the new settings, and they take effect as expected.
The PIR, PIR + Radar, and Radar modes used in the driver follow the Tuya Zigbee specification exactly.
Ultimately, all behavior depends on how the Tuya device firmware implements these modes.
I’ve identified a discrepancy between the device documentation and the actual device firmware regarding motion detection distance.
Although the firmware reports that the Minimum detection distance value should function correctly, real-world testing shows that it does not behave as expected.
Based on the documentation, Motion detection distance is equivalent to the Maximum detection distance value shown in SmartThings.
After performing additional tests, I will consider removing the Minimum detection distance option from the SmartThings Edge driver, since its functionality appears unreliable.
For detection modes, the PIR + Radar value is reported exactly as provided by the firmware.
The firmware exposes three distinct modes: PIR + Radar, Radar only, and PIR only.
However, I cannot confirm how these modes behave internally in practical use.
Because all three are simply reported by the device firmware, you will need to test them directly to understand their real-world behavior.
SmartThings settings cannot be changed by drivers so they’ll never reflect the actual state of a device. It’s possible to write things to the device when a setting changes but they won’t reflect the state if it changed by other means or if the write operation failed. In Matter that’s even more problematic since multiple platforms could change things.
The only way to sync the state with the driver is using custom capabilities in the details screen instead of settings.
@wonjj6768 I was trying to add another of my sensors with your driver but it’s not working correctly, saw that the driver was updated today, wondering if something was broken .
The other sensor that was paired before continue to work normally.
I have Mariano’s motion sensor driver installed in my hub, so, sometimes the new sensor is added with your driver and sometimes with Marianos driver first.
When paired with your driver, this new sensor simply doesn’t respond:
When paired with Marianos MC driver first, after doing a driver change to your driver the device details show signal quality, illuminance and state, but presence are not updated.
Today I was able to do more testing with a different ZG-204ZM sensor. It was configured in smart life app with the default radar parameters: detection distance = 500cm, motion detection sensitivity = 5x, stationary detection sensitivity = 6x and motion detection = “radar and PIR”. Removed it from the smart life app without wiping data or factory resetting and added to smartthings with this driver. Again had the same result as before: if paired directly with your driver device don’t respond and if paired first with Mariano’s Motion Sensor MC driver and then change to this driver, motion state and signal quality working, but not the occupancy. Then i removed it from smartthings and added back to smart life app again and, for my surprise, the radar parameters was changed: motion detection sensitivity was set to 0x, stationary detection sensitivity was set to 5x and motion detection to “radar or PIR”.
Reset the default configuration in smart life app, removed it again and added again to smartthings to play with configuration.
The conclusion is: when the device is added directly with this driver, doesn’t matter what changes are made in configurations, the device will not work at all, even signal quality doesn’t update.
But, if the device is first added with “Zigbee Motion Sensor MC” driver (or changed to) and changed back to this driver, then the device start working after adjusting configuration parameters.
My guess is that the driver is messing with the parameters in the initial configuration of the device when commissioning and device is not being initialized correctly.
Maybe that’s the way to go. Taking this case as example, configuration seams to not been made correctly on initialization, So i have to reset every setting to try to make sure sensor are correctly configured and have to believe that the configured value was correctly adjusted on device.
To be fair it’s a pain to expose everything as custom capabilities and sync the information, not even SmartThings creates capabilities for things like the time to hold the occupancy if no movement detected or sensitivity adjustments and just adds settings that don’t reflect the actual state.
Other times, especially when the vendor uses custom non-standard clusters, writing values may be easy if you know what to write and where but getting the reading and updates when it changes not so much.
To resolve the inconsistency between SmartThings settings and Tuya device settings, the driver has been updated to apply SmartThings settings to the Tuya device immediately after pairing.
On my end, I have no issues with device status even when pairing directly with my driver. I am unable to reproduce this issue.
As someone without a Tuya hub, this driver is freaking fantastic. Don’t get me wrong I’m tweaking a bit till I find the perfect settings and because these devices are random as heck I’m sure that’s part of why I’ve got 1 that’s behaving differently then the four others I have set up, but this driver has allowed me to tweak until I’ve got it perfect.