Control Liftmaster LA400 Gate Opener via HA?

Ok. The SBC connection on the expansion board will open/close the gate with RatGDO. I did a bit of experimenting and I couldn’t find a connection that would trigger open/close states via the dry contact connections. I ran out of time and didn’t try very hard though. I need to read up a bit more on how to get that working, if it’s at all possible. It may need to wait until the weekend before try #2.

Regardless, the way I use the RSL12UL is very simple. It’s just something I need to open, and then let a timer and sensors manage the rest. So, even if I can’t pull a status on the gate, I really only need it to function like a single-button opener. Would be nice to get it working completely, however.

Great info in this thread by the way. The HA community is something special.

I have a Liftmaster CSL24UL gate operator, with the add-on board. Like fyton2v, the board layout of this board is different than the LA400. I formatted the ratgdo with the MQTT firmware, enabled dry contact functionality, and hooked up the device as follows:

  • Red Ctrl - “SBC+” pin on add-on board
  • Wht GND - “COM-”, under the SBC pin on the add-on board
  • Open - Add-on board AUX Relay 1 NC (relay 1 DIP switch set to OFF-OFF-ON)
  • Close - Add-on board AUX Relay 2 NO (relay 2 DIP switch set to OFF-ON-OFF)
  • GND - Wired into add-on board Aux Relay 1 AND 2 commons (commons wired together - I have no idea if this is proper)

Door open/close sensing works fine, but I can’t close it via ratgdo. I’m thinking possibly a bad connection to the SBC pin or common, or I need to pin into something else on the board for “Wht GND”… unlike the LA400, this board doesn’t have a board ground connection that I can see.

1 Like

Why use the AUX Relay instead of these on your expansion board?
image
I tried to look up your model’s board too and it might have an option in the top right of the main board:
image

Hope this is helpful for the LA4000 folks

1 Like

Here’s the wiring for mine: https://entryandexit.com/manuals/liftmaster/csl24ul/csl24ul_wiring_diagram.pdf

Unlike the LA400, the main board of the CSL24UL doesn’t have a SBC terminal.
Regarding using OPN, CLS, STP on the expansion board instead of the AUX Relays, I could be wrong, but I think that those are for control, not limit sensing…that’s at least what the wiring diagram makes it seem like.

That’s much more detailed than what I found. Thanks.
I think you are right that those are for control and not limit sensing.

Can you not use just the SBC terminal on the Expansion board? If that’s not there,
I think you could try to use just the “open” and “common” in the upper right corner on the main board OR on the bottom left corner.

The only way I can see this not working is if your opener needs a different command for open vs close. Maybe try to put two jumpers to both Open and Close from “Red Ctrl to GDO” if just one doesn’t work.

Good find on the aux relays for sensing status. I think that is a game changer for those with expansion boards!

Thank you!! With this setup are you able to see open/close/opening/closing status messages on HA?

During the little bit of testing I’ve done on the 12UL, the Open and Close terminals on both the main board and expansion board trigger open and close actions when the circuit is closed. I believe they’re designed to support a 3 button control panel Open/Stop/Close. They’re sending voltage all the time … I think. I was really just quickly testing with a multimeter and monkeying with wires for 30 mins, so there may be some crossed wires in my head.

I don’t have a close button in HA working either. However, the Open Cover function does 3 things. It’ll open the gate, pause a moving gate, and close the gate. It’s one button. It may only be appearing as one active button for me because the device isn’t aware of the gate’s state.

Thanks for the tip on the Aux ports. Perhaps they’re the path to a fully functioning cover.

Just Open and Close. It doesn’t do Opening and Closing, it just flips from Closed to Open and Open to Closed.

OK. Using the auxiliary relays are definitely an improvement for folks with expansion boards. Below is a table covering the functions of the dip switches on that board’s relays. So, here’s what I did … and it’s important to note that the relays on my expansion board were unused.

  • I used a single relay on the control board, Relay 1 for me (but it doesn’t matter which) and set the DIP switches to OFF OFF ON. This will send voltage to the right place when the gate hits its open stop limit and close stop limit.
  • Connected the RatGDO dry contacts like this: Open to NO on the relay 1, Close to NC, and GND to COM.
  • Connected the RatGDO ‘Red Ctrl to GDO’ to the SBC terminal on the expansion board and connected ‘Wht Gnd’ to the adjacent COM terminal.

This will allow the RatGDO thing to trigger an open action to the gate controller and get open and closed status from the controller, and then refer that info back to HA. You don’t get opening and closing states, but I’ll take this situation over MyQ any day. Also, the “close” function that shows up in the MQTT integrated entity doesn’t work, because it’s Single Button Control. I’m not sure you really need it anyway. You can just use a button card to display the gate entity and the icons will change based on open or closed state. Pretty happy with how this is working.

Edit: It turns out the close function does in fact work. So, even better.

