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 Smart Life ZigBee Garage Door Opener Controller #5899

Closed
MiAutomations opened this issue Mar 24, 2022 · 19 comments
Closed

Tuya Smart Life ZigBee Garage Door Opener Controller #5899

MiAutomations opened this issue Mar 24, 2022 · 19 comments

Comments

@MiAutomations
Copy link

The device is now founded as a Smart plug but I don't see the status of the Sensor, can you please add this function also?

https://s.click.aliexpress.com/e/_A7We5d

  • Product name: The device name as shown on the product or package.
  • Manufacturer: _TZE200_nklqjk62
  • Model identifier: TS0601
  • Device type : Remote opening garage door with sensor
    • Other:

Screenshots

Required screenshots:

image

image

Thank you

@MiAutomations MiAutomations changed the title Device name Tuya Smart Life ZigBee Garage Door Opener Controller Mar 24, 2022
@sebastian-tennant
Copy link

sebastian-tennant commented Apr 5, 2022

+1 on this request

Zigbee2MQTT already supports it: https://www.zigbee2mqtt.io/devices/PJ-ZGD01.html

@github-actions
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 27, 2022
@github-actions
Copy link
Contributor

github-actions bot commented May 5, 2022

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 May 5, 2022
@serrnovik
Copy link

Have the same device. Same behaviour, button works, state is not working. Woundering if there were any progress on this one?

@pdcmoreira
Copy link

Hey, what do you mean about state not working?
What happens when you trigger it and the sensor/magnet closes?
Does it change state immediately to "on" or "off"? Or it doesn't change state at all?
It would make sense to me that it would change state only when the gate closes, not immediately.

@pdcmoreira
Copy link

pdcmoreira commented May 23, 2023

So I bought two of these, which arrived today. I now see what you mean.

It is reported as a switch or light, but its state has nothing to do with the open/close sensor. That sensor state is not being displayed.

Additionally, the switch state doesn't represent the dry contact signal state and to send a signal (close the dry contact for 1s) it is needed to switch it on then off and only then the signal will be sent.

So, for now, to make it work in HA to send a signal, I created a script that turns the switch on, waits 500ms then turns it off and it works fine.

Still don't know how to get the state of the open/close sensor though.

This issue apparently has a DDF to load a similar device, but I'm still trying to understand how the whole thing works.

[Update]
I fiddled around a little bit between the DDF editor and editing the json file directly (saving/loading/reloading in the editor was a bit weird) and got it to work!

I got these from the debugger:

Sensor:

dpid: 0x03, type: 0x01, length: 1, val: 0
(closed)

dpid: 0x03, type: 0x01, length: 1, val: 1
(open)

Switch

dpid: 0x01, type: 0x01, length: 1, val: 1
(on)

dpid: 0x01, type: 0x01, length: 1, val: 0
(off)

The resulting DDF is:

{
  "schema": "devcap1.schema.json",
  "manufacturername": "_TZE200_nklqjk62",
  "modelid": "TS0601",
  "product": "TS0601",
  "sleeper": false,
  "status": "Gold",
  "path": "/devices/vendor/_TZE200_nklqjk62.json",
  "subdevices": [
    {
      "type": "$TYPE_OPEN_CLOSE_SENSOR",
      "restapi": "/sensors",
      "uuid": [
        "$address.ext",
        "0x01",
        "0xef00"
      ],
      "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/on"
        },
        {
          "name": "config/reachable"
        },
        {
          "name": "state/lastupdated"
        },
        {
          "name": "state/open",
          "refresh.interval": 7200,
          "parse": {
            "dpid": 3,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          }
        }
      ]
    },
    {
      "type": "$TYPE_ON_OFF_LIGHT",
      "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",
          "refresh.interval": 300,
          "read": {
            "fn": "tuya"
          },
          "write": {
            "dpid": 1,
            "dt": "0x10",
            "eval": "Item.val == 1 ? 1 : 0;",
            "fn": "tuya"
          },
          "parse": {
            "dpid": 1,
            "eval": "Item.val = Attr.val;",
            "fn": "tuya"
          }
        },
        {
          "name": "state/reachable"
        }
      ]
    }
  ]
}

