How to Install ESPhome and use Open Duco (mini/Pro)

1. Download and install python

Download link: https://www.python.org/downloads/windows/
Now Download the latest version Windows installer (I used 3.9.9 64-bit.

Image of installation

Click the Add Python xx to PATH.. this will save you time when you need to execute a python command.
then press install now. (wait until the installer is finished)

Then click:

Path length limit.

2. Install ESPhome

Start menu with command prompt

Open the start menu and type CMD. Then press Enter or click the command prompt app.

then paste this into the command prompt:

pip3 install esphome

Press Enter and the installer will start.

ESPhome finished setup.

3. Start an Open Duco project

In the same command window type:

esphome wizard open_duco_mini.yaml 

This will show you the wizard of ESPhome 😉 It will ask you to select a name, type:

open_duco_mini 

Press Enter. 
ESPhome configuration

Now Type:

ESP32

Press enter

Then type:

esp32dev

Press Enter

Now it will ask you for your wifi SSID. Type your WI-FI SSD. Afther that it will ask for you WI-FI password. Enter your password. if it asks for an OTA password just press enter

ESPhome Wifi Settings.

If this is done it will create a file called open_duco_mini.yaml

Open that file with a text editor. You can find the file here : C:\Users\(your username)

Below Captive_protal paste the following code:

uart:
  rx_pin: GPIO25
  tx_pin: GPIO26
  baud_rate: 9600

i2c:
- id: bus_a
  sda: GPIO19
  scl: GPIO18
  scan: false
  frequency: 400kHz
- id: bus_b
  sda: GPIO16
  scl: GPIO4
  scan: false
  frequency: 400kHz

output:
  - platform: ledc
    pin: GPIO15
    id: open_duco_mini_fan
    
    
fan:
  - platform: speed
    output: open_duco_mini_fan
    name: "Open Duco Mini speed"
    
sensor:
  - platform: pulse_counter
    pin: GPIO14
    unit_of_measurement: 'RPM'
    name: 'Open Duco mini RPM'

Now press CTRL+S (or save the file) and close the document.

4. Upload your Open Duco Project

Make sure you install CP2102 Windows 10 driver (https://www.silabs.com/documents/public/software/CP210x_Windows_Drivers.zip). (if you use my programmer)

in the command line type:

esphome run open_duco_mini.yaml

Press Enter

This will take a couple of minutes. Make some coffee or drink some tea 🙂

(when it seem stuck, press enter, somehow it started working after I pressed it a couple of times)

(if you have the programmer connected and the drivers installed)

Now it should show:

Then Press the number where the CP210X corresponds to (in my case 1) Then press enter again.

When it says connecting press the program button on the Open Duco Mini. While pressing the program button press Reset once (while holding the program button)

It should start updating 🙂

(when its done uploading the software, press reset once)

Now open Home Assistant and you will see that home assistant found a new device 😀

Season 7 Reaction GIF by The Office

Leave a comment

Your email address will not be published. Required fields are marked *