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.
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.
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. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-5JBcR0OkVcw.html Also installed a VL53lox time-of-flight sensor ( ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-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.
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.
@@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!
@@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.
@@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.
@@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
Glad you like the video. I have made a automation video for the glade air freshener mod ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qKIG5ycUd7Q.html I plan on making more in the future. 😀
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 ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-qKIG5ycUd7Q.html
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:
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
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.
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.
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
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
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.
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 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.
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 😀
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
@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. 😬
@@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.
@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.
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. 😀
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. 😀
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
I was planning on making it before this, but life got in the way. Have recorded the videos, but as any video creator can tell you it's the editing of the video that takes all the time. Hope to have it out soon.
Yes, the sensor will only change states when you are directly in front of it. It can detect up to around 6 feet in front of it. It reports as unknown when detecting nothing then starts reporting the distance to the object in real time. I use it in my bed occupancy sensor to detect when i'm setting in bed vs laying down. Also use it at the entrance to my foyer to automatically unlock my smart lock on my front door. You could use it to count people also, just create a HA counter helper. You would need 2 TOF sensors for that to know weather to increase or decrease the counter.
I often get asked about how to set the zones up in home assistant for this project, so i have created a github page to help answer those questions. github.com/HATipsByLarry/LD2410-Zones/tree/main If anyone still has questions after reading this then please ask here or on my discord channel. The ESPHome code is also there as well.
Here you go i2c: sda: 21 scl: 22 scan: true id: bus_a sensor: - platform: bme280_i2c temperature: name: "WorkBench Temperature" oversampling: 16x filters: - offset: 3.0 humidity: name: "WorkBench Humidity" filters: - offset: 6.0 address: 0x76 update_interval: 5s Just change the numbers after offset: to adjust the temp and humidity readings to make them more accurate
I've been playing with temperature sensors for the last couple weeks and I've learned that there is a difference between BME and BMP. The BME 280 will do temperature, humidity, pressure and altitude. While the BMP 280 only does Temperature and pressure.
In the next video could you spend some time on explaining why you chose this particular combination? For example why have both PIR and mmWave sensors? What to use a ToF sensor for? Also - since temp & hum sensor are often influenced by the PCB circuitry heat (and using an offset is often just a stopgap) how you will account for that? Thanks.
Updated the Github repository for the mega sensor project hardware to reflect using the ESP32C3 micro controller instead of the D1 mini ESP32. github.com/HATipsByLarry/Mega-Sensor/tree/main (edited)
Starting with this video i have added a Github repository for all future videos Here is the link for this video github.com/HATipsByLarry/Mega-Sensor It's also in the video description as well.
I have modified the ESPHome code for the mmWave sensor to allow for Radar zones. The code is to long to put in the description of this video so if you want the updated code please visit my Github Page github.com/HATipsByLarry/LD2410-Zones/blob/main/LD2410%20Code.yaml
It's not to difficult to do, but I get ask this question often so I'm going to set up a github page to explain how to do this. There are a few steps involved if you want to do it right so give me a couple of days to take pictures and set it up and I'll add a link here for you and everyone else to access it 😂
@@wjn777 Here is the github page as promised. github.com/HATipsByLarry/LD2410-Zones/tree/main If you still have questions after reading through the page then you can come back here and ask them or my discord channel 😀
The automations and setup for the Rotary Encoder and button are to long to put in the video description. You will find those in my discord channel. discord.com/invite/9EkA5rFyCE
As of the date of this post updates to the automations for the upgraded bed occupancy sensor system has been make. Check out my discord channel to get the new updated code discord.com/invite/9EkA5rFyCE Just as a FYI the new updated code now can tell when you are making your bed, this can trigger the sleeping helper to turn off as you are done sleeping which can in turn trigger your lights to turn on and any other task that you might want.