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.
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:
2. Install ESPhome
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.
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.
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
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:
esphome:
name: open-duco
platform: ESP32
board: esp32dev
# Enable logging
logger:
# Enable Home Assistant API
api:
ota:
password: "9f2ab9aa715f573e2476e75a5ec7f4e7"
wifi:
ssid: "test1234"
password: "test1234"
# Enable fallback hotspot (captive portal) in case wifi connection fails
ap:
ssid: "Open-Duco Fallback Hotspot"
password: "ChangeMe@123!"
captive_portal:
#
uart:
#UART For Sensor 1
- rx_pin: GPIO13
tx_pin: GPIO12
baud_rate: 9600
id: uart_sensor_1
#UART For Sensor 2
- rx_pin: GPIO25
tx_pin: GPIO26
baud_rate: 9600
id: uart_sensor_2
i2c:
#I2C For Sensor 1
- id: i2c_sensor_1
sda: GPIO19
scl: GPIO18
scan: false
frequency: 400kHz
#I2C For Sensor 2
- id: i2c_sensor_2
sda: GPIO16
scl: GPIO4
scan: false
frequency: 400kHz
# Status led
status_led:
pin:
number: GPIO33
#PWM output for controlling the motor.
output:
- platform: ledc
pin: GPIO15
inverted: true
id: open_duco
fan:
- platform: speed
output: open_duco
name: "Open Duco"
sensor:
# Pulse counter sensor to measure motor RPM
- platform: pulse_counter
pin: GPIO14
unit_of_measurement: 'RPM'
name: 'Duco 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 😀