logo elektroda
logo elektroda
X

Which garage door controller for Home Assistant? Software change ATLO-GDC2-TUYA

p.kaczmarek2 2811 1
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
📢 Listen (AI):
  • A Smart Garage Controller held in hand, showing input/output ports, ON/OFF button, and cables. .
    Here I will show a garage door controller that can be easily changed in software so that it works 100% locally, without the cloud, and connects to Home Assistant. Here is the ATLO-GDC2-TUYA, available to buy for just £60. Normally it works with Tuya, but it is built on CB2S, so you can upload our Polish soft to it. All you need for this is a USB to UART converter, but perhaps let's start by looking at the contents of the kit:
    ATLO-GDC2-TUYA garage door controller package with an illustration of smartphone control and included components. Box of ATLO-GDC2-TUYA garage door controller with images of the device, garage doors and compatibility with Google Assistant and Alexa. .
    The kit is quite extensive, because in addition to the gate controller itself with the sensor on the long cable, you also get the mounting components, and the whole thing is mains-powered, i.e. it has a built-in power supply. I have already seen kits that required an external power supply fed into the USB port, there is no such problem here.
    ATLO-GDC2-TUYA garage door controller set in an open box with accessories and a long cable in a plastic bag. Contents of the ATLO-GDC2-TUYA garage door controller set in an open box, with visible cables and mounting accessories. ATLO-GDC2-TUYA garage door controller set with manual and accessories in plastic bags. .
    ATLO-GDC2-TUYA garage door controller kit with sensor, wires, and mounting accessories on a white background. ATLO-GDC2-TUYA garage door controller set with accessories: controller, long-cable sensor, wires and mounting parts. ATLO-GDC2-TUYA garage door controller with cables and an information label. .
    There is also a manual included, which strangely shows a USB powered controller.... perhaps it is the latter version - ATLO-GDC1-TUYA. The manual also describes pairing with an app, which I omit here.
    Polish user manual for the ATLO-GDC1-TUYA / ATLO-GDC2-TUYA garage door controller with wiring diagrams and application instructions. Installation manual of the garage door controller with mounting diagrams and operating instructions. .
    I then move straight on to the presentation of the interior. The screws need to be removed.
    ATLO-GDC2-TUYA garage door controller with power cord and long-cable sensor on a white background. ATLO-GDC2-TUYA garage door controller opened, showing the PCB and connected wires. .
    The board is double-sided, but the components are only on the top. It mixes surface mount and through-hole assembly. From the solder side you can see the WiFi module already soldered in.
    ATLO-GDC2-TUYA garage door controller with open casing, showing PCB with electronic components and wires. .
    The first impression is positive. A fuse and even a varistor? Apparently these are the basics, but in the cheapest products I often don't see a varistor. Apart from that, there is a non-isolated power supply (step down), a 3.3V LDO, a WiFi module and a relay. The PCB designation is WG-088-V8, date 20230409.
    Close-up of a garage door controller PCB with visible CB2S WiFi module, relay, and electronic components. Close-up of a garage door controller PCB labeled WG-088-V8, date 20231124, with various electronic components visible. .
    The relay (used to short-circuit the gate button) is HUI KE HK4100F-DC5V-SHG.
    Close-up of the ATLO-GDC2-TUYA garage door controller circuit board with a visible HUI KE relay and connected wires. Close-up of the ATLO-GDC2-TUYA garage door controller PCB with a HUI KE relay, capacitors, and connected wires. .
    WiFi module, or CB2S (BK7231N):
    Close-up of the CB2S module on a controller PCB, showing model label and CE markings. Close-up of the ATLO-GDC2-TUYA garage door controller PCB with visible components, including the CB2S module. .
    OBK can be uploaded to it: https://github.com/openshwprojects/OpenBK7231T_App
    You will need a USB to UART converter and a 3.3V power supply.
    Just use our Flasher: https://github.com/openshwprojects/BK7231GUIFlashTool.
    Program according to the flasher readme or according to our Elektroda Youtube videos: https://www.youtube.com/@elektrodacom
    We solder the four wires - RX, TX and GND and the power supply (3.3V):
    A section of a PCB diagram highlighting the 3V3, GND, RX1, and TX1 pins needed for programming. .
    Close-up of the bottom side of a PCB with four soldered wires: white, black, red, and purple. .
    Here is my whole circuit (with a 3.3V supply, as the device cannot be connected to the mains normally as its power supply does not provide galvanic isolation.... one could make a short circuit and damage the computer).
    Breadboard with connected wires, ATLO-GDC2-TUYA garage door controller, and USB-UART converter on a white background. .
    The mentioned flasher allows to first read the manufacturer's batch and then upload the OBK. In addition, it detects the GPIO configuration:
    Screenshot of the BK7231 Easy UART Flasher program showing extracted device GPIO configuration in JSON and pin description. .
    Tuya configuration:
    Code: JSON
    Log in, to see the code
    .
    You can now use the template converter:
    https://openbekeniot.github.io/webapp/templateImporter.html
    OBK configuration:
    Code: JSON
    Log in, to see the code
    .
    Verbal description:
    
    Device seems to be using CB2S module, which is BK7231N chip.
    - Relay (channel 1) on P7
    - WiFi LED on P26
    - Door Sensor (channel 1) on P8
    - Button (channel 1) on P6
    
    .
    Now you can already freely configure the GPIO as required and/or connect the device to the Home Assistant ( tutorial ). It doesn't have any pre-made interactions at the moment, so it's up to us to decide where and how we script it - it can be done in HA, or in OBK too, via obk or Berry scripts:
    https://github.com/openshwprojects/OpenBK7231T_App/blob/main/docs/autoexecExamples.md
    Berry scripts for various IoT platforms - OBK scripting tutorial, part 1

    Finally, it is probably still possible to write a few words about the operation of this controller itself. The relay on pin P7 is used to simulate pressing the button from opening/closing the gate, it is potential-free. The sensor on P8 allows the current status of the gate to be read out. The button on P6 is the small button for pairing, and the WiFi LED, as you know, shows the status of WiFi. We configure the behaviour of the whole thing as required. Perhaps I will prepare a separate topic, independent of the specific hardware, showing how to configure such a thing.

    In summary , the product was with a board dated April 2023, essentially 2 years ago (at the time of writing this topic). Inside was a CB2S (BK7231N) and the firmware change went smoothly. After the conversion, the whole thing is freely configurable and scriptable, as well as linking to Home Assistant. Do you use this type of controller with HA? Feel free to discuss.

    Cool? Ranking DIY
    Helpful post? Buy me a coffee.
    About Author
    p.kaczmarek2
    Moderator Smart Home
    Offline 
    p.kaczmarek2 wrote 13083 posts with rating 10852, helped 601 times. Been with us since 2014 year.
  • ADVERTISEMENT
  • #2 21541454
    chemik_16
    Level 26  
    btw, how to mount the antenna to this and other modules ? in place of this round pad as I understand it and once I've made out with a meter, just a question if the jumpers don't have to be moved too.
    There is no ground on this larger pad or at the printed antenna ...

    I have to go out of the channel with such a pad about 2m ;D adding a 2.4 antenna module with a wire did not give anything.
📢 Listen (AI):
ADVERTISEMENT