@fyton2v Check this out by @rbdls on another setup using different settings.

  • Red Ctrl - “SBC+” pin on add-on board
  • Wht GND - “COM-”, under the SBO pin on the add-on board
  • Open - Add-on board AUX Relay 1 NO (relay 1 DIP switch set to OFF-OFF-ON)
  • Close - Add-on board AUX Relay 2 NC (relay 2 DIP switch set to OFF-ON-OFF)
  • GND - Wired into add-on board Aux Relay 1 AND 2 commons (commons wired together - I have no idea if this is proper)

In case it helps, here is what I use for my CSL24UL

---

substitutions:
  id_prefix: driveway_gate
  devicename: drivewaygate
  upper_devicename: Driveway Gate
  close_duration: 34.1sec
  open_duration: 33.5sec
  optimistic_close_duration: 33.5sec
  optimistic_open_duration: 32.5sec
  max_duration: 35.0sec
  direction_change_wait_time: 1.0sec


esphome:
  name: ${devicename}


# Enable over-the-air updates.
ota:

  
esp32:
  board: esp32dev
  framework:
    type: esp-idf


# Example configuration entry for ESP32
i2c:
  sda: 4
  scl: 5
  scan: true
  id: bus_a

# Example configuration entry
ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO17_OUT
  phy_addr: 0

# Example configuration entry
pcf8574:
  - id: "pcf8574_hub_out_1" # for output channel 1-8
    address: 0x24

  - id: "pcf8574_hub_in_1" # for input channel 9-16
    address: 0x22

# Individual outputs
switch:
  - platform: gpio
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 0
      mode: OUTPUT
      inverted: true
    name: "${upper_devicename} Open"
    id: ${id_prefix}_open
    on_turn_on:
      - globals.set:
          id: ${id_prefix}_opening
          value: 'true'    
      - globals.set:
          id: ${id_prefix}_closing
          value: 'false'               
  - platform: gpio
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 1
      mode: OUTPUT
      inverted: true
    name: "${upper_devicename} Close"
    id: ${id_prefix}_close
    on_turn_on:
      - globals.set:
          id: ${id_prefix}_opening
          value: 'false'    
      - globals.set:
          id: ${id_prefix}_closing
          value: 'true'           

  - platform: gpio
    pin:
      pcf8574: pcf8574_hub_out_1
      number: 2
      mode: OUTPUT
      inverted: true
    name: "${upper_devicename} Stop"
    id: ${id_prefix}_stop
    on_turn_on:
      - globals.set:
          id: ${id_prefix}_opening
          value: 'false'    
      - globals.set:
          id: ${id_prefix}_closing
          value: 'false'           



binary_sensor:
  - platform: gpio
    id: ${id_prefix}_opened
    name: ${upper_devicename} Opened
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 0
      mode: INPUT
      inverted: true
    on_release:
        # When the gate power cycles the state will be wrong
        # for a ~ 1sec so we have a 1sec delay to allow for this    
      - delay: 1sec
      - if:
          condition:
            binary_sensor.is_on: ${id_prefix}_moving
          then:
            - globals.set:
                id: ${id_prefix}_closing
                value: 'true'   
            - delay: ${optimistic_close_duration}
            - globals.set:
                id: ${id_prefix}_closing
                value: 'false'  
  - platform: gpio
    id: ${id_prefix}_closed
    name: ${upper_devicename} Closed 
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 1
      mode: INPUT
      inverted: true
    on_release:
        # When the gate power cycles the state will be wrong
        # for a ~ 1sec so we have a 1sec delay to allow for this    
      - delay: 1sec
      - if:
          condition:
            binary_sensor.is_on: ${id_prefix}_moving
          then:
            - globals.set:
                id: ${id_prefix}_opening
                value: 'true'    
            - delay: ${optimistic_open_duration}
            - globals.set:
                id: ${id_prefix}_opening
                value: 'false'
  - platform: gpio
    id: ${id_prefix}_moving
    name: ${upper_devicename} Moving
    pin:
      pcf8574: pcf8574_hub_in_1
      number: 2
      mode: INPUT
      inverted: true
              
  - platform: template
    name: "${upper_devicename} Closing"
    id: ${id_prefix}_closing_sensor
    lambda: |-
      return id(${id_prefix}_moving) && id(${id_prefix}_closing) && !id(${id_prefix}_closed).state && !id(${id_prefix}_opened).state ? true : false;
  - platform: template
    name: "${upper_devicename} Opening"
    id: ${id_prefix}_opening_sensor
    lambda: |-
      return id(${id_prefix}_moving) && id(${id_prefix}_opening) && !id(${id_prefix}_opened).state && !id(${id_prefix}_closed).state ? true : false;



# Enable logging
logger:
 level: VERBOSE

# Enable Home Assistant API
api:

# Sync time with Home Assistant.
time:
  - platform: homeassistant
    id: homeassistant_time

