cf9716264f
Co-authored-by: Chris Nussbaum <chris.nussbaum@protolabs.com> |
||
---|---|---|
components | ||
custom | ||
devices | ||
images/scripture_of_the_day | ||
other | ||
packages | ||
.gitignore | ||
LICENSE | ||
README.md |
ESPHome-Devices
Overview
This is a collection of ESPHome custom components, configuration files, and custom code for my various ESP8266/ESP32 devices that integrate with Home Assistant. I am using includes and packages pretty extensively in order to prevent duplication and allow for easy changing of common settings.
What is ESPHome
ESPHome is a system to control your ESP8266/ESP32 by simple yet powerful configuration files and control them remotely through Home Automation systems. For more information checkout ESPHome.io.
What is Home Assistant
Home Assistant is open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. For more information check out Home-Assistant.io.
Custom Components
I have been working on updating most of my custom code into components that can esily be pulled directly from GitHub into your device configuration using the external components component. I have run into frequent issues with changes in ESPHome breaking my components so I am now tagging my repo with the version of ESPHome it is compatible with. I generally upgrade pretty quickly so as soon as I have confirmed things are working and/or made the neccessary changes I will add a tag for the new version of ESPHome.
Binary Light With Power
This an enhanced version of the standard binary light component that adds an option to include a sensor to report current power usage based on a configured wattage of the light(s) it controls. More details on how to use this component are available here.
GPIO Light With Power
This an enhanced version of the standard gpio switch component that adds an option to include a sensor to report current power usage based on a configured wattage of the device(s) it controls. More details on how to use this component are available here.
Tuya
This is a copy of the standard Tuya component with a couple of fixes/tweaks that are still getting hashed out in the main branch of ESPHome that are needed to get my custom Tuya Light Plus component to work reliably. Hopefully I can remove this component soon.
Tuya Dimmer as Fan
This a modified version of the Tuya fan component I use with Feit Dimmers (but it will likely work with other Tuya dimmers) to control bathroom fans and adds several features. I created this component because I couldn't find a regular on/off switch with the same look and feel as the Feit dimmers so I decided to use the Feit dimmers but use this component to prevent "dimming" the fan. More details on features and how to use this component are available here.
Tuya Light Plus
This an enhanced version of the standard Tuya light component that adds a bunch of extra features. I use this component with Feit Dimmers but it will likely work with other Tuya dimmers. More details on features and how to use this component are available here.
ESPSense
This excellent component is not mine and doesn't live in this repository but most of my devices are using it so I felt it was worthy of a mention here. More details are available here.
Misc Devices
Basement Bathroom Sensor
This is a WEMOS D1 Mini clone that is connected to a motion sensor, a temperature/humidity/pressure sensor, and a door sensor and is used to control the lights, fan, and heater (heat lamps in the fan) in my basement bathroom.
Coffee Maker
This is a NodeMCU that I installed in my Cuisinart Coffee Maker. It has GPIO's connected to the indicator lights for the bold setting and power and has a couple of relays connected to the bold setting button and the power button. Aside from the ability to trigger automations based on the state of the coffee maker and automate turning on the coffee maker I also added a "bloom" feature. Coffee tastes better if you let the carbon dioxide escape (bloom) after getting the coffee grounds wet before continuing the brew cycle.
Fire Pit and Fountain
This is a WEMOS D1 Mini Pro that is connected to a couple of relays and a couple of water proof push buttons red and blue. The multi-click config on the fire pit switch is so that any press will turn it off but to turn it on you have to press it for 3 seconds (to try and prevent kids from turning it on). This is used to control the combination fire pit and fountain in my backyard. I just got this hooked up and is working good other then the fire pit doesn't always come on on the first try (I think I am getting some bounce in the switch but haven't had a chance to troubleshoot further).
Garage Fridge
This is a NodeMCU that I have installed in the back of my garage fridge and is connected to several temperature sensors that monitor the temperature of the compressor, the fridge, and the freezer and a pair of relays that control a heat tape wrapped around the compressor and a couple of heaters that are inside the fridge. This is to prevent the compressor from getting to cold (when it is cold the oil thickens up which is hard on the compressor), the fridge from dropping below freezing (frozen beer is no fun), and the freezer from getting to warm (when temperatures in the garage are around the desired fridge temperature the freezer tends to get to warm because of lack of cooling demand from the fridge so we warm the fridge up a little to get it to kick in the compressor).
Master Bed
This is a NodeMCU that I have installed under my bed and is connected to a pair of Force Sensitive Resistors that are placed between the mattress and box spring of my bed, one for my side and one for my wife's side. Because the ESP8266 has only one analog input I had to add some transistors connected to pins D0 and D1 that are used to select which FSR is connected to the A0 analog input. The custom sensors in bed_sensor.h handles switching between the FSR's and reading the values from the FSR's. Generally when the bed is empty the reading is the full 1024 (or at least close to this). If someone is on one side of the bed or the other the reading is typically around 100. However if you lay in the middle of the bed I tend to get readings of around 600-700 on both sides. Thus the 3 different binary sensors (Chris is in Bed, Melissa is in Bed, Someone is in Bed). There is also a Master Bed Count that reports the total number of people in bed, I compare this to a sensor in Home Assistant that tracks the number of "masters" (my wife and me) that are home so that I can activate night mode when everyone is in bed.
Patio Lights
This is a WEMOS D1 Mini Pro that is connected to a relay to control the power to the landscape lights around my patio. I used the WEMOS D1 Mini Pro because it has an external antenna. I initially used a WEMOS D1 Mini clone but the power supply for my lights was to far from the house and I kept having connectivity issues.
Pool Pumps
This is a Shelly 2.5 Double Relay Switch that is controlling the main pump on my pool and the auxillary pump that runs the pool cleaner. It turns the pump on and off through out the day and off at night (when we are least likely to be using the pool and when you get the most heat/water loss if the pump is running) and turns on the cleaner for a couple of hours in the morning. It also has some modes for Off (during the winter) and Continous when I need extra cleaning.
Scripture of the Day Melissa/Scripture of the Day Mayson
This project was one of the first projects I have done that I would call woodworking. I made 2 of these as Christmas presents for my wife and son. They consist of an ESP32 e-Paper Panel Driver Board powered by a lithium battery and TP4056 lithium battery charger module and driving a Waveshare 7.5inch 800×480 E-Ink display. The ESP32 sits in deep-sleep most of the time but wakes up every night, grabs a random scripture from the Our Manna Daily Verses API, updates the display with the verse, and goes back to sleep.
Switches
I plan to use dimmer switches for anything that is dimmable just for consistency and you never know when you might want to have the ability to dim a light. However there are times when a dimmer isn't an option.
SANA Dual Switch
My basement bathroom has 4 devices (main light, fan, shower light, and heat lamps) but only 2 single gang boxes (and not enough room to swith to dual gang) so these were a perfect fit. The price is right, the buttons feel solid, and I was able to flash them using Tuya-Convert. They do seem to have corners that are squarer then typical so I had a little bit of trouble getting a standard cover to fit but nothing I couldn't fix with a file.
SANA Triple Switch
This is installed in place of the switch that controled my TREO LED Pool Lights. These lights have the option to select different colors by briefly turning them off and back on again and they do remember the last color when turned on again. The custom TreoLedPoolLight.h component handles tracking the current color and exposes custom "effects" for each of the colors to Home Assistant. I went with the triple switch so that I could use the third button to control my Patio Lights which otherwise do not have a physical switch. The one issue I am having with this is occasionally the "effect" on the switch gets out of sync with the actual color of the lights. It has only happened a couple of times so I haven't gotten around to investigating why it happens.
Dimmer Switches
Feit Dimmers
After trying several dimmers I finally decided to standardize on the Feit dimmers.
Things I like about these dimmers:
Can be flashed using Tuya-ConvertUnfortunately Feit has started shipping these with updated firmware that does not currently work with Tuya Convert. Hopefully the excellent Tuya Convert team can figure out how to work around the new firmware. Until then I did find this tutorial on flashing these devices (I have not tried this yet).- Have a solid feel to them
- They can be linked via a traveler wire (this works even when flashed with ESPHome and while not mentioned in the documentation you can link more than 2 switches this way)
- Are readily available from Amazon or Costco for an affordable price.
Things I don't like about these dimmers:
- Have to click repeatedly to change the brightness (can't hold to change)
- All buttons are managed by the Tuya MCU so adding things like double-taps is kind of a hack
All of my dimmers are using my custom Tuya Light Plus component.
- Basement Stair Lights/Basement Stair Lights 2
- Computer Light
- Dining Room Light
- Family Room Light
- Front Entry Lights/Front Entry Lights 2
- Front Lights
- Kitchen Bar Lights
- Kitchen Table Light
- Living Room Lights
- Master Bathroom Lights/Master Bathroom Lights 2
- Office Light
Dimmer Switches as On/Off Fan Switches
Feit Dimmers
I tried to find an on/off switch that looked/felt like the Feit dimmers to use for controlling bathroom fans but didn't find anything so I decided to use the Feit dimmers. I don't want the fans "dimmable" so I created a custom Tuya Dimmer as Fan component that changes the "brightness" back to the maximum value if changed at the switch.