bwp91 / homebridge-ewelink

Homebridge plugin to integrate eWeLink devices into HomeKit.
MIT License
385 stars 126 forks source link

Remote control for auto gate #322

Closed iiithebest38 closed 1 year ago

iiithebest38 commented 2 years ago

Hi, I am trying to configure the auto gate remote control in the Homebridge but it is shown up as switch and not working as it is supposed to be. It should be pressed once to open the gate, pressed again to stop, and pressed again to close, and I want to turn on the gate light when open and off the light when closed, but when it is pressed, it showed on then off again, so apple home doesn’t know the gate is opened because the remote control is in off state. I would appreciate if anyone has any idea how to configure this. Thanks.

bwp91 commented 2 years ago

Hi, could you post a link to the device that you have?

iiithebest38 commented 2 years ago

Here you go the link to the device: https://shopee.com.my/product/18187084/4771249506?smtt=0.181145250-1639222789.9

MoTechnicalities commented 2 years ago

The Eachen RM-DC34 acts as a bridge between WI-FI and your Gate's RF Receiver (effectively acting like your remote control button), therefore it does not have the ability to detect the state of your gate (OPEN or CLOSED) any more than your Remote does. To accomplish what you are looking to do with the RM-DC34 device in HomeKit, you will have to have a separate eWelink compatible state sensor attached to the Gate for the detection. You would then have to configure the Homebridge Ewelink plugin to use the 2 devices in a Garage Accessory Simulation. Unfortunately, HomeKit does not yet have a "Gate" simulation, but the Garage Simulation can serve the same essential purpose.

Hope that helps.

bwp91 commented 2 years ago

Never heard of this device before.

@iiithebest38 when you add the subdevice to the rf bridge in the ewelink app, which 'type' did you choose? From the options of 1-button, 2-button, 3-button, 4-button, alarm and curtain?

MoTechnicalities commented 2 years ago

Optionally, the plugin could possibly be made to bypass the state of the devices buttons in HomeKit. But then you introduce the probability for the HomeKit tile and true state of the door to become out-of-sync.

iiithebest38 commented 2 years ago

Never heard of this device before.

@iiithebest38 when you add the subdevice to the rf bridge in the ewelink app, which 'type' did you choose? From the options of 1-button, 2-button, 3-button, 4-button, alarm and curtain?

I choose the 1-button option. But actually that doesn’t matter, since there is only one button on the existing remote that will perform open/stop/close action.

iiithebest38 commented 2 years ago

The Eachen RM-DC34 acts as a bridge between WI-FI and your Gate's RF Receiver (effectively acting like your remote control button), therefore it does not have the ability to detect the state of your gate (OPEN or CLOSED) any more than your Remote does. To accomplish what you are looking to do with the RM-DC34 device in HomeKit, you will have to have a separate eWelink compatible state sensor attached to the Gate for the detection. You would then have to configure the Homebridge Ewelink plugin to use the 2 devices in a Garage Accessory Simulation. Unfortunately, HomeKit does not yet have a "Gate" simulation, but the Garage Simulation can serve the same essential purpose.

Hope that helps.

The state sensor that you mentioned, is it something that is able to feedback to Ewelink at which state (OPEN or CLOSED) the gate is in? I am not sure if it exists, I will have to do some research. Thanks.

MoTechnicalities commented 2 years ago

