Skip to content

Latest commit

 

History

History
93 lines (59 loc) · 4.07 KB

Programming_Guide.md

File metadata and controls

93 lines (59 loc) · 4.07 KB

Programming Guide for Open AIR Devices

This guide provides detailed instructions for programming Open AIR Devices. There are three primary methods:

  1. UART Programming.
  2. OTA (Over-The-Air) from ESPHome.
  3. OTA from a Web Browser.

Warning: Incorrect configurations can disable options 2 and 3. Exercise caution when applying custom YAML configurations.

Option 1: UART Programming

To begin programming with UART, ESPHome needs to be installed on your computer or within Home Assistant (HA).

Step 1: Install Python

  • Download Python for Windows: Visit the Windows Python Download Page.

  • Installation: Choose the latest Windows installer version (e.g., 3.9.9 64-bit). Ensure to select 'Add Python to PATH' during installation for easier command execution.

    Python Installer

    After installation, you should see a screen confirming the successful installation.

    Installation Success

Step 2: Install ESPHome

  • Open Command Prompt: Search for 'CMD' in the start menu, then press Enter or click the Command Prompt app.

  • Install Command: In the Command Prompt, type pip3 install esphome and press Enter. Wait for the installation process to complete.

    ESPhome Installation

Step 3: Connect Your Open AIR Device

To connect your Open AIR Device, you have two options:

  • Use an Open AIR Programmer.
  • Use a 3.3V compatible USB-UART bridge.

Refer to the pinout diagram here: Pinout Diagram

All Open AIR Devices use the same pinout on the UART Debug Port.

Step 4: Upload

  1. Uploading Firmware:

    • Open the Command Prompt.
    • Type the command esphome run YOURCONFIG.yaml (replace YOURCONFIG.yaml with your configuration file name).
    • Press Enter to start the process.

    Note: The compilation might take some time.

  2. Selecting Upload Option:

    • After compilation, choose the appropriate upload option as shown below:

      Upload Option

    • Press the number corresponding to the correct COM port option, followed by Enter.

  3. Important Steps During Upload:

    • When the message "connecting" appears, press the program button on the Open AIR Device.
    • While holding the program button, press the Reset button once.

    Following these steps will initiate the uploading process.

Option 2: OTA (Over-The-Air) from ESPHome

Follow the Option 1 Esphome installation tutorial.

  1. Uploading Firmware:
    • Open the Command Prompt.
    • Type the command esphome upload YOURCONFIG.yaml --device IP_OF_YOUR_DEVICE
      • Replace YOURCONFIG.yaml with your configuration file name.
      • Replace IP_OF_YOUR_DEVICE with your Open AIR device IP address.
      • Sometimes it will ask for an OTA password. By default, this is: 9f2ab9aa715f573e2476e75a5ec7f4e7.
    • Press Enter to start the process.

Option 3: OTA (Over-The-Air) from the browser

Follow the Option 1 Esphome installation tutorial.

  1. Uploading Firmware:
    • Open your browser.
    • Navigate to the IP of your Open AIR Device, for example: 192.168.1.217.
    • On the bottom of the page page is an OTA upload button. Press it.
    • You need to navigate to a binary generated by ESPHome. The easiest way to find it:
      • Open the Command Prompt.
      • Type the command esphome run YOURCONFIG.yaml (replace YOURCONFIG.yaml with your configuration file name).
      • Press Enter to start the process.
      • When this process is finished, it will ask you how to upload the compiled binary. However, just above the successfully compiled program line is your BIN file location.
    • Go back to your browser and navigate to the file path given by ESPHome. Select the correct binary and press upload.