Skip to content

Latest commit

 

History

History
141 lines (99 loc) · 7.24 KB

getting_started_esphome.md

File metadata and controls

141 lines (99 loc) · 7.24 KB

Getting Started with the ESPHome Firmware

Our boards from tynet.eu ship with the normal Arduino-based firmware that is simple to use out of the box. Sadly, this firmware, which was developed a few years ago, has some minor inconveniences that are not simple to fix. If you are one of the few people that have an issue with the firmware or just want to use ESPHome instead, you can follow this guide.

ESPHome uses a native Home Assistant API instead of MQTT and is simple to set up. We also provide configuration files as well as ready to flash .bin files for our boards.

Advantages over the Arduino-based firmware

  • More stable, especially with weak Wi-Fi signals
  • External sensors are simpler to add
  • More secure due to password protection and optionally an encrypted protocol
  • Does NOT require MQTT, as it uses Home Assistant APIs directly
  • Binary sensor for the option Relay of the UAP HCP
  • The light is implemented as light instead of a switch
  • A button for the impulse function
  • Half and vent position are available as button or switch depending on your preference
  • The vent position is not determined by a hardcoded 4% value, but by the status sent by the motor

Set up ESPHome in Home Assistant

You can follow the official guide to install the ESPHome add-on for Home Assistant.

The main steps are:

  1. Open your Home Assistant UI
  2. Go to Settings -> Add-Ons -> Add-on Store and search for ESPHome
  3. Install and activate the ESPHome Device Builder add-on

Upgrade from the Arduino-based firmware

Our boards all ship with an Arduino-based based firmware, which can be easily upgraded.

  1. Download the ESPHome-based firmware file: hcpbridge.ota.bin
  2. Connect the board to power via the USB-C connector and wait a few seconds. The 3V3 LED will be lit.
  3. With a phone or a PC, search and connect to the Wi-Fi network called "HCPBRIDGE" created by the PCB.
  4. Open the OTA Web UI: http://192.168.4.1/update
  5. If asked, use the following credentials to login: user: admin and pass: admin
  6. Click "Select File", navigate to the downloaded hcpbridge.ota.bin file
    ElegantOTA upload page
  7. Wait for the upload to complete
    ElegantOTA progress page
    ElegantOTA success page

Board setup

Using USB (recommended)

  1. Ensure your board is connected to your PC over USB-C

  2. Open web.ESPHome.io, click connect and select the ESP32-S3 device from the list
    NOTE: On Linux, you may have to add yourself to the dialout user group (i.e. run sudo usermod -a -G dialout $USER)
    ESPHome connect page
    ESPHome connect request

  3. Click the kebab menu (⋮) and select Configure Wi-Fi, select or enter your Wi-Fi name and password image

  4. After entering your Wi-Fi credentials, click connect
    image

  5. Upon success, you should see the "Provisioned!" message
    ESPHome connect success

Using Wi-Fi

  1. Ensure your board is powered over USB-C
  2. Search and connect to the Wi-Fi called hcpbridge
  3. Open http://192.168.4.1 when connected, login is user: admin and pass: tynet.eu
  4. Connect to your Wi-Fi network over the Web UI
  5. Your board should now be connected to your home network over Wi-Fi.

Add to Home Assistant

Open Home Assistant, go to Devices, here the garage door should be visible under discovered devices, just click "add".

image

Note

You can now use the PCB as is and don't need to do the following optional steps.

Optional

Change pre-flashed config

  1. Open Home Assistant and go to the ESPHome UI under Add-Ons

  2. You should see the discovered device, click "take control". If you like, change the name image

  3. It will ask to update the device with encryption, click "install". It will take a while to build the new firmware image

  4. When it finished uploading you will see the following log output, if this is the case you can press close and you are done image

In some cases you might have to configure your Wi-Fi credentials again.

Set up ESPHome in Home Assistant from scratch

  1. Ensure your board is connected to your PC over USB-C
  2. Open ESPHome in Home Assistant
  3. Click "New Device" and enter a name
image
  1. Click "ESP32-S3"
image
  1. Copy and save the displayed encryption key and click "skip"
image
  1. Click on the secrets button on the top right, create the following keys and enter your Wi-Fi credentials as well as the secret api key you just copied, hit save

    wifi_ssid: "myWifi"
    wifi_password: "myWifiPassword"
    api_key: "myApiSecretWeCopiedAfewMinutesAgo"
    web_username: "admin"
    web_password: "tynet.eu"
    hcp_wifi_ap_password: "tynet.eu"
    
  2. Click "edit" on the device card

image
  1. Copy and paste the content of the ESPHome.yaml file from this repo into the editor, click "save"
image
  1. Click "install", then select "Manual download", wait for the firmware to be built, select factory format to get the .bin file
image image
  1. Then go to web.ESPHome.io, click connect and select your ESP from the device list, click "install", select the .bin file you just downloaded and click "install". If it doesn't work, try it multiple times
image
  1. Go back to Home Assistant, open Settings -> Devices -> ESPHome. Here, you should be able to add the device, but if not, try to power cycle the board
image

Click "done" and you can now use the device image