Giter Club home page Giter Club logo

airwick-esphome's Introduction

Airwick ESPHome Smart Air Refresher

Turning dumb Airwick air refresher to a smart one using ESPHome

Parts needed:

  • Air Wick Fresh battery powered freshener
  • Wemos D1 Mini board (ESP8266) - Could also work with any ESP chipset that is supported by ESPHome
  • 5V relay - Got them on Amazon (5 pack) - https://www.amazon.de/dp/B07BVXT1ZK
  • Wires - I used DuPont wires that I cut if needed
  • USB cable to power ESP and DC motor - Can be connected to USB port on ESP board or on 5V + GND pin

Instructions:

This was not my first attempt. Over one year my Airwick refresher was already smart. But it was painful solution using the integrated board on which I connected with ESP board and then simulate the signal to issue the motor rotation. ESP board was flashed with Tasmota which with some update in between broke something and it was no longer working. Wife was keep asking me when I will fix it so to keep WAF high I went back to drawing board.

Saw some projects like Smart Air Freshener that uses DC motor directly with the ESP board and decided to try it myself. My goal was to power it with USB cable like I had before and not to constantly replace batteries. So it was a tiny mod. Reflashed the ESP board and put the relay in between. Everything worked at first attempt.

ESPHome is fully supported in Home Assistant so the entities were created automatically. I will use only one and that is the button which using ESPHome template turns the relay on for 0.5 seconds before turning it back off. At end I needed to create better automations. Before it would spray when movement was detected and if it took more then 30 minutes from last spray. It was still too frequent. What I want now is to spray only if someone was in bathroom for over 3 minutes (doing number 2).

Was looking for a solution and of course over complicated it. To make it easy I now have two automations. First one checks how long is movement sensor Athom Presence Sensor in my case) active. If it was over 3 minutes I set an input_boolean entity to true. Second automation will trigger the spray when there is no more movement in bathroom and input_boolean value was previously set to true. I tested it this morning after drinking morning coffee and had to go... And it works great!

Wiring:

fritzing_wiring_diagram

airwick-esphome's People

Contributors

thehijacker avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.