Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Human Presence Detector - WY-M100-S #8059

Closed
1 task done
brientim opened this issue Dec 12, 2024 · 10 comments · Fixed by #8104
Closed
1 task done

Human Presence Detector - WY-M100-S #8059

brientim opened this issue Dec 12, 2024 · 10 comments · Fixed by #8104

Comments

@brientim
Copy link

brientim commented Dec 12, 2024

Is there already an existing issue for this?

  • I have searched the existing issues and there is none for my device

Product name

Smart Human Presence Motion Sensor With Luminance

Manufacturer

_TZE204_laokfqwu

Model identifier

TSO601

Device type to add

Sensor

Node info

The WZ-M100 is a clone of the ZY-M100 with revised versioning. It has the same capabilities and functions has the ZY-M100.

As the new devices has the potential to have a different firmware, I have raised this as a new request. The alternative could be to the existing MmwRadar Human Presence Detector (TS0601) JSON.

Product name: Human Presence Detector - WY-M100-S

_TZE204_laokfqwu_mmwave_radar.ddf.json

Modified DDF as per #8059 (comment)

Manufacturer: _TZE204_laokfqwu
Model identifier: TS0601
Device type : Sensor

Endpoints and clusters

Screenshot 2024-12-12 at 11 15 50

Basic

Screenshot 2024-12-12 at 11 15 38

Further relevant clusters

Power Configuration

On/Off

Level Control

Color Control

Thermostat

Simple Metering

Electrical Measurement

Any other cluster of relevance/interest

Copy link
Contributor

github-actions bot commented Jan 2, 2025

As there has not been any response in 21 days, this issue has been automatically marked as stale. At OP: Please either close this issue or keep it active It will be closed in 7 days if no further activity occurs.

@github-actions github-actions bot added the stale label Jan 2, 2025
@brientim
Copy link
Author

brientim commented Jan 2, 2025

Bumping this to see if it is picked up.

@github-actions github-actions bot removed the stale label Jan 3, 2025
@zimko
Copy link

zimko commented Jan 25, 2025


{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE204_laokfqwu",
  "modelid": "TS0601",
  "vendor": "Tuya",
  "product": "MmwRadar Human Presence Detector (TS0601)",
  "sleeper": false,
  "status": "Gold",
  "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": 86400,
          "read": {
            "at": "0x0001",
            "cl": "0x0000",
            "ep": 1,
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x0001",
            "cl": "0x0000",
            "ep": 1,
            "fn": "zcl:attr",
            "script": "tuya_swversion.js"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/dark"
        },
        {
          "name": "config/tholddark"
        },
        {
          "name": "config/tholdoffset"
        },
        {
          "name": "state/daylight"
        },
        {
          "name": "state/lightlevel"
        },
        {
          "name": "state/lux",
          "description": "The current light intensity in Lux (max is 2000)",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 103,
            "script": "../generic/illuminance_cluster/lux_to_lightlevel.js",
            "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": 86400,
          "read": {
            "at": "0x0001",
            "cl": "0x0000",
            "ep": 1,
            "fn": "zcl:attr"
          },
          "parse": {
            "at": "0x0001",
            "cl": "0x0000",
            "ep": 1,
            "fn": "zcl:attr",
            "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/fadingtime",
          "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/triggerdistance",
          "description": "Far detection sensitivity",
          "read": {
            "fn": "none"
          },
          "write": {
            "dpid": 4,
            "dt": "0x2b",
            "eval": "Far = ['0','1','2','3','4','5','6','7','8','9','10']; Attr.val = Math.max(0,Far.indexOf(Item.val)*100);",
            "fn": "tuya"
          },
          "parse": {
            "dpid": 4,
            "eval": "Item.val = String(Attr.val/100);",
            "fn": "tuya"
          },
          "values": [
            [
              "\"1\"",
              "1m"
            ],
            [
              "\"2\"",
              "2m"
            ],
            [
              "\"3\"",
              "3m"
            ],
            [
              "\"4\"",
              "4m"
            ],
            [
              "\"5\"",
              "5m"
            ],
            [
              "\"6\"",
              "6m"
            ],
            [
              "\"7\"",
              "7m"
            ],
            [
              "\"8\"",
              "8m"
            ],
            [
              "\"9\"",
              "9m"
            ],
            [
              "\"10\"",
              "10m"
            ],
            [
              "\"0\"",
              "Off"
            ]
          ],
          "default": "10"
        },
        {
          "name": "state/targetdistance",
          "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 = String(Attr.val);",
            "fn": "tuya"
          },
          "default": "Unknown"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/presence",
          "read": {
            "fn": "none"
          },
          "parse": {
            "dpid": 1,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          },
          "default": false
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0xEF00"
    }
  ]
}

Whith this DDF sensor work but not luminosity

@Mimiix
Copy link
Collaborator

Mimiix commented Jan 25, 2025

@Smanar can you help:)?

@zimko
Copy link

zimko commented Jan 25, 2025

Find solution for luminosity :

This ddf need this script : lux_to_lightlevel.js (ddf updated)

Solution inside your custom directory (/root/.local/share/dresden-elektronik/deCONZ/) create directory /generic/illuminance_cluster
Copy the original file 'lux_to_lightlevel.js' ( /usr/share/deCONZ/devices/generic/illuminance_cluster/lux_to_lightlevel.js) to the new illuminance_cluster created first.

Enjoy.

@Smanar
Copy link
Collaborator

Smanar commented Jan 25, 2025

I m seing there is 5 Tuya presence detector ^^ I think we can group some of them ?
Your DDf is based o this one ? https://github.com/dresden-elektronik/deconz-rest-plugin/blob/master/devices/tuya/ZY-M100_human_breathing_presence.json

So can just add your model to the list ?

Do you want to make the PR or want I make it ?

@brientim
Copy link
Author

brientim commented Jan 25, 2025

@Smanar

Correct the DDF was based on the ZY-M100… I believe they could be appended to the original ZY-M100 DDF as that would ensure consistency.

Can you please raise the PR and consolidate as required.

@Smanar
Copy link
Collaborator

Smanar commented Jan 25, 2025

Done #8104

Have not modified the path for the luminosity because it's good for file in the official folder generic/illuminance_cluster/lux_to_lightlevel.js is present for file in the tuya folder

@brientim
Copy link
Author

@Smanar Acknowledges and thank you.

@Mimiix
Copy link
Collaborator

Mimiix commented Jan 26, 2025

Please keep it open until the pr is merged :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants