Integrating a Glade Air Freshener with Home Assistant Full tutorial Mod

Поделиться
HTML-код
  • Опубликовано: 2 окт 2024

Комментарии • 82

  • @HATipsByLarry
    @HATipsByLarry  3 месяца назад +6

    Forgot to mention this in the video but you can also control the air freshener with your voice assistant (google, alexa, etc.) now that it's intergraded with Home Assistant. 😀

  • @metalosmrmmgtow916
    @metalosmrmmgtow916 3 месяца назад +6

    Love it. Always great to see "fresh" ideas turned into functional HAss devices.

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад

      Thank you. Glad you like the video. I plan on making more of these type video's in the future. Like modifying devices to make them smarter and work in home assistant

    • @whatsmyname4165
      @whatsmyname4165 3 месяца назад

      That's a world class pun!

  • @miguelavello7493
    @miguelavello7493 3 месяца назад +2

    Fantastic Idea. 💡 Larry thank you for sharing and PLEASE make Part 2, to see and learn from the automations you made. What an awesome project.

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад

      Glad you like the video. I have made a automation video for the glade air freshener mod ruclips.net/video/qKIG5ycUd7Q/видео.html I plan on making more in the future. 😀

  • @patrickalbury8901
    @patrickalbury8901 3 месяца назад +3

    Another great video. I like these type ideas alot. Yes i would like to see the automation ideas, if you get a chance.

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад

      Thank You. Glad you liked the video. I will see what i can put together, once we get some others requesting it. 👍

  • @HATipsByLarry
    @HATipsByLarry  3 месяца назад +4

    Working on part 2 of this video. Well be about the automations i used for the air freshener. Should be out in the next few days. This video is now out ruclips.net/video/qKIG5ycUd7Q/видео.html

  • @JonnyFix
    @JonnyFix 3 месяца назад +2

    I might be missing something but the code looks like just the motor control. How does it connect with home assist and manage the comms from that?

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +1

      Through ESPHome via wifi.When you flash the micro-controller with esphome the first part of the code that identifies the connection information is created by esphome. The code i provided is placed after the Captive Portal line which will be the last line of the pre-made code.For example this was placed in my MCU after i added it to esphome
      esphome:
      name: air-freshener-bathroom
      friendly_name: Air Freshener Bathroom
      esp32:
      board: esp32-c3-devkitm-1
      framework:
      type: arduino
      # Enable logging
      logger:
      # Enable Home Assistant API
      api:
      encryption:
      key: "ppnXxOvsUOrTTY8hwuqQIVd1F0MazM+9zQulhUpz8I4="
      ota:
      password: "87fa8773048c73f0ebb27acf663198e4"
      wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
      # Enable fallback hotspot (captive portal) in case wifi connection fails
      ap:
      ssid: "Air-Freshener-Bathroom"
      password: "zejxypP0Iw9R"
      captive_portal:

    • @JonnyFix
      @JonnyFix 3 месяца назад +1

      @@HATipsByLarry Thanks!

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад

      @@JonnyFix No Problem, glad to help

  • @serhat3081
    @serhat3081 10 дней назад +1

    süpersin... aklımdakini ararken seni buldum. mükemmel

  • @the_smart_home_maker
    @the_smart_home_maker 2 месяца назад +2

    Super inspiring project! Great work, Larry!!

    • @HATipsByLarry
      @HATipsByLarry  2 месяца назад +1

      Thank you. Glad you liked the video. 😀

  • @elevatedviewstcl
    @elevatedviewstcl 18 дней назад +1

    I'm really new at trying to tinker and make devices and sensors, so I apologize if my question is elementary lol dont hold it against me. So why do we have to use buck converter to regulate the voltage down to 3.3 volts for the motor, is 5 volts too much for this particular project?

    • @HATipsByLarry
      @HATipsByLarry  18 дней назад +1

      Yes it is, i stripped the plastic gears on the motor trying what you suggest. There is some pretty high torque involved. And i also tried using the 3.3 volts coming from the micro controller, but the MCU would either lock up or reset. After some testing found that the MCU doesn't put out enough current to power the motor when it is trying to push the air fresheners nozzle down. Don't worry about asking questions, I'm a firm believer of the saying about there being no stupid questions.

    • @elevatedviewstcl
      @elevatedviewstcl 18 дней назад +1

      @@HATipsByLarry thank you, that makes perfect sense. Also, I really appreciate you taking the time to give me an explanation.

    • @HATipsByLarry
      @HATipsByLarry  18 дней назад

      @@elevatedviewstcl No problem. Glad to answer any questions people have.

  • @TheDanielsherer
    @TheDanielsherer Месяц назад +1

    The parts required (the 3 circuit boards) currently cost about $14 USD, so this project could easily pay for itself just by eliminating the batteries! But real value is definitely the automation.

    • @HATipsByLarry
      @HATipsByLarry  Месяц назад

      Yes, and the fact that you don't have to have it spray every 9,18,36 min. Which is where glade makes it's money, refills. They sure aren't making much on the sprayer itself as it's only $6.00 USD. Main reason i decided to mod it. I have several of these around the house and they all have over a 1000 sprays remaining. They have been running for over 4 months now. 😀

  • @geoffreycoan
    @geoffreycoan 3 месяца назад +2

    Neat project. I understand why you made it USB powered but it loses the portability of batteries, plus in the UK you are very limited about electrical sockets in bathrooms / toilets so other than a double insulated shaver socket we tend not to have any sockets. Wonder if you could fit a larger battery pack inside and if so how long it would last? Might be a non starter

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +1

      Yep i'm afraid so. The MCU needs to be constantly connected to HA via wifi so it can listen for commands to know when to spray. So the MCU can not be put to sleep like say a temp sensor could be, and wifi is a power hog.

  • @PatrickBulteel
    @PatrickBulteel 3 месяца назад +2

    That was a great video. Also, I like that now the air freshener is powered instead of needing batteries, though those batteries do tend to last long. I suppose you could modify what controller you use so you could include something like PIR or other sensors. Anyway, great idea.

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +1

      Thank You. The MCU needs to be listening to HA to know when to spray so it needed to be powered instead of running off of batteries anyway. I thought of putting a PIR or mmWave sensor inside it but i like most others already have PIR and mmWave sensors in most rooms anyway so decided not to. I will be putting out a part 2 showing how i used those sensors and others to make the air freshener spray when i wanted. So stay tuned for that

  • @simongchadwick
    @simongchadwick 2 месяца назад +1

    This is very cool - many thanks Larry for documenting and filming it!
    Slightly related: I have a Brondell swash bidet powered by a Tasmotized power monitoring plug. When the bidet air drying mode is detected by the plug (based on wattage), a HA automation turns on the extractor fan for 10 minutes.

    • @HATipsByLarry
      @HATipsByLarry  2 месяца назад +1

      Glad you liked the video and thanks. That sounds cool you can even have the air freshener spray at the time the fan is turned on I have replaced a dumb switch with a esp32, a relay and a bme280 temp and humidity sensor. ruclips.net/video/5JBcR0OkVcw/видео.html Also installed a VL53lox time-of-flight sensor ( ruclips.net/video/2ZEIDl2Fluc/видео.html ) that points across the seat of the toilet so the fan and the air freshener only trigger when i sit down on the seat, or when the humidity goes above a certain level.

  • @3ATIVE
    @3ATIVE 3 месяца назад +2

    Nice 👍👍

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад

      Thanks Dave, glad you liked it. Want to see how you did yours soon 😀

  • @MarcoA.E
    @MarcoA.E 2 месяца назад +1

    I've tried this project, but I noticed some problems with the Xiao Esp32c3 from Seed.
    If I cycle the power (usb off-on) the dc motor goes on (turning on and on) and the board does not connect, until I reset; then the board connects and the motor stops and responds to the buttons.
    Any ideas?

    • @HATipsByLarry
      @HATipsByLarry  2 месяца назад

      @@MarcoA.E norrmal for the motor to move on power up a little, but should connect right away to wifi. I have used the ESP32C3 in many projects without problem. I have 5 of these modified glade air fresheners in different locations in my home and all working fine without problems. Perhaps try a different mcu. Move to different location to see if weak wifi signal. Also check esphome log for mcu, see if it shows any errors

    • @MarcoA.E
      @MarcoA.E 2 месяца назад

      @@HATipsByLarry Even with VERBOSE in the logger there's nothing noticeable; beyond gpio9 being a strapping pin. It seems to affect the boot, as there's about 2.2V on that pin before I manually reset - then the voltage of that pin drops to 0V and the board finally loads. But if your not seeing that behaviour on your samples...

    • @williamARATA
      @williamARATA 2 месяца назад

      Some problem 😞

    • @HATipsByLarry
      @HATipsByLarry  2 месяца назад

      @@williamARATA Are you saying that this is some problem? Or that you have the same problem? If you are having the same problem, then prehaps you could also hop over to my discord channel and share your log. Here is my discord channels link. discord.gg/HB9fne2VDu

    • @HATipsByLarry
      @HATipsByLarry  2 месяца назад

      ​@@MarcoA.E As long as you don't attach pullup/down resistors to them they shouldn't cause a problem. Can you hop over to my discord channel? It would be a lot easier to troubleshoot as you can paste your logs, etc. in discord.. Here is the link discord.gg/HB9fne2VDu Just send a message to me @HATipsByLarry and it will get my attention. You could move the wire to a different pin, say D7 (GPIO20) and update the code and see if that fixes your problem. But not seeing this problem on my 5 units would be WEIRD then.

  • @hshah1903
    @hshah1903 3 месяца назад +2

    Good work, appreciate the efforts and a great way to fix the problem with foul smell

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад

      Glad you liked the video. It has great wife approval factor also. Wanted to find a way to make it better., as the way it was you could only have it spray on a schedule, either 9, 18 or 36 minutes. Very wasteful IMO. This should make the cans of spray last a LOT longer. Plus it sprays when you really need it now. 😀

  • @Dylan_Lanckman
    @Dylan_Lanckman 3 месяца назад +2

    I did this as a college project, last year. Worked great until my gears broke. How did you solve the timing problem on the motor?

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +2

      If you check out my code you can see where i start the motor forward then wait for 300 ms then break the motor. Then reverse the motor for another 300 ms. The timing was trail and error, slowly rising the value until i got it right.
      switch:
      - platform: gpio
      id: fwd
      name: Motor Forward
      pin: 9
      - platform: gpio
      id: rvs
      name: Motor Reverse
      pin: 10
      button:
      - platform: template
      id: btn_spray
      name: "Spray"
      on_press:
      - switch.turn_on: fwd
      - delay: 300ms
      - switch.turn_on: rvs
      - delay: 500ms
      - switch.turn_off: fwd
      - delay: 300ms
      - switch.turn_on: fwd
      - delay: 500ms
      - switch.turn_off: fwd
      - switch.turn_off: rvs

    • @Dylan_Lanckman
      @Dylan_Lanckman 3 месяца назад +2

      @HATipsByLarry I had an older model (20 years). I figured out indeed it was trial and error. I landed at 500ms but alas it lived only 2 weeks until it broke. I was lucky I had footage of it working or I wouldn't have had a project to submit. 😬

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +2

      @@Dylan_Lanckman I've had mine going for over a month now. So far no problems with it at all and gears look brand new. 😀 A friend of mine did try driving the motor with 5vdc (didn't use a buck converter to bring the voltage down) and ended up damaging the teeth on the gears.

    • @Dylan_Lanckman
      @Dylan_Lanckman 3 месяца назад +2

      @HATipsByLarry exactly what happened with me. My electronics professor warned me for this but I didn't understand the logic at the moment so my contraption ground it's own gears apart.

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +2

      @@Dylan_Lanckman Well now you know for next time 😀

  • @johnkoester6534
    @johnkoester6534 3 месяца назад +1

    Great job! I’ve seen it done before but you made it look way easier. Thanks

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад

      Thank You. I made the decision to replace the original PCB to make it easier, instead of having to cut traces and solder tiny wires to tiny points on a tiny PCB. For a $1.50 USD for the motor controller, i figured it was worth it.

  • @itscarlsanity
    @itscarlsanity 3 месяца назад +1

    Won't the motor overturn and damage the gears? I see in the code that you just turn the motor forward then just delay, then reverse..

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +1

      No. That's why i delay exactly 300ms then break the motor so it doesn't cost and reverse for exactly 300ms then break then release the motor. I did break a few gears until i got it right testing of course, but then that's why you have me 😀So you don't have to break things getting it right. I have 5 of these around the house and they all have been working for over 3 months with no problems at all.

    • @itscarlsanity
      @itscarlsanity 3 месяца назад +1

      @@HATipsByLarry thats great and nice to hear. I was looking to automate the same air freshner for quite some time now and it was a suprise when I saw your video haha. I'm still looking into a battery powered one and a stepper motor instead so the turns are more precise. But I guess with what you've shown, we have a proof of concept. Great job!

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +1

      @@itscarlsanity Thank You. A battery powered one that works with home assistant would be almost impossible to do (unless you want to recharge the battery a LOT) or had a big external battery, because the Micro-Controller can't be put to sleep and needs constant wifi (power hog) connection so it can be triggered by the automations. If your talking say a temp/humidity sensor for example then no problem as the sensor could wake the micro-controller when the temp/humidity changes then the controller could transmit the changes and go back to sleep.

    • @itscarlsanity
      @itscarlsanity 3 месяца назад +1

      @@HATipsByLarry thats why I wasn't able to do it haha An 18650 battery could work. I hear it could last 17 hrs for an ESP with deep sleep. Not sure how could you just wake it up when a command is sent from Home Assistant. I've also seen a small solar panel that charges the battery in the day so it never runs out but I mean the air freshner is an indoor thing so you'd have to put a wire to the solar panel outside which kinda defeats the purpose haha. Some solar lights have that circuit, you have rip apart the lights and just put a voltage regulator to 3.3v and you're good to go.

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +1

      @@itscarlsanity If you want to discuss this more discord would be the way to go as it is easy to carry on a conversation there. I just recently opened up a channel if your interested. discord.gg/HB9fne2VDu

  • @roystervi
    @roystervi 2 месяца назад +1

    Question. Could you have use the 3.3v from the esp3C3 or use a D1 mini and it 3.3v.. Thanks

    • @HATipsByLarry
      @HATipsByLarry  2 месяца назад

      Good question, but no the MCU's don't have the required current capacity to run the motor and the H-Bridge motor controller. When i tried the MCU would either lock up or reboot. The D1 is the same, plus its foot print is to big for the space available.

    • @roystervi
      @roystervi 2 месяца назад +1

      @@HATipsByLarry OK tanks

    • @roystervi
      @roystervi 2 месяца назад +1

      There is a video of the older model . I tried to do the same with the newer model, and now l know why the motor was locking up and the d1 mini lockup as well. Thanks for this video.

  • @akasha1337
    @akasha1337 3 месяца назад +2

    Can this powered by lithium battery it will last long?

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +2

      Good Question. Yes and no, to answer your questions in order. The micro controller i picked, (although i didn't pick it for this reason) has battery connections on the back of it (as you can see in my wiring diagram github.com/HATipsByLarry/Glade-Air-Freshener-Mod/blob/main/Glade%20Air%20Freshener%20Wiring%20Diagram.jpg ) that would allow a battery to be connected and recharged, but because the micro controller needs constant wifi connection, (to know when to run the motor controller) you could not put it to sleep, so the drain on the battery would be constant and high.

    • @akasha1337
      @akasha1337 3 месяца назад +3

      @@HATipsByLarry thank you alot is any alternative controller can be used for 24/7 usage or any other way to make it more efficient

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад +2

      @@akasha1337 No because of the need for any controller to have constant wifi connection to home assistant so it knows when to spray, the draw on the battery will be high. If we were talking about say a temperature and humidity sensor then things would be different as the sensor could wake the controller up from sleep, when the temp or humidity changed, then the controller could transmit the changes and go back to sleep. But in this situation we need to constantly listen to HA to know when to spray.

  • @JackF1
    @JackF1 3 месяца назад +1

    Awesome project, id love to see the code, new subscriber

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад

      Glad you like the video and thanks for subscribing. Code is in the video description. But I'll post the link to it here as well for you github.com/HATipsByLarry/Glade-Air-Freshener-Mod/blob/main/ESPHome%20Code 😀

  • @shawnmaker6974
    @shawnmaker6974 3 месяца назад +1

    Awesome! It would be cool to put a pir sensor in there too.

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад

      Thanks You. 😀i thought of that but it is now connected to HA already and i already have mmWave sensors everywhere, as i'm sure most people do. So decided against it. I will be coming out with a part 2 to this video showing how i use those sensors and others to make it spray when i want. Stay tuned

  • @rodrigosiviero2558
    @rodrigosiviero2558 25 дней назад

    ok this whole automate everything for a hobby is getting out of hand

    • @HATipsByLarry
      @HATipsByLarry  25 дней назад

      @@rodrigosiviero2558 lol I haven't even got started good yet. And i would have to disagree with you there. The more devices we can automate, the smarter (and for the most part), cheaper we can run and control them.

    • @rodrigosiviero2558
      @rodrigosiviero2558 25 дней назад

      @@HATipsByLarry joking my dude, keep up the good work

  • @CrazyAngelfire
    @CrazyAngelfire 3 месяца назад +1

    my bad i didnt see the list lol

    • @HATipsByLarry
      @HATipsByLarry  3 месяца назад

      No problem. 👍

    • @CrazyAngelfire
      @CrazyAngelfire 2 месяца назад +1

      @@HATipsByLarry i finally got round to do this project and its great, i made a mistake of doing it on a "Air Wick" it still works it seems. can you show the automations for the counter and auto spray too

    • @HATipsByLarry
      @HATipsByLarry  2 месяца назад

      @@CrazyAngelfire Interesting. Could have just used my parts list www.canva.com/design/DAGIthVOumY/xjJ5mYMU3wPeqWMaf1pPOw/view?DAGIthVOumY& all the parts are linked in it. Just had to click on them, Didn't know this could work with a air wick air freshener. Anyway already made the video that explains what your asking for, ruclips.net/video/qKIG5ycUd7Q/видео.html

  • @HATipsByLarry
    @HATipsByLarry  3 месяца назад

    This will be my next HA Modification Project so stay tuned ruclips.net/user/shortsmlos0h8tpqQ?feature=share

  • @whatamistilldoinghere
    @whatamistilldoinghere 2 месяца назад

    I just wanna mod it to use regular air fresheners so i don't have to spend extra

    • @HATipsByLarry
      @HATipsByLarry  2 месяца назад +1

      What is a "regular" air freshener? Also this mod will make the cans it does use last a LOT longer as it ONLY sprays when your automations tell it to not every 9,18,36 min any more.

    • @whatamistilldoinghere
      @whatamistilldoinghere 2 месяца назад

      @@HATipsByLarry where I live we get a cheaper alternative in manual aerosol cans but the cans are much larger and don't fit this glade machine

    • @HATipsByLarry
      @HATipsByLarry  2 месяца назад +1

      @@whatamistilldoinghere Sorry can't help you there, you would need to completely re-design the machine, (as in make a new one) for that to work.