How to add Garage door opener - MQTT / TUYA / ESP_835163

Hi!

I’m looking for some solution to connect my garage door to my Openhab 3 environment.
Currently I have a “Kling” garage door motor which does have a Wifi connection.
I have to use it’s own app to control the device over the Wifi. The app is called as GDO (Garage door opener). Unfortunately it does communicate with the Device over the cloud and I want to integrate it to my OH3 system, so I can control it without the 3rd party app.

What I was able to figure out is there are no direct bindings/apps for OH to control this device.
There is an option to connect a smart device to the garage door opener’s special pins, but I’d rather set it without any additional HW.

What I’ve done so far.
Assigned a static IP to my Garage door opener as 192.168.1.X. Ran the PCAP on my mobile and captured the packets to see where the traffic goes and see if does have any visible messages what I could read from the logs.
The logs are not really show much, only that it does communicate to a certain webserver which then controls the device on port 6668.

From the router it did show that the device has a client name “ESP_835163” which should mean that it does have an ESP chip in it.
During the communication I saw that it does communicate to one of the tuyaeu.com sites… So I assume that there is a tuya installed on the device.

The question would be how to integrate this device as a garage door opener to my OH3?
I have never ever used MQTT so I’m a beginner with those devices.
I’ve read an article about using MQTT and TUYA “binding” without having to flash a custom tuya fw to the device.
Is it even possible?

The device from the app can read open percentage, open-closed states and commands, and light on off commands.

Additional info, that I was able to add the device to the SmartLife app, so it really does have Tuya on it!

Could any of you experts direct me to the proper solution? :slight_smile:

I hope, there’s someone with a Kling Garage door, who can say more. I don’t know either the Kling device nor tuya-only devices.
What I do in situations like this:

  1. is there a binding? - no in this case
  2. is there an open API?
  3. is there anything outside of openHAB, which speaks to this device?
  4. try to analyze the traffic, if there’s something you can connect to

ad 1)
no - as you said

ad 2)
ask the vendor, if there’s a possibility to use the API, the App does
perhaps this is still possible? it’s 4 years ago and I’m not sure, if tuya changed something since:

ad 3)
try searching for the specific device name on github, home assistant, iobroker, FHEM, … if there’s someone wo done it before. Then you can either use this as blueprint for your own script or use the piece of software within openHAB (e.g. using another smarthome software and utilize their API/MQTT/…

ad 4)
if you’re more an expert than I am, you can analyze the traffic coming from your device and/or App and try to see, if it uses some kind of API they use and if it is possible to use that within openHAB or a script in a scripting language of your choice.

=> if all of this fails I don’t think flashing the ESP in your device helps. But can you use another controller? is there a keypad on the outside using some kind of wireless protocol, which you can use? are there switches for up/down, you can utilize for a “dumb device - smarthome” situation? like adding some Wifi/zigbee switches to simulate pressing the switch?

And if there were they too would use that cloud interface. Most of the time if there is a cloud interface, there’s no local control for wifi devices like that.

Something from the Internet can reach through your firewall to connect to a device on a specific port? That doesn’t sound right, nor is it safe.

I think there’s a binding on the Smarthome/J marketplace.

Honestly I think this is going to be the easiest approach over all.

I assume this opener has a wall button, correct? If so you can get an ESP8266 (e.g. a NodeMCU which comes with the programmer so all you need is a USB port to flash it), and a relay. Flash the NodeMCU with Tasmota, ESPHome, or one of the other many ESP open source firmware options (no need to code for this). Wire up the relay to the pins on the ESP (there are lots of tutorials) and hook up the control pins to the two wires coming from the button. Configure the ESP to close the relay on receipt of an MQTT command and open it half a second later and you will have your very own remotely controllable button pusher. :slight_smile:

This is how I control my garage door openers, only I use an RPi because at the time I didn’t know anything about microcontrollers. I also have reed sensors connected so I know when the doors are open or closed and a camera because I don’t like to operate heavy equipment without eyes on.

As far as I see it was permanently taken down from the marketplace.

I’m trying to use Agent-K’s method, if that does not work (that post is like 3 yrs old :slight_smile: ), then I’ll settle with a Zwave micro controller connected to the pins. I just did not want to spend any more money on new devices. Prices have went crazy since I purchased the recent ones :frowning:

Thanks for the inputs for both of you! Much appreciated!

1 Like

Different marketplace. OH supports third party marketplaces. GitHub - smarthomej/addons: SmartHome/J addons for openHAB

I’m still using the tuya-mqtt running inside a docker. I find it pretty stable.

Regarding your garage opener, I would echo what has been said: Most garage motor has two terminals that when connected together, it will be the same as pressing the button on your remote.

You could buy an ESP8266 based garage controller that’s essentially just a momentary switch to make the contact between those two terminals. You can buy this for around $20 - $30 I think. There seem to be a few of them around. You could flash it with Tasmota or ESPHome or write your own code. If you want to go down this route, we can explore it further.

I made my own, and wrote my own code (using C++ / Platform IO + Homie convention) for the ESP8266. It communicates via MQTT to openhab. If you want to go this route, happy to discuss it further too.

Another way is to see if you can flash ESPHome/Tasmota directly onto your garage controller.