ZigBee 4-channel Smart Relay Switch (_TZ3000_wkr3jqmr) only switching first relay

Hi,

I have purchased a “Tuya Smart Zigbee 4CH Smart Switch”. The model name on the device is:
ZG-003-RF

(There seem to be many other brands selling this product for e.g. MHCOZY)

I have a Conbee II stick and use a headless Linux server with deconz and Phoscon app (web interface).
On the web interface the smart switch is recognized as 4 lights when connecting (see screenshot).

PhosconApp lists this product as:
Manufacturer: _TZ3000_wkr3jqmr
Model: TS0004

On Phoscon App (web interface):
When I try to switch any of the four switches in the Phoscon app, all switches are always turned ON or OFF on the relay. Modus des Geräts ist initial (nach dem Einschalten des Smart Switchs) Mode of the device is initial (after turning on the smart switch). Individual switching of Relay 2 - 4 is not possible via the Phoscon App, all relays are always switched ON or OFF. On the device itself I can switch the switches (K1 - K4) manually ON/OFF in this mode.

It seems as if a group switching (All switching) is always active, even if not even defined.

I clicked in the Phoscon App on On/Off light 6 (K1 on device):


(Result: All four switches K1-K4 turning ON. Another click all K1-K4 turning OFF and so on, expected behaviour: K1 (On/Off light 6) should change state at once)

If I change the mode (Mode Switch) on the device, then the device is unusable.
Mode 2 = Switches relay 1 ON and after 1 second OFF or OFF and then ON.
Mode 3 = Switches all relays in sequence ON and then OFF again, starting with relay 1.
Mode 1 (probably initial mode as described above)

EDIT:
Something is strange on the behaviour of the PhosconApp (web interface). It is not possible to select “Alle (all)” on the top switch (see screenshot). As soon as I select “all” and click on a lamp icon “Einzeln (single)” will appear:


(Screenshot shows: Before clicking on a lamp and after clicking on a lamp.)
Does Phoscon recognize that only it is not possible switching more than one relay?

On the smart switch device (physically):
If I press manually the four switches on the smart switch itself, the switch is clicked (K1 - K4) works as expected and is even correctly displayed as ON/OFF in the Phoscon app.

I pressed K1 and K3 on the device, the Phoscon App recognizes it correctly:

REST API:
A call via the REST API has the same effect like Phoscon App behaviour.

Python request:

deviceId = "a5:c2:31:32:ce:b9:71:88-"
channel = "03"
data = '{"on": true}'
response = requests.put(apiUrl + "/" + APIKEY + "/lights/" + deviceId + channel  + "/state", data)

Gateway Version:
problem_2

Does anyone have an idea what the problem is or what I am doing wrong?

No, it s something “normal” with tuya.
You need to use a DDF with a “tuya unlock sequence”

Can try this DDF

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZ3000_wkr3jqmr",
  "modelid": "TS0004",
  "product": "Tuya 4 output module",
  "sleeper": false,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_ON_OFF_OUTPUT",
      "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",                   
          "refresh.interval": 86400,
          "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"
        },
        {
          "name": "state/reachable"
        },
        {
          "name": "config/tuya_unlock"
        },
        {
          "name": "config/tuya_unlock"
        }
      ]
    },
    {
      "type": "$TYPE_ON_OFF_OUTPUT",
      "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",                   
          "refresh.interval": 86400,
          "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"
        },
        {
          "name": "state/reachable"
        }
      ]
    },
   {
      "type": "$TYPE_ON_OFF_OUTPUT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x03"
      ],
      "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,
          "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"
        },
        {
          "name": "state/reachable"
        }
      ]
    },
   {
      "type": "$TYPE_ON_OFF_OUTPUT",
      "restapi": "/lights",
      "uuid": [
        "$address.ext",
        "0x04"
      ],
      "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,
          "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"
        },
        {
          "name": "state/reachable"
        }
      ]
    }
  ]
}

@smanar Can you please follow the procedure.

@tiberiuskirk please open a device request on GitHub

Thanks a lot, it works.

I created a json file called “devcap1.schema.json” in the devices path and put the contents @Smanar wrote:

/home/[USERNAME]/.local/share/dresden-elektronik/deCONZ/devices

After that I restarted Phoscon (I guess reboot would do the same).

Now the controll of the switches work like expected. It was not necessary to reconfigure any control or pairing on the Phoscon App.

@Mimiix I am afraid to say that I have no Github account but it would be great to put this device configuration to the main app.

NP, I will add it, will be fast.

Hi,

I have the same problem with switches _TZ3000_okayvup0 and _TZ3000_vit9k2nb
Can you tell me what to do so it can be fixed there as well?

Thanks a lot

Hi,

Looks like those are not supported at all. Please open 2 seperate device requests on github for these :).