Never forget to turn your clothes iron off again! Plug your clothes iron into a WiFi power switch which you've previously integrated into Home Assistant (HA). A rotary encoder allows you to input countdown time in minutes and seconds. Press the encoder button down, and the timer starts counting down. When it reaches zero, it instructs HA to switch off the iron. A 14-segment alphanumeric LED display shows the selected and remaining time.
Choice of "Non Powered" (3 examples below) or "Powered" (2 examples below)
- Non powered, needs external pullup resistors: Jaycar SR1230
- Non powered, needs external pullup resistors: Sparkfun 9117
- Non powered, needs external pullup resistors: Adafruit 377
- Powered, do not fit external pullup resistors: PiHut
- Powered, do not fit external pullup resistors: Waveshare
Note 1: The rotary encoder I used from Jaycar produces 15 pulses per revolution. It needs two external pullup resistors (2x 47k Ohm) because the ESPHome rotary encoder platform is coded for the type of encoders that are powered (i.e you provide power and ground to them), so it does not enable the ESP internal pullup resistors. If you buy an encoder that is powered, do NOT fit the external pullup resistors. You may need to modify the code if the number of pulses per revolution is different to Jaycar item I used.
Note 2: Having said all that, the push button built into the encoder (activates when you push down on the shaft) does NOT need an external pullup resistor as you just configure it as a normal GPIO binary sensor in ESPHome with pullup enabled (see purple wire which goes to GPIO0).
I2C 0.54" Quad Alphanumeric Display - Adafruit, or Chinese knockoff
ESP32 development board (many options) - I used the Espressif ESP32 DevKitC V4. From Amazon, Banggood, Mouser and many more suppliers.
- Use a rotary encoder to select number of minutes on LED display. Starts at 5:00 (m:ss). Adjusts in 15s increments. Max 7:00.
- Press button on rotary encoder to start countdown timer.
- When countdown finishes, HA switches the iron off.
- LED display turns off and enters idle state.
- Adjust LED display brightness at any time by press and hold encoder button for > 0.6 seconds < 2.0 seconds, then select beteween 0.1 and 1.0
- To finish countdown early, double click encoder button. Switch turns off immeditely.
- To add or remove time during countdown, simply twist the encoder in steps of 15s.
- When device is idle, user can tap rotary encoder switch to wake up device, which resets to 5:00 minutes.
- Display turns off (enters idle mode) if user does not perform an action wihtin 30 seconds.
- Copy the config file
iron timer Mk2.yaml
into/hassio/config/esphome/
- Copy the include file
iron timer Mk2.h
into/hassio/config/esphome/custom_components
As at time of writing (April-2020), the HT16K33 4 character 14-segment alphanumeric LED display is a custom component (i.e. not relased into ESPHome), so it must be cloned into the custom components folder. To get a copy of the custom component, go to:
HT16K33 custom component by Samuel Sieb
- Copy or clone the whole
lcd_ht16k33
folder into a subfolder under.../custom_components
as mentioned in step 2 above.
Your ESPHome folder structure should look like this
Once you've built your ESP32 and other hardware, go to your ESPHome dashboard and compile and upload the project!