This is how it shows up on HA:
image
("DRY-1" is the name I gave to the device and switch entity.)

Now, is it possible to improve the signal trigger so that the script isn't needed?
Does the open/close sensor look OK? Or can it be improved?

@Mimiix
Copy link
Collaborator

Mimiix commented May 24, 2023

Re-opened on request. @BabaIsYou or @Smanar you got time to check in :)?

@Mimiix Mimiix reopened this May 24, 2023
@Mimiix
Copy link
Collaborator

Mimiix commented May 24, 2023

@pdcmoreira or @MiAutomations I do require to have all related screenshots attached.

@pdcmoreira
Copy link

pdcmoreira commented May 24, 2023

Thanks @Mimiix

Screenshots:
image
image

@Smanar
Copy link
Collaborator

Smanar commented May 24, 2023

I think @pdcmoreira have made the full DDF ? Or something is still missing ?

@pdcmoreira
Copy link

@Smanar
I left a couple questions in my previous comment, I don't know if it's possible to deal with that through a DDF:

Now, is it possible to improve the signal trigger so that the script isn't needed?
Does the open/close sensor look OK? Or can it be improved?

@BabaIsYou
Copy link
Contributor

BabaIsYou commented May 24, 2023

Does this link he same issue that needs to use a script : Koenkk/zigbee-herdsman-converters#3897 ?

BTW, nothing very special to improve your DDF, may be some "cosmetics" :

{
	"schema": "devcap1.schema.json",
	"manufacturername": "_TZE200_nklqjk62",
	"modelid": "TS0601",
	"product": "'PJ-ZGD01",
	"vendor": "Matsee",
	"sleeper": false,
	"status": "Gold",
	"subdevices": [{
			"type": "$TYPE_OPEN_CLOSE_SENSOR",
			"restapi": "/sensors",
			"uuid": [
				"$address.ext",
				"0x01",
				"0x0500"
			],
			"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": "config/on"
				},
				{
					"name": "config/reachable"
				},
				{
					"name": "state/lastupdated"
				},
				{
					"name": "state/open",
					"read": {
						"fn": "none"
					},
					"parse": {
						"dpid": 3,
						"eval": "Item.val = Attr.val;",
						"fn": "tuya"
					}
				}
			]
		},
		{
			"type": "$TYPE_ON_OFF_LIGHT",
			"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",
					"read": {
						"fn": "tuya"
					},
					"write": {
						"dpid": 1,
						"dt": "0x10",
						"eval": "Item.val == 1 ? 1 : 0;",
						"fn": "tuya"
					},
					"parse": {
						"dpid": 1,
						"eval": "Item.val = Attr.val;",
						"fn": "tuya"
					}
				},
				{
					"name": "state/reachable"
				}
			]
		}
	]
}

@Smanar
Copy link
Collaborator

Smanar commented May 24, 2023

Yes for me it's fine too, you can send "on" or "off" request, so no problem with trigger.

@github-actions github-actions bot removed the stale label May 25, 2023
@github-actions
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 Jun 15, 2023
@github-actions
Copy link
Contributor

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.

@pdcmoreira
Copy link

pdcmoreira commented Nov 4, 2023

I bought another one which came with the _TZE204_nklqjk62 manufacturer code and I want to let you guys know that this exact same DDF still works on it.
I basically just opened the _TZE200_nklqjk62 file, changed the manufacturer name and then File → Save as with the _TZE204_nklqjk62 name. Then hot reload (and actually rebooted all docker instances).
Behavior is also the same in HA, so I also duplicated the script.

@lepeno82
Copy link

lepeno82 commented Feb 5, 2024

Hello
I would like to buy one of this equipment, but can you confirm , with the latest DDF, I can command the switch, and read the state of the sensor?
I would like to use it in jeedom with deconz plugin
Best regards

@pdcmoreira
Copy link

Hello I would like to buy one of this equipment, but can you confirm , with the latest DDF, I can command the switch, and read the state of the sensor? I would like to use it in jeedom with deconz plugin Best regards

Yes, it works, my explanation above is still true today.

@lepeno82
Copy link

lepeno82 commented Feb 6, 2024

Ok thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants