Tuya _TZ3000_bvrlqyj7 Switch

Hi all,

I am not sure if I am talking about a device request or feature. Since few days I own this Tuya Relay switch _TZ3000_bvrlqyj7

image

which shows up in the Phoscon app as 2 on/off switches without any further option.

I saw from the ioBroker Zigbee adapter that this device can be set as a toggle switch, momentary switch and I forgot the third option.

Is it somehow possible to configurate this relay ? I saw in the deConz application, there is a Tuya special group with Light Mode 1, 2 or 3.

Now I did test this yet, but can I control the Switch behavior with that or is there any other easier way ?

Many thanks,
Steffen

This device use the tuya cluster, so hard to make something just with the GUI.

that this device can be set as a toggle switch, momentary switch and I forgot the third option

This seem a problem for me, because you have entry and output, so IDK if it s possible to make the first one independent of the second one, can try, will see what happen.

I haven’t all information, so I have tried to guess them, can you try this DDF

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZ3000_bvrlqyj7",
  "modelid": "TS0002",
  "vendor": "$MF_TUYA",
  "product": "Switch Module",
  "sleeper": false,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_DIMMABLE_PLUGIN_UNIT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x01"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",
          "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
          "read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "state/on",
          "parse": {"fn": "tuya", "dpid": 1, "eval": "Item.val = Attr.val;" },
          "write": {"fn": "tuya", "dpid": 1, "dt": "0x10", "eval": "Item.val == 1 ? 1 : 0;"},
          "read": {"fn": "tuya"},
          "refresh.interval": 300
        },
        {
          "name": "state/reachable"
        }
      ]
    },
    {
      "type": "$TYPE_DIMMABLE_PLUGIN_UNIT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x02"
      ],
      "items": [
        {
          "name": "attr/id"
        },
        {
          "name": "attr/lastannounced"
        },
        {
          "name": "attr/lastseen"
        },
        {
          "name": "attr/manufacturername"
        },
        {
          "name": "attr/modelid"
        },
        {
          "name": "attr/name"
        },
        {
          "name": "attr/swversion",
          "parse": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001", "script": "tuya_swversion.js"},
          "read": {"fn": "zcl", "ep": 1, "cl": "0x0000", "at": "0x0001"}
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "state/on",
          "parse": {"fn": "tuya", "dpid": 2, "eval": "Item.val = Attr.val;" },
          "write": {"fn": "tuya", "dpid": 2, "dt": "0x10", "eval": "Item.val == 1 ? 1 : 0;"},
          "read": {"fn": "none"},
          "refresh.interval": 84000
        },
        {
          "name": "state/reachable"
        }
      ]
    }
  ]
}

If it don’t work, can you enble log “info” “info_l2” and “ddf” and share the logs when using the button, it s a log with tuya information

Many thanks Smanar,

I will try this … but perhaps if someone could help me; can you point me to a link where I can read what to do with those DDF files ?

Thanks,
Steffen

ok, after finding the DDF cheat sheet (maybe you may made it is a sticky topic in the channel DDF - nice youtube video :slight_smile: ) and applying the suggested DDF, I am still lost.

on the debug side, “info” gives:

17:21:21:520 ZCL attribute report 0xA4C138F53226F868 for cluster: 0x0006, ep: 0x01, frame control: 0x08, mfcode: 0x0000
17:21:21:754 ZCL attribute report 0xA4C138F53226F868 for cluster: 0x0006, ep: 0x01, frame control: 0x08, mfcode: 0x0000

Info2 (very difficult to filter) gives
17:26:44:676 poll node a4:c1:38:f5:32:26:f8:68-01
17:26:44:677 Poll light node 2-Relais - Switch 1
17:26:44:728 Poll APS request to 0xA4C138F53226F868 cluster: 0x0006 dropped, values are fresh enough

DDF gives nothing when pushing a button

Do you know if there is a way to analyze the ioBroker zigbee adapter ?

You are using the GUI ?
So to be sure the DDF is used, just make a right clic / edit DDF / and check if it’s the good DDF (you can see a preview on the last tab)

If all is fine when you use phoscon or third app to turn the device “on” you will see on log

    DBG_Printf(DBG_INFO, "writeTuyaData, dpid: 0x%02X, type: 0x%02X, expr: %s\n",
               dpid & 0xFF, dataType & 0xFF, qPrintable(expr));

With flag “info”

And when you use it manualy

        DBG_Printf(DBG_INFO, "TY_DATA_%s: seq %u, dpid: 0x%02X, type: 0x%02X, length: %u, val: %d\n",
                   rt, seq, dpid, dataType, dataLength, num.s32);

Still with “info”

I m not sure the DDF is fine, You just need to create a file called what_you_want.json in the deconz “devices” folder with this contain.
What is your OS ?

I am using a Raspberry Pi with Rasbian

Just tried the iobroker adapter again and it linked to this device
TuYa TS0002_switch_module control via MQTT | Zigbee2MQTT

So on raspbian

All DDF provided directly with deCONZ typically reside in /usr/share/deCONZ/devices/ on a Linux system and are loaded first. However, files residing in the home directory of the user running deCONZ (e.g. /home/<DECONZUSER>/.local/share/dresden-elektronik/deCONZ/devices) will override the pre-packaged files to allow users to amend and keep their own files if desired.