homebridge-z2m icon indicating copy to clipboard operation
homebridge-z2m copied to clipboard

[Device] TuYa PJ-ZGD01

Open jurefl opened this issue 2 years ago β€’ 6 comments

Device description Garage door opener - TuYa PJ-ZGD01

Supported in Zigbee2MQTT? Support is already present in Zigbee2MQTT since v1.23.0

Device model / Exposes information Model: PJ-ZGD01 Exposes:

  • Trigger (binary)
  • Garage_door_contact (binary)
  • Linkquality (numeric)

cc https://www.zigbee2mqtt.io/devices/PJ-ZGD01.html

[
  {
    "type": "binary",
    "name": "trigger",
    "property": "trigger",
    "access": 3,
    "value_on": true,
    "value_off": false,
    "description": "Trigger the door movement"
  },
  {
    "type": "binary",
    "name": "garage_door_contact",
    "property": "garage_door_contact",
    "access": 1,
    "value_on": true,
    "value_off": false
  },
  {
    "type": "numeric",
    "name": "linkquality",
    "property": "linkquality",
    "access": 1,
    "unit": "lqi",
    "description": "Link quality (signal strength)",
    "value_min": 0,
    "value_max": 255
  }
]

Missing features/functionality

  • Triggering open/close door.
  • Status whether the door is closed or open.

Suggested services and characteristics Unsure.

jurefl avatar May 15 '22 01:05 jurefl

Probably should be implemented as a Garage Door Opener.

The difficult thing is that you can only send a trigger and you have to guess the direction the door is moving in. I'm not sure how you can make this work reliably. You can only know if it's fully closed. If it's not then you do not know if it's moving or not, and if it's moving you can't know the direction for sure.

itavero avatar May 15 '22 05:05 itavero

Yup - reading through the link, implemented as "Garage Door Opener" would be ideal.

True. Maybe the logic something like below can do it:

  • When garage_door_contact is reporting true, then doors are closed (this is the only reliable value)
  • If doors are closed when a trigger is pressed, then assume doors open
  • If doors are opened when a trigger is pressed, assume doors closed (with a timeout i.e. if garage_door_contact don't report true in e.g. 45sec after trigger then report either open or ObstructionDetected)

I would be happy to give it a go, if you are able to give me some pointers? This would be my first contribution here.

jurefl avatar May 15 '22 23:05 jurefl

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

stale[bot] avatar Jun 22 '22 23:06 stale[bot]

I have the same sensor and support would be awesome!

Based on my tests the sensor works like an inching relay and exposes trigger, garage_door_contact, linkquality.

garage_door_contact is a contact sensor which will report true or false where true=door closed and false=door open.

trigger will trigger a door movement and the value can also be true of false. However, here is where it gets interesting. If the garage_door_contact is reporting true door closed then the only way to trigger the relay is by setting trigger to true and when garage_door_contact is reporting false door open the only way to trigger the relay is by setting trigger to false.

If there is an obstruction my garage door will revert to the previous position. For example, if it starts opening if encounters an obstruction it will automatically move back into a close position and vice-versa.

andre-sam avatar Jun 24 '22 01:06 andre-sam

Probably should be implemented as a Garage Door Opener.

The difficult thing is that you can only send a trigger and you have to guess the direction the door is moving in. I'm not sure how you can make this work reliably. You can only know if it's fully closed. If it's not then you do not know if it's moving or not, and if it's moving you can't know the direction for sure.

Hello, could you still implemente it even if you can’t have the full thing working as you wish please ? My door closes automatically with a timer, just need to send an open request. The open/close status is enough for me.

thank you very much.

lenny005 avatar Jul 18 '22 12:07 lenny005

I can probably make an implementation based on a few assumptions, however I don't know when I'll have time to do so.

itavero avatar Jul 18 '22 17:07 itavero

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

stale[bot] avatar Aug 31 '22 10:08 stale[bot]

Reopen due to recent requests.

itavero avatar Dec 30 '22 12:12 itavero

Hello, please implemente it even partial. HA via zigbee2mqtt operates Closed/Opened (via contact sensor) and moving (without direction - close/start based on contact sensor).

Ropuh avatar Jan 05 '23 13:01 Ropuh

Currently, between my job, being a father and being a home owner, I simply do not have the time to implement this. You're more than welcome to provide a PR for this.

itavero avatar Jan 05 '23 13:01 itavero

If only I could code...

Ropuh avatar Jan 05 '23 13:01 Ropuh

Ordered a PJ-ZGD01 from AliExpress, so I'll also have a device to test with. Probably will take another month or so to arrive, and of course then I still have to find time to install it.

itavero avatar Jan 29 '23 09:01 itavero

i was able to make it work with mqttthing. here is the config:

{ "type": "garageDoorOpener", "name": "Poarta Auto", "topics": { "getCurrentDoorState": "zigbee2mqtt/Poarta Auto$.garage_door_contact", "getTargetDoorState": "zigbee2mqtt/Poarta Auto$.garage_door_contact", "setTargetDoorState": "zigbee2mqtt/Poarta Auto/set/trigger" }, "doorCurrentValues": [ "false", "true", "Opening", "Closing", "Stopped" ], "doorTargetValues": [ "false", "true" ], "lockValues": [ "Unsecured", "Secured", "Jammed", "Unknown" ], "accessory": "mqttthing" }

bosu1787 avatar Mar 10 '23 16:03 bosu1787

It appears that this issue did not have an update in quite some time. Please check if you can provide any additional information to help resolve this issue. If there isn't any activity in the next two weeks, this issue will be closed automatically. Thank you for your contributions!

stale[bot] avatar Apr 25 '23 20:04 stale[bot]

@itavero how does it look with support of this garage door opener?

Dannakin avatar May 28 '23 12:05 Dannakin

how does it look with support of this garage door opener?

Not sure what you are asking. If you're asking if there's been any progress, there wasn't any from my side.

itavero avatar May 29 '23 05:05 itavero