Hörmann garage door via MQTT

You can use the yaml from here adjust line 29, 35 and 36 based on your setup.
I think you have an esp32dev board and rx tx pin depends your wiring. If it doesn’t work please open an issue on GitHub.

1 Like

I ordered Tysonpower’s board and followed the setup and now i can open close the door from the webui. mqtt is connected to my HA’s mqtt, but - since I never used esphome - i can’t see any device inside HA. If I read it properly I should add this to my configuration.yaml. Is this correct or this is for the esphome based fw? I’m using the original firmware.

Tyson has done an instruction to move from the Legacy firmware to esphome. To see your device you can also use the mqtt HA integration. If you need some further assistance please open an issue on tysons repo it easier to solve it there.

Or if you still need help just send me an email to [email protected] :slight_smile:

For the ESPHome version

More stable, especially with weak Wi-Fi signals

I’m curious, why would that be the case?

Maybe referring to an early phase of the mqtt project when as soon the board loose wifi it rebooted what caused an error code on the motor. I solved it with a better handling of the mqtt disconnect using interlocking timer waiting till wifi is connected again before trying the reconnect to mqtt. In Esphome the reconnection is handled by the framework probably implemented in a much better way.

2 Likes

Migrated to your ESPHome version, thanks! You might want to set the name: None for the cover though, so it follows the device name.
Additionally anyone who wants to keep a webpage (e.g. to control the garage door when HA is offline) you can add a web_server: to the configuration.

I like the formfactor of these Waveshare modules https://www.waveshare.com/wiki/RS485_TO_POE_ETH_(B)
Is it possible to use these in esphome/homeassistant?

I don’t think so.
If you’re looking for form factor this should work.

I want an ethernet connection. I have everything working with your esphome code with a wt32-eth01 board. But everything is solder wired together now. I want a neath solution. I guess I have to design my own pcb. And print a housing

You want maybe checkout this discussion. Lilygo has the t-poe pro with everything on board. I have one on my desk write me a dm or on the GitHub issue if you are interested.

Received yesterday my Supramatic E3 adapter. Works great. Good job Tyson. Thx a lot

1 Like

Happy to hear that! If you got an account in the shop feel free to leave a review :slight_smile:

Hi @Ace132. I also want to use the wt32-eth01 board (v1.4) but I am unable to get the UART2 pin to make the led blink and start/test communication. Would you be so kind to share your esphome code? Im struggeling with the txrx pins i think. I already got the webserver running and connected to home assistant using @Tysonpower documentation (thank you!).

On a side question. I have an old phone cable plug RJ12 but only the 4 middle wires are present. Would that also work (as the 2 outer wires 1 and 6 a double ground and 24v)

Thank you and hoping for an answer.

I tried this board one time with the yaml below. rx and tx pin depends on your connections.

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"
  platform: ESP32
  board: wt32-eth01
  libraries:
    - emelianov/modbus-esp8266 # Required for communication with the modbus
  platformio_options:
    board_build.f_cpu: 240000000L

external_components:
    source: github://14yannick/esphome-hcpbridge
    refresh: 0s # Ensure you always get the latest version

ethernet:
 type: LAN8720
 mdc_pin: GPIO23
 mdio_pin: GPIO18
 clk_mode: GPIO0_IN
 phy_addr: 1
 power_pin: GPIO16

hcpbridge:
  id: hcpbridge_id
  rx_pin: 5 # optional, default=18
  tx_pin: 17 # optional, default=17

Regarding using only four wire maybe an electrician can calculate if the remaining cross cut of your wire is enough to handle the power draw of your installation. I would say yes as on the E3 model there is only one wire for power and ground.

Hi @14yannick,
Thanks for the quick reply and info/code.
I tried it but with no luck. It does compile and the webserver is running. But no blinking TxRx leds. Should the leds blink when communicating with TxRx? I expect that but just to confirm.

For my board it also mentions pin 5 and 17. So I have no clue what I could be doing wrong.
Could I also delare other pins to use as TxRx? Like a virtual Uart.
Am I missing something obvious?
Hope someone can point me in the right direction.

This is my current code:

ethernet:
  type: LAN8720
  mdc_pin: GPIO23
  mdio_pin: GPIO18
  clk_mode: GPIO0_IN
  phy_addr: 1
  power_pin: GPIO16



# Enable Home Assistant API
api:
  encryption:
    key: "Something special"
  services:
    - service: go_to_open
      then:
        - lambda: |-
            id(garagedoor_cover).on_go_to_open();
    - service: go_to_close
      then:
        - lambda: |-
            id(garagedoor_cover).on_go_to_close();
    - service: go_to_half
      then:
        - lambda: |-
            id(garagedoor_cover).on_go_to_half();
    - service: go_to_vent
      then:
        - lambda: |-
            id(garagedoor_cover).on_go_to_vent();
    - service: toggle
      then:
        - cover.toggle: garagedoor_cover


ota:
  - platform: esphome
    password: "another password"

#wifi:
#  ssid: !secret wifi_ssid
#  password: !secret wifi_password

  # Enable fallback hotspot (captive portal) in case wifi connection fails
#  ap:
#    ssid: "Garage-Door-Left"
#    password: "password hiding"

#captive_portal:

