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

Tuya Scene Switch TS0044 TZ3000_a4xycprs #7619

Closed
1 task done
wunni1 opened this issue Feb 17, 2024 · 17 comments · Fixed by #7781
Closed
1 task done

Tuya Scene Switch TS0044 TZ3000_a4xycprs #7619

wunni1 opened this issue Feb 17, 2024 · 17 comments · Fixed by #7781

Comments

@wunni1
Copy link

wunni1 commented Feb 17, 2024

Is there already an existing issue for this?

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

Product name

MOES ZigBee Scene Switch

Manufacturer

TZ3000_a4xycprs

Model identifier

TS0044

Device type to add

Switch

Node info

Bildschirm­foto 2024-02-18 um 00 40 10

Endpoints and clusters

Bildschirm­foto 2024-02-18 um 00 34 21

Basic

Bildschirm­foto 2024-02-18 um 00 32 20

Further relevant clusters

Power Configuration

Bildschirm­foto 2024-02-18 um 00 33 06

On/Off

Bildschirm­foto 2024-02-18 um 00 41 49 Bildschirm­foto 2024-02-18 um 00 42 04

Level Control

Color Control

Thermostat

Simple Metering

Electrical Measurement

Any other cluster of relevance/interest

@Smanar
Copy link
Collaborator

Smanar commented Feb 18, 2024

Hello can try this DDF

{
  "schema": "devcap1.schema.json",
  "manufacturername": "TZ3000_a4xycprs",
  "modelid": "TS0044",
  "product": "Tuya remote 4 gangs locked version",
  "sleeper": true,
  "status": "Gold",
  "subdevices": [
    {
      "type": "$TYPE_SWITCH",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0x0006"
      ],
      "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:attr",
            "ep": 1,
            "cl": "0x0000",
            "at": "0x0001",
            "script": "tuya_swversion.js"
          },
          "read": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0000",
            "at": "0x0001"
          }
        },
        {
          "name": "attr/type"
        },
        {
          "name": "attr/uniqueid"
        },
        {
          "name": "config/battery",
          "refresh.interval": 86400,
          "read": {
            "fn": "zcl:attr",
            "ep": 1,
            "cl": "0x0001",
            "at": "0x0021"
          },
          "parse": {
            "at": "0x0021",
            "cl": "0x0001",
            "ep": 1,
            "eval": "Item.val = Attr.val / 2;",
            "fn": "zcl:attr"
          }
        },
        {
          "name": "config/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "config/tuya_unlock"
        }
        {
          "name": "state/buttonevent"
        },
        {
          "name": "state/lastupdated"
        }
      ]
    }
  ],
  "bindings": [
    {
      "bind": "unicast",
      "src.ep": 1,
      "dst.ep": 1,
      "cl": "0x0006"
    },
    {
      "bind": "unicast",
      "src.ep": 2,
      "dst.ep": 1,
      "cl": "0x0006"
    },
    {
      "bind": "unicast",
      "src.ep": 3,
      "dst.ep": 1,
      "cl": "0x0006"
    },
    {
      "bind": "unicast",
      "src.ep": 4,
      "dst.ep": 1,
      "cl": "0x0006"
    }
  ]
}

IDK how will react battery return, setting a bind will provoke a battery drain ...

