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

[Device] TuYa PJ-ZGD01 - Support for garage door openers #444

Closed
jurefl opened this issue May 15, 2022 · 19 comments
Closed

[Device] TuYa PJ-ZGD01 - Support for garage door openers #444

jurefl opened this issue May 15, 2022 · 19 comments
Labels
enhancement New feature or request stale

Comments

@jurefl
Copy link

jurefl commented May 15, 2022

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 jurefl added the enhancement New feature or request label May 15, 2022
@itavero
Copy link
Owner

itavero commented May 15, 2022

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.

@jurefl
Copy link
Author

jurefl commented May 15, 2022

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.

@stale
Copy link

stale bot commented Jun 22, 2022

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 stale bot added the stale label Jun 22, 2022
@andre-sam
Copy link

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.

@stale stale bot removed the stale label Jun 24, 2022
@lenny005
Copy link

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.

@itavero
Copy link
Owner

itavero commented Jul 18, 2022

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

@stale
Copy link

stale bot commented Aug 31, 2022

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 stale bot added the stale label Aug 31, 2022
@stale stale bot closed this as completed Sep 15, 2022
@itavero itavero changed the title [Device] TuYa PJ-ZGD01 [Device] TuYa PJ-ZGD01 - Support for garage door openers Dec 30, 2022
@itavero itavero removed the stale label Dec 30, 2022
@itavero
Copy link
Owner

itavero commented Dec 30, 2022

Reopen due to recent requests.

@itavero itavero mentioned this issue Jan 5, 2023
2 tasks
@Ropuh
Copy link

Ropuh commented Jan 5, 2023

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).

@itavero
Copy link
Owner

itavero commented Jan 5, 2023

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.

@Ropuh
Copy link

Ropuh commented Jan 5, 2023

If only I could code...

@itavero itavero reopened this Jan 7, 2023
@itavero
Copy link
Owner

itavero commented Jan 29, 2023

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.

@bosu1787
Copy link

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"
}

@stale
Copy link

stale bot commented Apr 25, 2023

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 stale bot added the stale label Apr 25, 2023
@stale stale bot closed this as completed May 19, 2023
@Dannakin
Copy link

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

@itavero
Copy link
Owner

itavero commented May 29, 2023

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.

@falcomenz
Copy link

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" }

Thank you for your mqttthing config, unfortunately the "setTargetDoorState" seems to be the wrong way round. When the garage door is closed (door contact = true), the PJ-ZGD01 needs a "true" value as a trigger to activate the relay and when the door is open (door contact = false) a "false" value. With you config i need to "double tap" the Garage Door in Homekit to open. How do i change the config to get the desired behavior? My workaround currently is with node red, but it would be easier to just have the complete config within mqttthing :) Thank you!

@itavero itavero mentioned this issue Nov 1, 2024
2 tasks
@YellowNest
Copy link

Just got my PJ-ZGD01 and got disappointed since it’s unsupported 😕

Is it possible to get it to work with homebridge?

@itavero
Copy link
Owner

itavero commented Jan 13, 2025

Well, nowhere in the documentation of homebridge-z2m does it mention that garage door openers are supported.

You can either supply a PR for this project to implement support for these, or use something like homebridge-mqttthing to manually integrate it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request stale
Projects
None yet
Development

No branches or pull requests

9 participants