# Variables to change the name of the entities
substitutions:
  name: "hcpbridge-garage-door-left"
  friendly_name: "Garage Door Left"
  connection_state: "${name} Connected"
  relay_name: "${friendly_name} Relay state"
  light: "${friendly_name} Light"
  btn_vent: "${friendly_name} Vent" 
  btn_half: "${friendly_name} Half" 
  btn_impulse: "${friendly_name} Impulse" 
  sen_txt: "${friendly_name} State" 
  sw_vent: "${friendly_name} Venting" 
  sw_half: "${friendly_name} Open Half" 

esphome:
  name: "${name}"
  friendly_name: "${friendly_name}"
  project:
    name: "tynet.hcpbridge_e4"
    version: "1.0.0"
  libraries:
    - emelianov/modbus-esp8266
  platformio_options:
    board_build.f_cpu: 240000000L
    board_build.flash_mode: qio
    monitor_speed: 9600
    monitor_filters: esp32_exception_decoder
    lib_ldf_mode: deep+
    # board_build.f_flash: 40000000L

external_components:
    source: github://Tysonpower/esphome-hcpbridge
    refresh: 0s

#esp8266:
#  board: esp01_1m

esp32:
  board: wt32-eth01
  framework:
    type: arduino

#esp32:
#  board: adafruit_feather_esp32s3
#  framework:
#    type: arduino

dashboard_import:
  package_import_url: github://Tysonpower/HCPBridgeMqtt_tynet/esphome.yaml@main


web_server:
  port: 80
  version: 3
  auth:
    username: !secret esphome_web_username
    password: !secret esphome_web_password

# Enable logging
logger:
  level: DEBUG
  baud_rate: 9600
 



i2c:
  sda: 33 #GPIO04
  scl: 32 #GPIO05
  scan: false



hcpbridge:
  id: hcpbridge_id
  rx_pin: 5 # optional, default=18
  tx_pin: 17 # optional, default=17 
# rts_pin : 1 # optional RTS pin to use if hardware automatic control flow is not available.

cover:
  - platform: hcpbridge
    name: ${friendly_name}
    device_class: garage
    id: garagedoor_cover

binary_sensor:
  - platform: hcpbridge
    is_connected:
      name: "${connection_state}"
      id: sensor_connected
    relay_state:
      name: "${relay_name}"
      id: sensor_relay
      #on_state:
      #create your automation based on Garage Door Relay state

output:
  - platform: hcpbridge
    id: output_light

light:
  - platform: hcpbridge
    id: gd_light
    output: output_light
    name: ${light}

button:
  - platform: hcpbridge
    vent_button:
      id: button_vent
      name: "${btn_vent}"
    impulse_button:
      id: button_impulse
      name: "${btn_impulse}"
    half_button:
      id: button_half
      name: "${btn_half}"

text_sensor:
  - platform: hcpbridge
    id: sensor_templ_state
    name: "${sen_txt}"
#    filters:
#      - substitute:
#        - "Opening -> your text"
#        - "Move venting -> your text"
#        - "Move half -> your text"
#        - "Closing -> your text"
#        - "Open -> your text"
#        - "Closed -> your text"
#        - "Stopped -> your text"
#        - "Half open -> your text"
#        - "Venting -> your text"
#        - "Unknown -> your text"

switch:
  - platform: hcpbridge
    vent_switch:
      id: switch_vent
      name: "${sw_vent}"
      restore_mode: disabled
    half_switch:
      id: half_switch
      name: "${sw_half}"
      restore_mode: disabled

#sensor:
#  - platform: bme280_i2c
#    temperature:
#      name: "BME280 Temperature"
#    pressure:
#      name: "BME280 Pressure"
#    humidity:
#      name: "BME280 Humidity"
#    address: 0x76 # can be 0x77 as well
#    update_interval: 30s
  #- platform: dht
  #  pin: GPIO04
  #  temperature:
  #    name: "DHT Temperature"
  #  humidity:
  #    name: "DHT Humidity"
  #  update_interval: 30s

I don’t know if it should blink as i dont know the board you have. From the web interface can you open your garage door. If yes communication is working :grinning:.
Else open an issue on my GitHub with a picture of your installation so I can have a look.

Hi, I can try again with my RS485 converter/resistor and Rj21plug installed to control the garage door. But the leds on the RS485 converter board are also not blinking. So it seems like it compiles correctly but I don’t know which physical and software pin to connect TxRX to. A bit confusing.

This is the board i have. https://www.tinytronics.nl/product_files/003612_WT32-ETH01_manual%20(1).pdf
on page 11 bullet 4.2 it mention the leds.

I made a dumb mistake and forgot to do the bus scan on the hormann door. Now I see leds blinking for the commuication and it all works. Sorry for wasting time and hopefully nobody makes the same mistake again.

Hi.
I have this board.
Assembled by @realdimik and flashed using @stephan19 original repo.

This has worked flawlessly.
But the other day, I was setting a new Home Assistant server for someone, and was stupid enough to put it on the same network.
When I did that the garage port opener (among other things) were detected by that HA instance.
I deleted it from there, and moved the HA instance from that network.

But now I cannot reach the garageport-board anymore.
I can see it on the network, and ping it, but the mqtt explorer shows that there are no signs of it.

Is there a way to fix this, other than re-flash it?
A web server? something?

thanks