See the first post in this thread, there's a link to the latest version there. Go to the Drivers Code tab in hubitat, find the existing driver code and paste the code from that link in there and press Save. It may take quite a while to process the driver. I suspect you may need to press the Configure button on the device page.
I was too much cautious in the last month not forcing any updates via HPM... : )
An update to version 3.2.2 is pushed for update via HPM now. I have also filled in the versions history page in post#3.
I maintain two versions of this (and other) drivers :
- a production version (presumably stable), which is available for an update via HPM.
- developments branch version - includes support for new devices, but also some changes in the common code (libraries) shared with other drivers.
As I don't have all the devices supported by this and the other drivers, it is not possible to fully test everything. So that's why the dev .branch versions exist - if no one complains that something has got broken in the latest versions, I usually merge the same code changes in the main version a week or two later, and then increase the HPM manifest version, which pushes a notification that there is driver version update for all users.
The easiest way to update the driver to the latest developments branch version is :
-
Click on ''Drivers Code"
-
Filter the list of the drivers shown (type 'mmWave' as an example)
-
Click on the driver name
-
Click on the Import button on the top right corner.
The correct URL of the dev. branch code should be already filled in automatically.
5.Click again on the Import button within the popup window
-
Confirm the driver code overriding.
-
Click on the 'Save' button :
Should not be necessary, the driver code checks for versions change and should add any new options (preferences) with their default values automatically.
Hi,
One of my devices is stuck on "motion : active", "humanMotionState : present".
I tried deleting it, change driver, change type - it stuck in this status... How can I check it?
This is the device type:
- endpointId: 01
- application: 4A
- manufacturer: _TZE204_ijxvkhd0
- model: TS0601
- tuyaVersion: 1.0.10
Thanks.
Can you make a screenshot of the State Variables section?
Have you tried to forcibly set the motion to inactive state?
First, select 'Inactive' from the drop-down menu, then click on the button above.
]
The motion attribute will switch to 'inactive'. Will it become active again shortly after a movement is detected?
Also, check whether the Zigbee connectivity to the radar is OK. If you click on the Ping() button 10 times with 1-2 seconds delay between the clicks, you should see 10 RTT (round-trip time) numbers in the range 70..250 milliseconds, and never see a 'Timeout!' error messages.
Enable the Debug logging from the Prefefences section and click on the Save Preferences button.
Monitor the live logs. Do you see any debug messages as you move around the sensor?
Hi,
after forcing "inactive" and entering the room the state changes back to "active".
the rtt is fine - 60 to 90 ms. no time out at all.
please see the debug log - maybe you will understand something...
This device worked fine. I don't know what happened to it. I've got 2 more of this kind and they are working fine.
This log most probably follows a click on the 'Save Preferences' button. Don't send any commands from the device web page, I need to see the logs when the motion changes...
Are these devices using the same driver version?
This device was rather difficult to support in HE, I think it had bugs in the firmware (the radarSensitivity and the staticDetectionSensitivity parameters are sent back from the scaled by 10, while when configured are sent by the driver in the range of 1 to 9).
Try lowering the sensitivity settings, start with 9 or 8, until the device switches reliably to 'no motion' state. Also, increase the 'fadingTime' - 5 seconds is too low setting. Start with 30 or 15 seconds, then you can try decreasing this parameter, if it works reliably.
Did anything change in the room where the sensor is installed? Please check again for any false detection scenarios.
Did you add the battery level reporting? I'm running version 3.2.2 of the driver with this device, and no battery reporting.
BatteryLevel is captured with the 4-in-1 driver.
Hi @aapatel115 ,
No, I haven't added anything to this diver lately. I am still working on a rather complex new thermostat driver. Hopefully, I can come back to this one after a week or two (and the batteries of this new mmWave sensor last long enough!).
Thank you.
Also, it'd be great to expose some more settings like DEFAULT_MIN_REPORTING_TIME (or even a new one called "DEFAULT_MIN_REPORTING_TIME_ILLUM" for more granular setup) as I'm using illuminance from the same sensor in a rule and doing so would make it more responsive. I've overridden it in the code, but having it applied at sensor level instead of app wide would be awesome.
best,
ap
Has anyone had any luck with the driver for the Wifi version of this?
If not, does anyone have any idea on the port/url I use to communicate with this presence sensor so that i `ll try to do that? (It's not 80,8080,1883,8883,443)
I have just received a few orders of the Tuya square type. Of the 4 I received only one of them had a known driver. I spent a bit of time tinkering and made up 2 new driver profiles. I am horrible with Git so I will post my findings here with the profile details.
If they hold up maybe @kkossev can add them to the actual driver. All I did was mostly copy working driver profiles and mod them with the DP's I could figure out from the logs and tinkering.
Below are the manufacturer ID's and the driver modifications for them to work. Be warned, last time I tinkered with a zigbee driver was yearrrrrrrs ago.
- ManufacturerID: _TZE204_nbkshs6k
Generic square sensor with image of person and 2 holes.
Only seems to have a single DP for motion and 1 I could not figure out (dp12).
Driver Profile Details
'TS0601_NBKSHS6K_RADAR' : [ //5GHz Tuya Thick White Square with Sqr Button
description : '5GHz Tuya Generic White Square Basic',
models : ['TS0601'],
device : [type: 'radar', powerSource: 'dc', isSleepy:false],
capabilities : ['MotionSensor': true],
preferences : ["unknownDP12":"12"],
commands : ['resetStats':'resetStats'],
fingerprints : [
[profileId:'0104', endpointId:'01', inClusters:'0004,0005,EF00,0000', outClusters:'0019,000A', model:'TS0601', manufacturer:'_TZE204_nbkshs6k', deviceJoinName: '5GHz Tuya Generic White Square Basic']
],
tuyaDPs: [
[dp:1, name:'motion', type:'enum', rw: 'ro', min:0, max:1, defVal: '0', map:[0:'active', 1:'inactive'], description:'Presence'],
//[dp:12, name:'unknownDP12', type:'number', rw: 'rw', min:0, max:9999, defVal: 1, description:'UnknownDP12'],
],
spammyDPsToIgnore : [],
spammyDPsToNotTrace : [],
deviceJoinName: '5GHz Tuya Generic White Square Basic'
],
- ManufacturerID: _TZE204_dapwryy7
Generic square sensor with image of person and 2 holes with square square reset button. A bit thicker than most.
Seems to give offl Illumination as well as motion and distance (fairly certain) DPs. I was also able figure out the DP for maximum distance and (i think) sensitivity.
Driver Profile Details:
'TS0601_DAPWRYY7_RADAR' : [ //5GHz Tuya Thick White Square with Sqr Button
description : '5GHz Tuya Thick White Square with Sqr Button',
models : ['TS0601'],
device : [type: 'radar', powerSource: 'dc', isSleepy:false],
capabilities : ['MotionSensor': true, 'DistanceMeasurement':true, 'IlluminanceMeasurement': true],
preferences : ['fadingTime':'103', 'radarSensitivity':'105', 'maximumDistance':'107'], //BUG? - the dp103 is tested to set the fading time or motion reset with outbound commands BUT it is also the inbound illuminance dp
commands : ['resetStats':'resetStats'],
fingerprints : [
[profileId:'0104', endpointId:'01', inClusters:'0004,0005,EF00,0000', outClusters:'0019,000A', model:'TS0601', manufacturer:'_TZE204_dapwryy7', deviceJoinName: '5GHz Tuya Thick White Square with Sqr Button']
],
tuyaDPs: [
[dp:1, name:'motion', type:'enum', rw: 'ro', min:0, max:4, defVal: '0', map:[0:'inactive', 4:'active'], description:'Presence'],
[dp:101, name:'distance', type:'decimal', rw: 'ro', min:0.0, max:9999.0, scale:100, unit:'m', description:'Distance'],
[dp:103, name:'illuminance', type:'number', rw: 'ro', scale:1, unit:'lx', description:'Illuminance'], // BUG? - see above preferences
//[dp:102, name:'unknownDP102', type:'number', rw: 'ro', min:0, max:9999, scale:1, unit:'', description:''],
//[dp:104, name:'unknownDP104', type:'number', rw: 'ro', min:0, max:9999, scale:1, unit:'', description:''],
[dp:105, name:'radarSensitivity', type:'number', rw: 'rw', min:1, max:9 , defVal:5, scale:1, unit:'', title:'<b>Radar Sensitivity</b>', description:'<i>Sensitivity of the radar</i>'],
//[dp:106, name:'minimumDistance', type:'decimal', rw: 'ro', min:0.0, max:10.0, defVal:0.1, scale:100, unit:'meters', title:'<b>Minimum distance</b>', description:'<i>Minimum detection distance</i>'],
[dp:107, name:'maximumDistance', type:'decimal', rw: 'rw', min:0.0, max:10.0, defVal:10.0, scale:100, unit:'meters', title:'<b>Maximum distance</b>', description:'<i>Maximum detection distance</i>'],
//[dp:108, name:'unknownDP108', type:'number', rw: 'ro', min:0, max:9999, scale:1, unit:'', description:'Unkown DP108'],
//[dp:109, name:'unknownDP109', type:'number', rw: 'ro', min:0, max:9999, scale:1, unit:'', description:'Unkown DP109'],
//[dp:110, name:'unknownDP110', type:'number', rw: 'ro', min:0, max:9999, scale:1, unit:'', description:'Unkown DP110'],
//[dp:114, name:'unknownDP114', type:'number', rw: 'rw', min:0, max:9999, scale:1, unit:'', description:'Unkown DP114'],
//[dp:115, name:'unknownDP115', type:'number', rw: 'ro', min:0, max:9999, scale:1, unit:'', description:'Unkown DP115'],
//[dp:116, name:'unknownDP116', type:'number', rw: 'ro', min:0, max:9999, scale:1, unit:'', description:'Unkown DP116'],
//[dp:117, name:'unknownDP117', type:'number', rw: 'ro', min:0, max:9999, scale:1, unit:'', description:'Unkown DP117'],
//[dp:118, name:'unknownDP118', type:'number', rw: 'ro', min:0, max:9999, scale:1, unit:'', description:'Unkown DP118'],
//[dp:119, name:'unknownDP119', type:'number', rw: 'ro', min:0, max:9999, scale:1, unit:'', description:'Unkown DP119'],
],
spammyDPsToIgnore : [],
spammyDPsToNotTrace : [],
deviceJoinName: '5GHz Tuya Thick White Square with Sqr Button'
],
Hi @CheesyPotato ,
Both sensors are new and I can't find information in GitHub. Hopefully someone will post the DP details soon.
When you turn the power off and then power on the device, do you see in the live logs debug messages for the unknown DPs? Some Tuya radars will dump most (not all!) of the DPs and their values during the power on, although it is still not easy to guess what is what.
The easier way to get all the needed information for new Tuya devices is when you pair them to a Tuya Zigbee gateway :
I have included your code in the latest dev. branch ver. 3.2.3 2024/06/21 7:46 AM - thank you for your contribution !
Thats how I got the DP's I have commented out in the profiles I posted that I could not figure out.
TS0601_DAPWRYY7_RADAR - spit out a bunch when being plugged in, i messed with a few of them but in the end was only really confident about a couple.
And I may be crazy but DP103 seemed to be doing double duty - outbound as a fading time or motion reset- inbound seemed to be illuminance (the fading time / motion rest I tested as dp103 a few times and it is possible it was coincidence but time will tell i guess.)
I am considering getting a bridge just to keep tinkering
I can recommend purchasing some of the new Tuya Matter Gateways - get the cheapest one that you can find, no matter what the white label is.
It is unusual for one and the same DP to have different functions when written and when used in a reporting message. But knowing Tuya - not impossible! : )
Some (most of) the Tuya radars can be very spammy. So it may be a good idea to add the DPs for the distance reports and the illuminance reports in the product profile this way :
spammyDPsToIgnore : [101],
spammyDPsToNotTrace : [103],
Got a presence sensor and used your new driver.... here is details below...
deviceProfile : TS0225_2AAELWXK_RADAR
deviceType : mmWaveSensor
lastTx : {cmdTime=1719341134216, pingTime=1719341134189}
lastRx : {illumTime=1719341195225}
stats : {cfgCtr=1, rxCtr=38, txCtr=28, illumCtr=4, pingsFail=1}
driverVersion : 3.2.3 2024/06/21 7:46 AM (TS0225 _TZE200_2aaelwxk) (C-7 2.3.9.142)
health : {checkCtr3=0, offlineCtr=0}
motionStarted : 2024-06-25 13:53:21.718
states : {isRefresh=false, isDigital=false, isPing=true, isTimeoutCheck=false}
and here is output
Status : clear
healthStatus : online
humanMotionState : large
illuminance : 147
motion : active
motionDetectionDistance : 8.0
motionDetectionSensitivity : 7
radarAlarmMode : 1
radarAlarmVolume : 3
rtt : timeout
smallMotionDetectionSensitivity : 7
staticDetectionDistance : 5.0
staticDetectionSensitivity : 7
it appears it does not have "presence" do I look at motion or humanMotionState to tell if something present ?
also THANKs so much for the dedicated driver!!
Currently experimenting with the same Tuya battery powered mmWave + PIR (Zigbee version) that others have discovered. https://www.aliexpress.us/item/3256806664768243.html. Pretty decent sensor with good static sensitivity & nice not having to always have to supply mains power to provide location flexibility.
Is it somehow possible to expose (extract?) a parameter similar to the Linptech mmWave's "occupiedTime" so that when the motion state is active - an elapsed timer/counter (hh:mm:ss) starts & ultimately stops when states change to no motion? I really like the ability of knowing how long a room was occupied as my use case and currently use a RM rule to notify me when the room was no longer occupied & for how long it had been occupied & wanted to avoid using an ancillary custom timer app if possible.
Here's what that Tuya sensor shows:
@kkossev - any & all thoughts welcomed. Your driver contributions are consistently outstanding BTW ... thanks for sharing your coding prowess with the rest of us.
I see you added TS0601 _TZE204_7gclukjs in ver. 3.1.3 and I'm currently running 3.2.2
So I wanted to ask, what device profile should I use with the following sensor?
- manufacturer: _TZE204_7gclukjs
- model: TS0601
Hi @user5319,
The correct device profile should be selected automatically when you select 'LOAD ALL DEFAULTS' option under the 'Configure' button.
It should be seen as ''Tuya Human Presence Detector 7GCLUKJS'' in the 'Device Profile' , or as 'TS0601_7GCLUKJS_RADAR' in the State Variables section.