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

AVATTO ZWSM16-2-Zigbee #7646

Closed
1 task done
LeoeLeoeL opened this issue Feb 27, 2024 · 14 comments · Fixed by #7712
Closed
1 task done

AVATTO ZWSM16-2-Zigbee #7646

LeoeLeoeL opened this issue Feb 27, 2024 · 14 comments · Fixed by #7712

Comments

@LeoeLeoeL
Copy link

LeoeLeoeL commented Feb 27, 2024

Is there already an existing issue for this?

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

Product name

AVATTO ZWSM16-2-Zigbee

Manufacturer

_TZ3000_mtnpt6ws

Model identifier

TS0002

Device type to add

Light

Node info

image

Endpoints and clusters

image

Basic

image

Further relevant clusters

Power Configuration

On/Off

image
image

Level Control

Color Control

Thermostat

Simple Metering

image

Electrical Measurement

image
image
image
image

Any other cluster of relevance/interest

@LeoeLeoeL
Copy link
Author

image
If I set ON light 10 , light 11 switches to ON too.

@SirBarkAlot
Copy link

i have one to, if there is support i would realy love it
if you would need somone to test it
PM me

@LeoeLeoeL
Copy link
Author

I have 4 of them.
2 are paired to zigbee2Mqtt and work OK.
image
I think the energy meter is disabled by firmware

@LeoeLeoeL
Copy link
Author

Is there any "work in progress" regarding this device?
I need to buy and install 2 more.

Copy link
Contributor

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 17, 2024
@LeoeLeoeL
Copy link
Author

It could be a good thing to integrate this device because is not expensive.

@Mimiix
Copy link
Collaborator

Mimiix commented Apr 17, 2024

@Smanar Can you take a look if you have time :)?

@Smanar
Copy link
Collaborator

Smanar commented Apr 17, 2024

Hello can you try this DDF


{
  "schema": "devcap1.schema.json",
  "manufacturername": [
    "_TZ3000_zmy4lslw",
    "_TZ3000_lmlsduws",
    "_TZ3000_mtnpt6ws",
    "_TZ3000_nuenzetq"
  ],
  "modelid": [
   "TS0002",
   "TS0002",
   "TS0002",
   "TS0002"
  ],
  "product": "Tuya 2 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: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": "state/on"
        },
        {
          "name": "state/reachable"
        },
        {
          "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: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": "state/on"
        },
        {
          "name": "state/reachable"
        }
      ]
    }
  ]
}

Or if you want, just edit this DDF devices\tuya_TZ3000_2channel_module.json

You need to re-include the DDF after that, because the tuya unlock sequence is done at inclusion or every 24h (you can wait 24h too)

@LeoeLeoeL
Copy link
Author

It has been impossible to load your DDF so I copied your items (violet, blue and green) and generated this one:

{
"schema": "devcap1.schema.json",
"manufacturername": "_TZ3000_mtnpt6ws",
"modelid": "TS0002",
"product": "TS0002",
"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"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "config/tuya_unlock",
"public": false,
"description": "Tuya sequence to unlock some device.",
"refresh.interval": 86400,
"default": false
},
{
"name": "state/on",
"description": "True when device is on; false when off.",
"refresh.interval": 5
},
{
"name": "state/reachable"
}
]
},
{
"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"
},
{
"name": "attr/type"
},
{
"name": "attr/uniqueid"
},
{
"name": "state/on",
"description": "True when device is on; false when off.",
"refresh.interval": 5
},
{
"name": "state/reachable"
}
]
}
]
}

Now the two ON/OFF switches are separated; If I switch on number 1 the number 2 stays off.
Too much easy. What's the catch?

@LeoeLeoeL
Copy link
Author

I successfully overwrote your DDF over the mine and works.

@github-actions github-actions bot removed the stale label Apr 18, 2024
@Smanar
Copy link
Collaborator

Smanar commented Apr 18, 2024

So it mean the first DDF is working ?
Can add your device to the previous DDF officialy ?

@LeoeLeoeL
Copy link
Author

Both DDF work but I'm using yor DDF because I think it's better.
My DDF has something strange for me:
...
{
"type": "$TYPE_ON_OFF_OUTPUT",
"restapi": "/lights",
"uuid": [
"$address.ext",
"0x01"
...
{
"type": "$TYPE_ON_OFF_OUTPUT",
"restapi": "/lights",
"uuid": [
"$address.ext",
"0x01"
],
...
while yours has
...
{
"type": "$TYPE_ON_OFF_OUTPUT",
"restapi": "/lights",
"uuid": [
"$address.ext",
"0x01"
],
...
{
"type": "$TYPE_ON_OFF_OUTPUT",
"restapi": "/lights",
"uuid": [
"$address.ext",
"0x02"
],
...
My DDF doesn't have 0x02 for the 2nd switch. Is it normal?

@Smanar
Copy link
Collaborator

Smanar commented Apr 19, 2024

My DDF doesn't have 0x02 for the 2nd switch. Is it normal?

No ^^.
It's the endpoint, it's the number on title node, on your you have "01" "02 "F2", 0x01 is for the first gand and 0x02 for the second one.
So strange your DDF are working ....

BTW have added the device here #7712

@LeoeLeoeL
Copy link
Author

Thank you

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