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. 😀
@metalosmrmmgtow9162 ай бұрын
Love it. Always great to see "fresh" ideas turned into functional HAss devices.
@HATipsByLarry2 ай бұрын
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
@whatsmyname41652 ай бұрын
That's a world class pun!
@simongchadwickАй бұрын
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Ай бұрын
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. kzbin.info/www/bejne/a3ullIVmhNCJmdk Also installed a VL53lox time-of-flight sensor ( kzbin.info/www/bejne/aIuoeneiZ6ufq8U ) 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.
@miguelavello7493Ай бұрын
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Ай бұрын
Glad you like the video. I have made a automation video for the glade air freshener mod kzbin.info/www/bejne/p3yseGivmLqXbbM I plan on making more in the future. 😀
@the_smart_home_makerАй бұрын
Super inspiring project! Great work, Larry!!
@HATipsByLarryАй бұрын
Thank you. Glad you liked the video. 😀
@hshah19032 ай бұрын
Good work, appreciate the efforts and a great way to fix the problem with foul smell
@HATipsByLarry2 ай бұрын
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. 😀
@johnkoester65342 ай бұрын
Great job! I’ve seen it done before but you made it look way easier. Thanks
@HATipsByLarry2 ай бұрын
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.
@patrickalbury89012 ай бұрын
Another great video. I like these type ideas alot. Yes i would like to see the automation ideas, if you get a chance.
@HATipsByLarry2 ай бұрын
Thank You. Glad you liked the video. I will see what i can put together, once we get some others requesting it. 👍
@PatrickBulteel2 ай бұрын
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.
@HATipsByLarry2 ай бұрын
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
@TheDanielsherer18 күн бұрын
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.
@HATipsByLarry18 күн бұрын
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. 😀
@shawnmaker69742 ай бұрын
Awesome! It would be cool to put a pir sensor in there too.
@HATipsByLarry2 ай бұрын
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
@3ATIVE2 ай бұрын
Nice 👍👍
@HATipsByLarry2 ай бұрын
Thanks Dave, glad you liked it. Want to see how you did yours soon 😀
@JackF12 ай бұрын
Awesome project, id love to see the code, new subscriber
@HATipsByLarry2 ай бұрын
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 😀
@HATipsByLarryАй бұрын
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 kzbin.info/www/bejne/p3yseGivmLqXbbM
@JonnyFixАй бұрын
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Ай бұрын
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Ай бұрын
@@HATipsByLarry Thanks!
@HATipsByLarryАй бұрын
@@JonnyFix No Problem, glad to help
@geoffreycoanАй бұрын
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Ай бұрын
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.
@itscarlsanityАй бұрын
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Ай бұрын
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Ай бұрын
@@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Ай бұрын
@@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Ай бұрын
@@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Ай бұрын
@@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Ай бұрын
Question. Could you have use the 3.3v from the esp3C3 or use a D1 mini and it 3.3v.. Thanks
@HATipsByLarryАй бұрын
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Ай бұрын
@@HATipsByLarry OK tanks
@roysterviАй бұрын
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.
@Dylan_Lanckman2 ай бұрын
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?
@HATipsByLarry2 ай бұрын
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_Lanckman2 ай бұрын
@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. 😬
@HATipsByLarry2 ай бұрын
@@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_Lanckman2 ай бұрын
@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.
@HATipsByLarry2 ай бұрын
@@Dylan_Lanckman Well now you know for next time 😀
@akasha13372 ай бұрын
Can this powered by lithium battery it will last long?
@HATipsByLarry2 ай бұрын
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.
@akasha13372 ай бұрын
@@HATipsByLarry thank you alot is any alternative controller can be used for 24/7 usage or any other way to make it more efficient
@HATipsByLarry2 ай бұрын
@@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.
@MarcoA.EАй бұрын
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Ай бұрын
@@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Ай бұрын
@@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Ай бұрын
Some problem 😞
@HATipsByLarryАй бұрын
@@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Ай бұрын
@@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.
@HATipsByLarryАй бұрын
This will be my next HA Modification Project so stay tuned kzbin.infomlos0h8tpqQ?feature=share
@CrazyAngelfireАй бұрын
my bad i didnt see the list lol
@HATipsByLarryАй бұрын
No problem. 👍
@CrazyAngelfireАй бұрын
@@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Ай бұрын
@@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, kzbin.info/www/bejne/p3yseGivmLqXbbM
@whatamistilldoinghereАй бұрын
I just wanna mod it to use regular air fresheners so i don't have to spend extra
@HATipsByLarryАй бұрын
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Ай бұрын
@@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Ай бұрын
@@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.