# Text sensors with general information.
text_sensor:
  # Expose ESPHome version as sensor.
  - platform: version
    name: ${upper_devicename} ESPHome Version

# Sensors with general information.
sensor:
  # Uptime sensor.
  - platform: uptime
    name: ${upper_devicename} Uptime


globals:
  - id: ${id_prefix}_closing
    type: bool
    restore_value: false
    initial_value: "false"
  - id: ${id_prefix}_opening
    type: bool
    restore_value: false
    initial_value: "false"
    

cover:
  - platform: feedback
    name: ${upper_devicename}
    id: ${id_prefix}
    device_class: gate
    max_duration: ${max_duration}
    direction_change_wait_time: ${direction_change_wait_time}

    open_action:
      - switch.turn_off: ${id_prefix}_stop
      - switch.turn_on: ${id_prefix}_open
      - delay: 200ms #allow for switching time and any discharge
      - switch.turn_off: ${id_prefix}_open
    open_duration: ${open_duration}
    open_endstop: ${id_prefix}_opened
    open_sensor: ${id_prefix}_opening_sensor

    close_action:
      - switch.turn_off: ${id_prefix}_stop
      - switch.turn_on: ${id_prefix}_close
      - delay: 200ms #allow for switching time and any discharge
      - switch.turn_off: ${id_prefix}_close

    close_duration: ${close_duration}
    close_endstop: ${id_prefix}_closed
    close_sensor: ${id_prefix}_closing_sensor


    stop_action:
      - switch.turn_on: ${id_prefix}_stop
      - switch.turn_off: ${id_prefix}_close
      - switch.turn_off: ${id_prefix}_open
      - delay: 200ms #allow for switching time and any discharge
      - switch.turn_off: ${id_prefix}_stop

Note that I could have NO and NC switched on what I wrote as I was going from memory. I’m going to verify the NO and NC terminals, rewire SBC and Wht GND and test tomorrow. Was aiming on doing it today but came down sick.

The whole thing seems pretty sensitive to wiring. I was having major issues (i.e. nothing worked) with my first wiring job (using some random braided core 22awg wire off amazon) and finally got at least the open/close sensing working by cutting off the heads of some cat6a cable and using that instead. Wago lever nuts work well for splicing connections.

Ah, you are using the ESPHome firmware instead of MQTT? It seems that officially they say it doesn’t support dry contacts yet, but it can be used for it. I might try it again once I get MQTT fully working.

Alright, I had a bad wire for SBC and once I fixed that, everything works. I had NC and NO for the AUX relays switched around on what I wrote, but edited my initial message to correct that.

This is what works for my CS24UL:

  • Red Ctrl - “SBC+” pin on add-on board
  • Wht GND - “COM-”, under the SBC pin on the add-on board
  • Open - Add-on board AUX Relay 1 NC (relay 1 DIP switch set to OFF-OFF-ON)
  • Close - Add-on board AUX Relay 2 NO (relay 2 DIP switch set to OFF-ON-OFF)
  • GND - Wired into add-on board Aux Relay 1 AND 2 commons (commons wired together)
2 Likes

@Chmynard - Great to see you were able to get the ratgdo wired up to the LA400.
Thanks for sharing the connection points. Will try wiring up the ratgdo after Christmas.

I tried the wiring suggested. It doesn’t work with 412. What I plan to do is get a 5v relay that can be low triggered. Wire dc+ and - to 5v usb. Wire COM to dc+. Wire signal to yellow wire which goes to 0 when open and put relay on low setting (vs high). Then wire NO to open on RDO and NC to closes on RDO. When open, signal will be low which will switch relay and NO will be energized. Downside is closeness closed it is just not fully open. I may wire 2 relays together so the relays for open and close operate independently

I think this will work and is a $6 part vs buying the expansion board.

@fyton2v do you get the “Opening” and “Closing” status with this config?

I have the LA400 and also have the Liftmaster K1D8080-1CC Add-on board, and my Ratgdoo should arrive soon

There is a lot of discussion, but I’m just trying to figure out the best way to wire it all up with the add-on board

Because of the way the relay fires, the RatGDO only updates when the gate is fully open or fully closed. Nothing in the middle. I’m hopeful we can figure that out … someday.

It seems to me that opening and closing are a function of what state it thought it was in and whether either the open or closed port on the ratgo is triggered. So when it opens from close, both inputs shoudl not be triggered and when it gets to open, then open is triggered. I have got it working with the addition of a relay and 1 magnetic switch. I ordered the expansion board as then I don’t need the magnetic switch but the issue is there is no reliable way to get the closed state, it is essentially (NOT OPEN - yellow at > 0 volts) as soon as it starts to close. For a while the voltage is like 5v then 3v but then drops down to 1.xx volt and it doesn’t register with my 5v relay. Maybe I could find a relay that clamps at a lower voltage and remove the magetic switch. In the configuration I have below I get Open, Opening, Closing and Closed.