Light sensor ZSS-QY-LS-C / TS0222_TZ3000_8uxxzz4b unknown

Good morning,
I purchased this light sensor MOES Tuya Zigbee Smart Light Sensor illuminamento rilevamento della luminosità automazione dell'illuminazione domestica Smart Home Detector controllo APP - AliExpress 13 model “ZSS-QY-LS-C”
but I can’t get it to work with the CONBEE II (it simply doesn’t detect it).
After some research, I discovered that some posts compare it to the “TS0222_TZ3000_8uxxzz4b” model, but neither model is present in the DDF directory of my CONBEE II.
Can anyone help me?

Thanks.

Roberto Mandelli

Hello what is the model id and the manufacture name of your device visible in deconz ?

Hi,
I can only give you the manufacturer’s name (Moes), but I don’t know the ID because Deconz just doesn’t detect it.

Thanks.

Roberto Mandelli

Moes is the brand, you can buy 3 devices with the same box and have 3 devices with 3 differents firmwares.
You need to catch them from deconz.

Not possible deconz don’t detect them, you have nothing in the GUI ? The web application is not Deconz.

Hi, this is what I see in DECONZ (sorry for the image quality).

Thanks.

Roberto Mandelli

There is no problem with the image quality ^^. It’s just to see if it’s a just clone or a new device.

But there is a problem, You have “Unknow” as value. It’s because it’s lazy device, they need to be awake to get value.

You can found the needed attributes in the cluster “Basic” 0x0000 (I need Manufacture name and model ID)

Hi,
I captured the data from “Basic” 0x0000 and am sending you the image.

Thank you for your patience.

Roberto Mandelli

P.S.

When selecting “illuminance measurement” 0400, the value of the “0x0000 Measured Value” attribute changes based on the brightness.

Hello can try this DDF

{
  "schema": "devcap1.schema.json",
  "manufacturername": ["_TZ3000_8uxxzz4b", "_TZ3000_hy6ncvmw", "_TZ3000_9kbbfeho", "_TZ3000_l6rsaipj"],
  "modelid": ["TS0222", "TS0222", "TS0222", "TS0222"],
  "vendor": "Tuya",
  "product": "Tuya Luminance sensor",
  "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": "config/battery",
          "parse": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1,
            "eval": "Item.val = Attr.val / 2;",
            "fn": "zcl:attr"
          },
          "default": 0
        },
        {
          "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",
          "awake": true,
          "parse": {
            "at": "0x0000",
            "cl": "0x0400",
            "ep": 39,
            "script": "../generic/illuminance_cluster/sml_light_level.js"
          }
        },
        {
          "name": "state/lux"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 60,
          "max": 3600,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0400",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x21",
          "min": 0,
          "max": 600,
          "change": "0x0000FFFF"
        }
      ]
    }
  ]
}

But this DDF use relative path "script": "../generic/illuminance_cluster/sml_light_level.js"

So it need to be in the “devices/tuya” folder.
If you are using docker you need to copy this file too and edit the path according to the new one.

Hi,
thanks for the help.
I named the file _TZ3000_TS0222_Tuya_Luminance_sensor.json and placed it in the /usr/share/deCONZ/devices/tuya directory (I don’t have Docker).
The device is recognized by both deCONZ and Phoscon App, but while on deCONZ the “Measured Value” field follows the light intensity (see photo), on Phoscon App it always returns to 0 (see photo).

Thanks

Roberto Mandelli


Ha ? Can you check the complete device json in Phoscon/help/API Information/sensor ? You will have state/lux and state/lightlevel.

Perhaps this device is locked ?

Edit:
Have made a type on cluster number, here you have the new DDF


{
  "schema": "devcap1.schema.json",
  "manufacturername": ["_TZ3000_8uxxzz4b", "_TZ3000_hy6ncvmw", "_TZ3000_9kbbfeho", "_TZ3000_l6rsaipj"],
  "modelid": ["TS0222", "TS0222", "TS0222", "TS0222"],
  "vendor": "Tuya",
  "product": "Tuya Luminance sensor",
  "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": "config/tuya_unlock"
        },
        {
          "name": "config/battery",
          "parse": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1,
            "eval": "Item.val = Attr.val / 2;",
            "fn": "zcl:attr"
          },
          "default": 0
        },
        {
          "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",
          "awake": true,
          "parse": {
            "at": "0x0000",
            "cl": "0x0400",
            "ep": 1,
            "script": "../generic/illuminance_cluster/sml_light_level.js"
          }
        },
        {
          "name": "state/lux"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0001",
      "report": [
        {
          "at": "0x0021",
          "dt": "0x20",
          "min": 60,
          "max": 3600,
          "change": "0x00000001"
        }
      ]
    },
    {
      "bind": "unicast",
      "src.ep": 1,
      "cl": "0x0400",
      "report": [
        {
          "at": "0x0000",
          "dt": "0x21",
          "min": 60,
          "max": 600,
          "change": "0x0000FFFF"
        }
      ]
    }
  ]
}

Hi,
it works now!

Now I’ll test it a bit for false positives (hoping there aren’t any).
If I have similar situations in the future, can I count on your valuable help?

Thank you so much.

Roberto Mandelli

Can just ask on forum, it cost nothing, and you have a real OS, so you can make something with it.
If the device is working, do you want to make a PR to submit it officialy, or want I make i

Hi,

Sorry for the delay.

You did the work, so I think it’s right that you submit the request.
Besides, I don’t know how to do it!

Thanks for everything.

Roberto Mandelli

Done > DDF, add support for Tuya light sensor, _TZ3000_9kbbfeho by Smanar · Pull Request #8277 · dresden-elektronik/deconz-rest-plugin · GitHub
Thx for tests.