Remember you need too add the Manufacture Name in the button_maps.json file

        "Tuya3gangMap": {
            "vendor": "Tuya",
            "doc": "3-gang remote",
            "modelids": ["_TZ3000_yw5tvzsk", "_TZ3000_czuyt8lz","_TZ3000_ee8nrt2l", "_TZ3000_ygvf9xzp", "_TZ3000_t8hzpgnd", "_TZ3000_wkai4ga5", "_TZ3000_bi6lpsew", "_TZ3400_keyjhapk", "_TYZB02_key8kk7r", "_TZ3400_keyjqthh", "_TZ3400_key8kk7r", "_TZ3000_vp6clf9d", "_TYZB02_keyjqthh", "_TZ3000_peszejy7", "_TZ3000_qzjcsmar", "_TZ3000_owgcnkrh", "_TZ3000_adkvzooy", "_TZ3000_arfwfgoa", "_TZ3000_a7ouggvs", "_TZ3000_rrjr1q0u", "_TZ3000_abci1hiu", "_TZ3000_dfgbtub0", "_TZ3000_rco1yzb1", "_TZ3000_gbm10jnj", "_TZ3000_5e235jpa", "_TZ3000_sj7jbgks", "_TZ3000_w8jwkczz", "_TZ3000_dziaict4", "_TZ3000_famkxci2", "_TZ3000_itb0omhv", "_TZ3000_tzvbimpq", "_TZ3000_mh9px7cq", "_TZ3000_b7bxojrg", "_TZ3000_ufhtxr59", "_TZ3000_4upl1fcj", "_TZ3000_i3rjdrwu", "_TZ3000_w3c7ouru", "_TZ3000_abci1hiu","_TZ3000_wqcbzbae", "_TZ3000_pkeqinnt", "_TZ3000_uaa99arv", "_TZ3000_wbfgbpxq", "_TZ3000_fa9mlvja", "_TZ3000_tk3s5tyg", "_TZ3000_mrpevh8p", "_TZ3000_qgwcxxws"],
            "map": [

@wunni1
Copy link
Author

wunni1 commented Feb 19, 2024

Thank you! But unfortunately i can’t find the file/folder according to the manuals I’ve found. Running DeConz as HASS Addon with an RPI4.

@Smanar
Copy link
Collaborator

Smanar commented Feb 19, 2024

Ha bad luck, it's possible to add new DDF > https://forum.phoscon.de/t/how-to-add-edit-a-ddf-on-home-assistant-using-text-editor/1839
But not possible to edit the button_maps.json file.

@wunni1
Copy link
Author

wunni1 commented Feb 19, 2024

This is exactly what I tried... :-(

@Smanar
Copy link
Collaborator

Smanar commented Feb 19, 2024

It's an hidden folder
/data/.local/share/dresden-elektronik/deCONZ/devices/

But to check if it's working you will need to use log as you can't edit the buttonmap file. Do you have access to deconz log on application ?

@wunni1
Copy link
Author

wunni1 commented Feb 20, 2024

Can’t find that folder. Access to the log is possible. Is there another way with the DDF?

@Smanar
Copy link
Collaborator

Smanar commented Feb 20, 2024

Not on the HA docker :(
But this folder is invisible, just try to access it.

Else I can make a PR in "blind mode" but without guarantees il will work.

@wunni1
Copy link
Author

wunni1 commented Mar 10, 2024

@Smanar : Sorry I’ve missed your answer…
Tried again, but can’t access the folder. Could you make the PR “in blind mode”. Then I will try it out. Thank you!

Copy link
Contributor

github-actions bot commented Apr 1, 2024

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 Apr 1, 2024
Copy link
Contributor

github-actions bot commented Apr 9, 2024

As there has not been any response in 28 days, this issue will be closed. @ OP: If this issue is solved post what fixed it for you. If it is not solved, request to get this opened again.

@github-actions github-actions bot closed this as completed Apr 9, 2024
@wunni1
Copy link
Author

wunni1 commented May 16, 2024

I'd like to open this issue again. Tried to upload the DDF mentioned from Smanar 18.02.24 with the new DDF upload feature. The switch is recognized as switch with 4 different buttons, but when I press the buttons nothing is happen.

I copied this text:

{
"schema": "devcap1.schema.json",
"manufacturername": "TZ3000_a4xycprs",
"modelid": "TS0044",
"product": "Tuya remote 4 gangs locked version",
"sleeper": true,
"status": "Gold",
"subdevices": [
{
"type": "$TYPE_SWITCH",
"restapi": "/sensors",
"uuid": [
"$address.ext",
"0x01",
"0x0006"
],
"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:attr",
"ep": 1,
"cl": "0x0000",
"at": "0x0001",
"script": "tuya_swversion.js"
},
"read": {
"fn": "zcl:attr",
"ep": 1,
"cl": "0x0000",
"at": "0x0001"
}
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/battery",
"refresh.interval": 86400,
"read": {
"fn": "zcl:attr",
"ep": 1,
"cl": "0x0001",
"at": "0x0021"
},
"parse": {
"at": "0x0021",
"cl": "0x0001",
"ep": 1,
"eval": "Item.val = Attr.val / 2;",
"fn": "zcl:attr"
}
},
{
"name": "config/on"
},
{
"name": "config/reachable"
},
{
"name": "config/tuya_unlock"
}
{
"name": "state/buttonevent"
},
{
"name": "state/lastupdated"
}
]
}
],
"bindings": [
{
"bind": "unicast",
"src.ep": 1,
"dst.ep": 1,
"cl": "0x0006"
},
{
"bind": "unicast",
"src.ep": 2,
"dst.ep": 1,
"cl": "0x0006"
},
{
"bind": "unicast",
"src.ep": 3,
"dst.ep": 1,
"cl": "0x0006"
},
{
"bind": "unicast",
"src.ep": 4,
"dst.ep": 1,
"cl": "0x0006"
}
]
}

in a blank file and renamed it tuya_scene_switch.ddf

Did I something wrong?
Thanks for help
Thomas

@Mimiix
Copy link
Collaborator

Mimiix commented May 16, 2024

This might have to do with the Button maps not updated. @Smanar can you check?

@Mimiix Mimiix reopened this May 16, 2024
@Smanar
Copy link
Collaborator

Smanar commented May 16, 2024

Exactly, this device is missing in button_maps.json file, just need to add your model in this looonggg list.

        "Tuya3gangMap": {
            "vendor": "Tuya",
            "doc": "3-gang remote",
            "modelids": ["_TZ3000_yw5tvzsk", "_TZ3000_czuyt8lz","_TZ3000_ee8nrt2l", "_TZ3000_ygvf9xzp", "_TZ3000_t8hzpgnd", "_TZ3000_wkai4ga5", "_TZ3000_bi6lpsew", "_TZ3400_keyjhapk", "_TYZB02_key8kk7r", "_TZ3400_keyjqthh", "_TZ3400_key8kk7r", "_TZ3000_vp6clf9d", "_TYZB02_keyjqthh", "_TZ3000_peszejy7", "_TZ3000_qzjcsmar", "_TZ3000_owgcnkrh", "_TZ3000_adkvzooy", "_TZ3000_arfwfgoa", "_TZ3000_a7ouggvs", "_TZ3000_rrjr1q0u", "_TZ3000_abci1hiu", "_TZ3000_dfgbtub0", "_TZ3000_rco1yzb1", "_TZ3000_gbm10jnj", "_TZ3000_5e235jpa", "_TZ3000_sj7jbgks", "_TZ3000_w8jwkczz", "_TZ3000_dziaict4", "_TZ3000_famkxci2", "_TZ3000_itb0omhv", "_TZ3000_tzvbimpq", "_TZ3000_mh9px7cq", "_TZ3000_b7bxojrg", "_TZ3000_ufhtxr59", "_TZ3000_4upl1fcj", "_TZ3000_i3rjdrwu", "_TZ3000_w3c7ouru", "_TZ3000_abci1hiu","_TZ3000_wqcbzbae", "_TZ3000_pkeqinnt", "_TZ3000_uaa99arv", "_TZ3000_wbfgbpxq", "_TZ3000_fa9mlvja", "_TZ3000_tk3s5tyg", "_TZ3000_mrpevh8p", "_TZ3000_qgwcxxws"],
            "map": [

Else if you can't do nothing with your OS (docker), I can make a PR in blind mode, but without guarantees .
For the moment still need to edit this file, sorry, but the procedure will be improved soon.

@Zehir
Copy link
Collaborator

Zehir commented May 16, 2024

@wunni1 the upload page in phoscon it for DDF Bundles, you can't use it to upload the JSON file Smanar gave you.
But the current bundle format don't support button_maps file so for now you will still have to drop the json file in the devices directory and edit the button_maps.json file

@github-actions github-actions bot removed the stale label May 17, 2024
@wunni1
Copy link
Author

wunni1 commented May 17, 2024

@Smanar thank you again. I have no opportunity to edit this file with my OS. So can you try a blind PR. And I will test it?

@Smanar
Copy link
Collaborator

Smanar commented May 18, 2024

PR done here #7781
But you need the next version to have the correction on the button_maps.json file.

@wunni1
Copy link
Author

wunni1 commented May 18, 2024

Thank you very much!

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