Closed McKenzer closed 1 year ago
Perhaps a conversion issue, will wait for results from @manosioa because mine are still strange.
Here is my actual DDF
{ "schema": "devcap1.schema.json", "manufacturername": [ "_TZE200_ztc6ggyl", "_TZE204_ztc6ggyl" ], "modelid": [ "TS0601", "TS0601" ], "product": "Human Presence Detector - ZY-M100", "sleeper": true, "status": "Silver", "path": "/devices/ZY-M100_human_breathing_presence.json", "subdevices": [ { "type": "$TYPE_LIGHT_LEVEL_SENSOR", "restapi": "/sensors", "uuid": [ "$address.ext", "0x01", "0x0400" ], "items": [ { "name": "attr/lastseen" }, { "name": "attr/manufacturername" }, { "name": "attr/modelid" }, { "name": "attr/name" }, { "name": "attr/swversion", "refresh.interval": 84000, "read": { "at": "0x0001", "cl": "0x0000", "ep": 1, "fn": "zcl" }, "parse": { "at": "0x0001", "cl": "0x0000", "ep": 1, "fn": "zcl", "script": "tuya_swversion.js" } }, { "name": "attr/type" }, { "name": "attr/uniqueid" }, { "name": "config/on" }, { "name": "config/reachable" }, { "name": "state/lastupdated" }, { "name": "state/lux", "description": "The current light intensity in Lux (max is 2000)", "refresh.interval": 5, "read": { "fn": "tuya" }, "parse": { "dpid": 104, "eval": "Item.val = Attr.val;", "fn": "tuya" }, "default": 0 } ] }, { "type": "$TYPE_PRESENCE_SENSOR", "restapi": "/sensors", "uuid": [ "$address.ext", "0x01", "0xef00" ], "items": [ { "name": "attr/id" }, { "name": "attr/lastannounced" }, { "name": "attr/lastseen" }, { "name": "attr/manufacturername" }, { "name": "attr/modelid" }, { "name": "attr/name" }, { "name": "attr/swversion", "refresh.interval": 83999, "read": { "at": "0x0001", "cl": "0x0000", "ep": 1, "fn": "zcl" }, "parse": { "at": "0x0001", "cl": "0x0000", "ep": 1, "fn": "zcl", "script": "tuya_swversion.js" } }, { "name": "attr/type" }, { "name": "attr/uniqueid" }, { "name": "config/delay", "description": "Detection delay : target confirmation delay time in 10th of second (from 0 to 100). Default 0.1s", "read": { "fn": "none" }, "write": { "dpid": 101, "dt": "0x2b", "eval": "Item.val;", "fn": "tuya" }, "parse": { "dpid": 101, "eval": "Item.val = Attr.val;", "fn": "tuya" }, "default": 1 }, { "name": "config/duration", "description": "Fading time : target disapperance delay time in second (from 0 to 15000). Default 90s", "read": { "fn": "tuya" }, "write": { "dpid": 102, "dt": "0x2b", "eval": "Item.val;", "fn": "tuya" }, "parse": { "dpid": 102, "eval": "Item.val = Attr.val;", "fn": "tuya" }, "default": 90 }, { "name": "config/on" }, { "name": "config/reachable" }, { "name": "config/sensitivity", "description": "Radar sensitivity (from 1 to 9). Default 7", "read": { "fn": "none" }, "write": { "dpid": 2, "dt": "0x2b", "eval": "10*Item.val;", "fn": "tuya" }, "parse": { "dpid": 2, "eval": "Item.val = Attr.val/10;", "fn": "tuya" }, "default": 7 }, { "name": "state/angle", "description": "Distance from detected target in cm (from 0 to 1000).", "read": { "fn": "none" }, "parse": { "dpid": 9, "eval": "Item.val = Attr.val;", "fn": "tuya" }, "default": 0 }, { "name": "state/errorcode", "description": "Self check result code. \n0 = checking, 1 = check_success, 2 = check_failure, 3 = others, 4 = comm_fault, 5 = radar_fault", "read": { "fn": "none" }, "parse": { "dpid": 6, "eval": "Item.val = Attr.val;", "fn": "tuya" }, "default": "1" }, { "name": "state/lastupdated" }, { "name": "state/presence", "refresh.interval": 5, "read": { "fn": "tuya" }, "parse": { "dpid": 1, "eval": "Item.val = Attr.val;", "fn": "tuya" }, "default": false } ] } ], "bindings": [ { "bind": "unicast", "src.ep": 1, "cl": "0xEF00" }, { "bind": "unicast", "src.ep": 1, "cl": "0x0006" } ] }
Ok, I used the quoted DDF.
I was hoping you could tell me what you need and where I can find it. I'm a fast learner (in 24h I made it work and learned all about HA's docker containers, SSH shell access, what DDF is, and how to make a custom one and load it on a device.) 😄
I've deleted and repaired the sensor. Now the "Smart Plug" has been deleted as well. I've added a second sensor in the living room. HA is reporting only "Delay" and "Duration". Distance, sensitivity, and light are not reported. If I stand very still the sensor cannot detect me. I guess that has to do with sensitivity.
What is the next step? What do you need me to try?
Well, can you connect to Phoscon, Help, API information, and then select sensors radio button, and by selecting the sensors in the list, catching the information about those related to your device (may be the two last of the list I presume) . Then you will got something like https://github.com/dresden-elektronik/deconz-rest-plugin/issues/6517#issuecomment-1359352740
If you didn't change values you should have default values for sensitivity, duration and delay in the presence sensor : https://user-images.githubusercontent.com/85300265/205787373-6c18f4dc-f79b-49cf-bc37-2be8b4b170af.png.
And these values must be stable. That's not my case ;-(
Well, can you connect to Phoscon, Help, API information, and then select sensors radio button, and by selecting the sensors in the list, catching the information about those related to your device (may be the two last of the list I presume) . Then you will got something like https://github.com/dresden-elektronik/deconz-rest-plugin/issues/6517#issuecomment-1359352740
Great, here are my screenshots (should you need the actual logs I can provide them to you) I did change the delay and duration through HA. But only those 2 as everything else is not populated in HA and I cannot change it.
By default, sensitivity should be 7. Do you have the same values at each refresh ? If not you got the same issue than mine. What is your DeConz version ?
Yes, sensitivity is stable at 1 in each and every refresh. I did not change anything regarding the sensitivity (I'm not sure where I can do that). The other sensor has the same sensitivity as well (1).
The DDF work realy better on his version :( I m sorry @BabaIsYou but manup is back from holiday, hoping for a massive PR merge soon
Yes, it seems more stable, and it's good news BTW. If PR #6011 could be included in the next batch that would be perfect ... If not I will upgrade anyway and redo the chhanges manually.
@manosioa coukd you please modify the DFF to :
"parse": {
"dpid": 2,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"refresh.interval": 5,
Then I think that a PR could be made for this device (#6621)
In fact here is the actual DDF I use :
{
"schema": "devcap1.schema.json",
"manufacturername": [
"_TZE200_ztc6ggyl",
"_TZE204_ztc6ggyl"
],
"modelid": [
"TS0601",
"TS0601"
],
"product": "Human Presence Detector - ZY-M100",
"sleeper": true,
"status": "Silver",
"subdevices": [
{
"type": "$TYPE_LIGHT_LEVEL_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0400"
],
"items": [
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 84000,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 1,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 1,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "state/lastupdated"
},
{
"name": "state/lux",
"description": "The current light intensity in Lux (max is 2000)",
"read": {
"fn": "none"
},
"parse": {
"dpid": 104,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
}
]
},
{
"type": "$TYPE_PRESENCE_SENSOR",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0xef00"
],
"items": [
{
"name": "attr/id"
},
{
"name": "attr/lastannounced"
},
{
"name": "attr/lastseen"
},
{
"name": "attr/manufacturername"
},
{
"name": "attr/modelid"
},
{
"name": "attr/name"
},
{
"name": "attr/swversion",
"refresh.interval": 84000,
"read": {
"at": "0x0001",
"cl": "0x0000",
"ep": 1,
"fn": "zcl"
},
"parse": {
"at": "0x0001",
"cl": "0x0000",
"ep": 1,
"fn": "zcl",
"script": "tuya_swversion.js"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/delay",
"description": "Detection delay : target confirmation delay time in 10th of second (from 0 to 100). Default 0.1s",
"read": {
"fn": "none"
},
"write": {
"dpid": 101,
"dt": "0x2b",
"eval": "Item.val;",
"fn": "tuya"
},
"parse": {
"dpid": 101,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 1
},
{
"name": "config/duration",
"description": "Fading time : target disapperance delay time in second (from 0 to 15000). Default 90s",
"range": [0, 15000],
"read": {
"fn": "none"
},
"write": {
"dpid": 102,
"dt": "0x2b",
"eval": "Item.val;",
"fn": "tuya"
},
"parse": {
"dpid": 102,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 90
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "config/sensitivity",
"description": "Radar sensitivity (from 1 to 9). Default 7",
"range": [1, 9],
"read": {
"fn": "none"
},
"write": {
"dpid": 2,
"dt": "0x2b",
"eval": "Item.val;",
"fn": "tuya"
},
"parse": {
"dpid": 2,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 7
},
{
"name": "config/sensitivitymax",
"description": "Far detection sensitivity in cm. From 0 to 1000. Default 1000",
"range": [0, 1000],
"read": {
"fn": "none"
},
"write": {
"dpid": 4,
"dt": "0x2b",
"eval": "Item.val;",
"fn": "tuya"
},
"parse": {
"dpid": 4,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
}
},
{
"name": "state/angle",
"description": "Distance from detected target in cm (from 0 to 1000).",
"read": {
"fn": "none"
},
"parse": {
"dpid": 9,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 0
},
{
"name": "state/errorcode",
"description": "Self check result code. \n0 = checking, 1 = check_success, 2 = check_failure, 3 = others, 4 = comm_fault, 5 = radar_fault",
"read": {
"fn": "none"
},
"parse": {
"dpid": 6,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": 1
},
{
"name": "state/lastupdated"
},
{
"name": "state/presence",
"refresh.interval": 5,
"read": {
"fn": "none"
},
"parse": {
"dpid": 1,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
},
"default": false
}
]
}
],
"bindings": [
{
"bind": "unicast",
"src.ep": 1,
"cl": "0xEF00"
},
{
"bind": "unicast",
"src.ep": 1,
"cl": "0x0006"
}
]
}
I did use the DDF you provided and that led to sensors not updating presence. I re added them from scratch using the same DDF you provided but still no presence detection.
It seems that you have the FF issue one more time … "uniqueid":"70:ac:08:ff:fe:21:2b:6c-ff-0400" instead of "uniqueid":"70:ac:08:ff:fe:21:2b:6c-01-0400" ;-( That’s certainly why some items are missing (sensitivity, angle, delay) and others are present but doesn’t exist in DDF (lightlevel, tholddark, …)
What does "ff issue" mean? I understand that the ff appears in the unique id, but how is that a problem? If it is how can I fix it? What is the next step?
I already had it for this device (and still have it with another one - a thermostat). You have to delete and repair the device.
At this time nobody found where this bug come from. It’s here and there sometimes in different version ;-(
I did delete and repair both sensors but something strange happens. Even after I delete them from the Phoscon environment and they are deleted in deCONZ environment as well, when I restart deCONZ add on, I can see both sensors in Phoscon environment but not in deCONZ environment.
Everytime I restart both sensors re appear in Phoscon. It's like it doesn't save the changes. Tried also restarting the GW with no luck.
I deleted them once again and re added them not from Phoscon but from deCONZ using the "Hybrid" option enables in "Control" tab, then "Enable permit join" and then when the device appeared in the map, I went into "Edit DDF" and just clicked on "Hot reload". Without restarting deCONZ the device popped up in Phoscon as a presence device, with it's previous name which remembered and it's working just as before. If I keep very still it fails to recognise I'm in the room but if I move a little bit it recognises me.
Here is the API results which are the same as the last time with the last DDF you provided.
Delay, sensitivity and angle are missing again. those functions were displayed in API with the previous DDF) I used.
I then deleted again the sensor and changed the DDF back to the previous version (you can find it here) that worked better and had the missing functions (Delay, sensitivity and angle) from the latest DDF version you suggested to try. I restarted deCONZ and then re-added the sensor with the same steps as I detailed before. It know appears as "Presence 51" device and not "Smart Plug 6" plus in the API info it appears as "Presence 55" and "LightLevel 54" with the functions Delay, sensitivity and angle once again available!
In Phoscon it appears with a new name (it doesn't remember it's last name as before) "LightLevel54".
As you can see the "uniqueid" is once again correct with only one "ff" in it and not two "ff" as with the the latest DDF version you suggested to try. So my guess is that this DDF version you suggested to try last time is not working properly for me.
Does it work to you?
I'm still missing distance, light lx, version etc. functions. I still cannot adjust the sensitivity in HA even though it has been identified in the API.
And I think the "magic sensor" that can't be deleted are with the endpoint "FF" ?
I have compared both DDF (but IDK why the last one is not working)
"read": {
"fn": "tuya"
},
and for all other
"read": {
"fn": "none"
},
The read function is special and must only be specified on one item (here state/on). It doesn't actually read a single value but triggers the Tuya device to report all datapoints.
Don't ask me the impact ^^
But they are minor changes, I don't see why the last DDF is not used ....
BTW the detection is working with the old DDF ?
I lastly changed « 1 » by 1 … my fault… but seems to work like this for me … even if values are strange ;-/
Perhaps a typo …
IDK, have used a website to check JSON, no error.
And BTW what is the defaut level setting for DDF ? On my side it's "Gold" This one is "Silver"
deleted them once again and re added them not from Phoscon but from deCONZ using the "Hybrid" option enables in "Control" tab, then "Enable permit join" and then when the device appeared in the map, I went into "Edit DDF" and just clicked on "Hot reload".
Better to use "Basic" to force DDF for test, but probably need to set the level.
And I think the "magic sensor" that can't be deleted are with the endpoint "FF" ?
exactly. It needed a special treatment in order to get completelly deleted as per my step by step instructions.
BTW the detection is working with the old DDF ?
yes, detection works with the old DDF in my case. It's sensitivity though defaults at "1" so if i sit very still it changes to clear but if i do a move it detects me.
And BTW what is the defaut level setting for DDF ? On my side it's "Gold" This one is "Silver"
I do not know from where it gets it's status (I guess somewhere in the DDF).
Better to use "Basic" to force DDF for test, but probably need to set the level.
Next time I will set it to "Basic".
Now I have to ask as I'm a total newbie :) Are you guys involved in the deCONZ development is some way? Or just users like me who are trying to help themselves and/or others?
We are like you ^^. But its not the first device we are trying to make working with deconz. @BabaIsYou have already done lot of DDF. He have the device but he can't use the last deconz version because he have an old special version compiled by himself, waiting for a PR was merged.
I do not know from where it gets it's status (I guess somewhere in the DDF).
Yep, the status in the DDF is "Silver", but the setting you have in deconz in the control/basic have an impact too.
Awesome! It's the first time I'm going that deep in deCONZ as everything up till now was pretty plug n play for me.
It's certainly fun!
Is there anything that I can try while we wait for PR?
It's certainly fun!
Welcome on board !! ;-)
Is there anything that I can try while we wait for PR?
Why not trying to modify some item like sensitivity or other /config just to see if and how it works ;-)
Of course! I made some changes to the last DDF that was not working before. But I feel I'm blind. I mean, I don't have something to compare it with.
Maybe if we can find the DDF of a working presence sensor, then we could compare and try some of its properties on our DDF.
I do not know how you work and develop the DDF so I'm just guessing and throwing ideas at the table 😄
Just getting back to working DDF and then try to modify values of attributes like sensitivity (passing from default 7 to maximum 9 or other value) just to see if device is reacting accordingly.
No need to modify DDF once it is loaded, but trying to adjust the values of /config items (don’t know how to do this using HA but can be done using curl)
I don't know any other way to change it's settings other than straight into DDF and HA. In HA i only have these 2 functions that I can mess with. Nothing else is being populated.
It's possible too using a REST plugin in your browser, but less friendly https://dresden-elektronik.github.io/deconz-rest-doc/getting_started/
I m seing "Delay" is modifiable in HA, have you tried it ? (need value > 10)
Hello guys, another user here with this sensor. After several tries (adding, removing, restarting...) I was able to get rid of "smart plug" in the /lights and just got light and presence under /sensors in the API. Used unmodified DDF from here: https://raw.githubusercontent.com/BabaIsYou/deconz-rest-plugin/17d6e2446b64e0c9fff0684fbf038153f3423387/devices/tuya/ZY-M100_human_breathing_presence.json which I download via wget into HA deCONZ plugin folder.
I am missing "lux" sensor in hassio and do not know what else should I do... here are some screens.
tried to change these settings and they change in the API and seems to change the behaviour of the sensor
HA deCONZ plugin log is flooded with "TY_DATA_REPORT" lines like i.e.: 13:07:46:268 TY_DATA_REPORT: seq 91, dpid: 0x02, type: 0x02, length: 4, val: 7 13:07:46:013 TY_DATA_REPORT: seq 89, dpid: 0x01, type: 0x04, length: 1, val: 0 13:07:46:141 TY_DATA_REPORT: seq 90, dpid: 0x04, type: 0x02, length: 4, val: 600 13:07:46:411 TY_DATA_REPORT: seq 92, dpid: 0x03, type: 0x02, length: 4, val: 0 Not sure if that is OK or not...
Let me know what should I report etc.
BR, M.
That’s great news because values seems to be in the ranges for all of them.
I read on another thread elsewhere that this device tend to flood a lot … don’t know a way to regulate it …
Message ID: @.***>
Strange you can't see it in HA if you can see it in the API. Perhaps a synchronisation issue (for exemple if the device was finalized after it was included in HA), if I m right there is a way to re-synchronize device. Perhaps HA need state/lightlevel too ?
Not sure if that is OK or not...
Yeah don't worry it s device return
Dpid 2 is the sensitivty here 7 dpid 1 is the presence here not dpid 4 is maximum range (not used by deconz) dpid 3 is minimum range (not used)
Hi, thanks both for response. deCONZ HA plugin got "deconz.device_refresh" service and "deconz.remove_orphaned_entries" and I tried both. I also restarted HA and the plugin itself.
Regarding /lightlevel? this can be truth as all other light sensors I got visible in HA from deCONZ got it i.e. like this aqara sensor:
but why the light "lux" is detected in API and not visible even in Phoscon? (renamed the sensor to "Presence sensor")
One thing to note is that DDF got default duration as "90" but once paired I got it as "600" but I changed it via HA...
One thing to note is that DDF got default duration as "90" but once paired I got it as "600" but I changed it via HA...
Ha yes, lol, nice catch, the DDF set 90 as defaut value, but the device have 600, so when it make the first report it overwrite the defaut value. Good to know if the defaut value definied in DDF is usd only on device creation or at all deconz restart.
Can try to add on DDF
{
"name": "state/lightlevel",
"default": 12345
},
Then use "hot reload" in the editor or restart deconz, no need to re-include the device. Will be fake value, but like that we can make a test.
Tried just that in DDF, saved the file and restarted deconz this is result
restarted HA and here it is
Ok so It seem it's not mandatory.
So 2 solutions we can update both value in same time, or use 2 parts in the DDF. I think the easier is the second one
{
"name": "state/lightlevel",
"read": {
"fn": "none"
},
"parse": {
"dpid": 104,
"eval": "const lux = Attr.val; if (lux > 0 && lux < 0xffff) {Item.val = Math.round(10000 * Math.log10(lux) + 1);};",
"fn": "tuya"
},
"default": 0
}
One thing to note is that DDF got default duration as "90" but once paired I got it as "600" but I changed it via HA..
Value was taken from documentation …Here … weird but can be changed if needed to reflect reality.
One thing to note is that DDF got default duration as "90" but once paired I got it as "600" but I changed it via HA..
Value was taken from documentation …Here … weird but can be changed if needed to reflect reality.
Hi, yeah same is for sensitivitymax where default is 1000 but I got 600 after pairing.
Ok so It seem it's not mandatory.
So 2 solutions we can update both value in same time, or use 2 parts in the DDF. I think the easier is the second one
{ "name": "state/lightlevel", "read": { "fn": "none" }, "parse": { "dpid": 104, "eval": "const lux = Attr.val; if (lux > 0 && lux < 0xffff) {Item.val = Math.round(10000 * Math.log10(lux) + 1);};", "fn": "tuya" }, "default": 0 }
Done and here are the results, seems OK to me thanks
A cosmetic one but what to do with this? As mentioned it is not under /lights no more but reported as plug here?
this is OK?
Sensitivitymx is a RW item In code and in DDF.
may be a conflict with different range definition in item and DDF ?
It's the device itself that presente itself as "Smart plug", we can change that in the API, but deconz show only the reality.
Ha nice there is a problem with sensitivitymax
It was marked as RW here
{
"schema": "resourceitem1.schema.json",
"id": "config/sensitivitymax",
"datatype": "UInt8",
"access": "RW",
"public": true,
"range": [0, 255],
"description": "The maximum sensor sensitivity."
}
But the code prevent the value be modified
// Changing these values of zigbee sensors is not allowed, read-only.
if (rid.suffix == RConfigPending || rid.suffix == RConfigSensitivityMax || rid.suffix == RConfigHostFlags || rid.suffix == RConfigLastChangeAmount ||
rid.suffix == RConfigLastChangeSource || rid.suffix == RConfigLastChangeTime || rid.suffix == RConfigEnrolled ||
(!isClip && (rid.suffix == RConfigBattery || rid.suffix == RConfigReachable)))
{
rsp.list.append(errorToMap(ERR_PARAMETER_NOT_MODIFIABLE, QString("/sensors/%1/config/%2").arg(id).arg(pi.key()),
QString("parameter, %1, not modifiable").arg(pi.key())));
continue;
}
Well, is the « bug » in the code or in the json ;-) ?
I have asked to other dev. And the problem is in the json.
The editable setting is config/sensitivity. The value in config/sensitivitymax is not editable, it's the maximum value that can be used for config/sensitivity.
{
"name": "config/sensitivitymax",
"description": "Far detection sensitivity in cm. From 0 to 1000. Default 1000",
"range": [0, 1000],
"read": {
"fn": "none"
},
"write": {
"dpid": 4,
"dt": "0x2b",
"eval": "Item.val;",
"fn": "tuya"
},
"parse": {
"dpid": 4,
"eval": "Item.val = Attr.val;",
"fn": "tuya"
}
},
It's because the missing field "config/distance" (for exemple), but not possible use this one . There is "config/triggerdistance" but this one need a string, and I don't see another usable ....
Edit: I think it's possible with "config/triggerdistance" and using string like "hight"/"low"/"medium" and predefined value, like here https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/ikea/starkvind_air_purifier.json for the "config/mode".
I think it’s a good idea. The expected value is in cm, but we can propose a string value in meter, from 0 to 10 with increment of 1 ?
For me 0 to 5 is enought
Happy New Year everyone!
I see there is some progress with some of the device's functions.
As I do not understand most of the posts, can someone provide a full DDF to upload to my devices? Also please tell me what you need me to test and try out if you need help :)
Thanks
The value in config/sensitivitymax is not editable,
Well, then just to understand, why has it been stated as config and not as state if it can't be modified and writable in the json ? Seems weird for me.
Can config/triggerdistance from this DDF be picked up somehow? https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/xiaomi/xiaomi_rtczcgq11lm_fp1_presence_sensor.json
For me 0 to 5 is enought
May be, it doesn't really matter.
Tried to reproduce what is in https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/ikea/starkvind_air_purifier.json but realized that this example use a integer value (config/mode) to be written. Here, if we used config/sensitivitymax, we will try to use a string value while the attended value passed to tuya function is datatype "dt": "0x2b".
OK and this wil cover the "Far detection" as per standard tuya app? https://blakadder.com/assets/images/zy-m100/tuya_app.jpg
Device
bought here
Screenshots
Basic
Groups
Scenes
Tuya specific Cluster
On/Off
Working Device Occupancy Sensor from Aqara Basic