I was looking at the user manual. [https://ewelink.eachen.cc/wp-content/uploads/2018/07/RMDC34usermanual.pdf] I note that It mentions the possible use RF wireless PIR/Door/Fire/Water sensors with the device. So, maybe that can be implemented into the plugin if you have such a sensor.

bwp91 commented 2 years ago

Sorry, haven’t had a chance to look into thus properly yet. Will get to it!

In the mean time, could you post a screenshot of how this device looks in the ewelink app?

thanks and happy new year!

iiithebest38 commented 2 years ago

Happy new year! No issue, thanks for taking time to revisit. Please see attached the images. 6081D911-405E-4959-9C6E-0F03CA1613FF 4F06EB2F-9F80-4C32-B584-90A2AC61AE01

bwp91 commented 2 years ago

Thanks! And which device are you talking about with this issue? assuming the “Curtain”? or the “Gate”?

bwp91 commented 2 years ago

Also change of subject, i’ve always been curious, does the plugin work okay with chinese characters in device names?

tangone2 commented 2 years ago

Thanks! And which device are you talking about with this issue? assuming the “Curtain”? or the “Gate”?

It is the gate. I added Curtain for testing. but all three buttons do the same thing, press once open the gate, press again stop it, and press again close the gate. I tried to separate them in three buttons with different name to make siri voice control easier but still not quite as I wanted.

By the way, chinese characters worked fine, they are shown up in homekit without issue. Thanks.

bwp91 commented 2 years ago

The challenge is that as you have mentioned, the same command is used in a cycle of OPEN -> STOP -> CLOSE. If you leave the door to open fully, do you still need to press again twice to close it? (ie stop, then close?)

The home app UI doesn't offer an option to STOP the garage door. Only OPEN and CLOSE. Plus the home app would never know the actual state of the garage door.

It would maybe be possible to create a garage door accessory, that sent the command to OPEN the garage, and then closing the garage in the home app it would need to send two commands to close the door, ie stop and close.

But it would be so easy for this to get out of sync with the garage door, like if you were away from home, it would not be a good idea to rely on the state of the door in the home app to see the physical state.

iiithebest38 commented 2 years ago

If the door is fully open, I only need to press once to close it. The auto gate panel has a magnetic sensor at the beginning and end of the sliding track each so that it knows the gate is fully open or fully closed. To help you better understand, please see attached the wiring diagram of the auto gate panel. The red arrow is to close the gate only, no matter the gate is partially or fully open. While the blue arrow will cycle through the state open-stop-close if it is fully closed and then stop half way, or open-close if fully closed and fully open. I configured the remote to two buttons, button 1 = “open gate” and button 2 = “close door”, when I ask Siri to “open gate”, Siri will respond: “open gate is now open” and the gate open. After the gate is fully open, and when I ask Siri to “close door”, Siri will respond: “close door is now open” (although the gate is closing), both buttons act as a push button and once pressed, they will open and closed after 0.5s. If I used only one button, after the gate is open, Siri won’t close it because the button has changed to close state after the first open command. 83CAAC51-13CB-4C1D-BE85-0B2D040BAD89

bwp91 commented 2 years ago

Thanks for the info. But I think the issue still remains, the plugin can only mimic what the ewelink app can do.

The plugin does not have access to the current state of the door. And the plugin would never know whether the next button press would be used to open or close or stop the door. The plugin is basically working blind, just like the ewelink app.

bwp91 commented 2 years ago

You could consider buying a sonoff contact sensor like the DW2-Wifi for the garage door.

This would allow you to use automations to turn the light on and off as the garage is open/closed.

bwp91 commented 2 years ago

@MoTechnicalities

So, maybe that can be implemented into the plugin if you have such a sensor.

Yes this is already possible! https://github.com/bwp91/homebridge-ewelink/wiki/RF-Bridge-Sensors

tangone2 commented 2 years ago

Thanks for the info, I will look into it. By the way, is the DW2 waterproof?

bwp91 commented 2 years ago

I’m not sure if it’s waterproof. Any contact sensor within homekit would let you create automations.

But if you got one that was compatible with ewelink plugin then i could potentially then look into your setup further with showing the buttons as a garage door

tangone2 commented 2 years ago

great to hear that...thanks for taking time to look into this, I appreciate it.

bwp91 commented 1 year ago

Hi, Closing this just as been a little overwhelmed with issues recently. If this is still an issue or a feature you would like implemented then please do re-open this ticket! Thanks for your understanding!