Electromagnetic Drawer Locks using Home Assistant and ESPHome

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.พ. 2025

ความคิดเห็น • 64

  • @SmartyVan
    @SmartyVan  3 หลายเดือนก่อน +1

    🚨 Mag Lock Mounting Brackets now FOR SALE!
    marketplace.sendcutsend.com/p/CS70N307/magnetic-drawer-lock-mounting-bracket
    * These have been redesigned to accommodate various mounting hole patterns I found on the locks from Amazon!

    • @ANomadsNest
      @ANomadsNest หลายเดือนก่อน

      This is way over my head but I plan to send this to my builder. Do you have to have ESP home? I saw another van video that shows when the engine is turned on it locks and they had an override button. Can you use this for doors to or just drawers? Do I buy one of these per drawer/door? Thank you.

  • @o-van
    @o-van หลายเดือนก่อน

    Thanks for getting into those how-to videos. They're super inspirational and helpful. And great job with the build!

  • @DougOrDouglas
    @DougOrDouglas 3 หลายเดือนก่อน +2

    You should do a video on making your dashboard. It's very well laid out, but online resources are hard to follow. Your tutorials are very helpful, even in home automation.

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +2

      I am thinking of doing that soon-seems like a popular request. Thanks!

  • @LivnlargeCO
    @LivnlargeCO 28 วันที่ผ่านมา

    Thanks!

    • @SmartyVan
      @SmartyVan  28 วันที่ผ่านมา

      Our first SUPER THANKS!!! alllright. Thanks so much!!!!

  • @igoslomo
    @igoslomo 3 หลายเดือนก่อน +2

    I love this stuff… not sure if I’m smart enough to do it but I’ve added it to my list of things I want to learn. In the meantime, I’ve ordered the mag locks and will work with a switch. Keep up the great work!! Doesn’t matter what you do next - I’ll be watching.

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +2

      YES - you make a great point that I somewhat missed. You can just use analogue switches for these! Good luck on the install.

    • @ruudhooff6486
      @ruudhooff6486 3 หลายเดือนก่อน +2

      Or power it from one of the power lines that is controlled by your key, like the radio...

  • @BenBazan
    @BenBazan 3 หลายเดือนก่อน

    So glad I found your channel. Now I know that when I start traveling I can bring my smart home comfort on the road with me. In the meantime I’ll be watching, learning and replicating what I can at home for now. Great work guys!

  • @Shrp91
    @Shrp91 3 หลายเดือนก่อน

    I dont have a van but I love your videos!

  • @Evo2k3
    @Evo2k3 3 หลายเดือนก่อน

    Great content! Subscribed. Home Assistant is awesome! I wished I had use magnetic locks for drawers during my van build but I did used them as an extra lock for my side and back doors. I took the easy route and used 12V Shelly One switches to send power to the locks. I added a mechanical rocker switch to kill power to the locks in case of an emergency. The main thing with these switches is you will need a reliable internal WIFI in your van. They work so surprisingly well for me that I have a bunch of these switches controlling all of my 12V devices in my van.

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน

      Glad you’re enjoying! Thanks for subscribing. Smart to have redundancy and physical switches. I have had no trouble with WiFi devices, but I am all about making things wired. We’re going to talk about some more hard-wired solutions that don’t rely on WiFi, and have physical switching integrated.

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน

      it could get a little complicated having two switches for every 12v accessory (though possible). I dig the idea of a switch on an input pin of the microcontroller (ESP), and that's what SHELLYs do on their relays and RGBW2 controllers! I have YET to see an ESP device die in several years. I'm sure it can happen... but I think having wifi or network issues is more likely than ESP dying. There are some great ESP boards I'm going to review that have a BUNCH of relays (or MOSFETS) and lots of digital inputs so you can have a ton of hard wired switches but also control things remotely.

  • @RealRobWright
    @RealRobWright 3 หลายเดือนก่อน

    Awesome video! I’m definitely going to follow this as I upgrade my RV. I also like the security aspect. It always stresses me out when out at dinner or grocery store. It’d be awesome to maglock all the drawers. Peace of mind!

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +1

      YESS! We have an automation that leaves the drawers locked after the engine is cut for 3 hours-an arbitrary amount of time that we felt would cover going to the grocery, into a restaurant, etc. We also have a "service mode" that prevents the drawers from unlocking at all if the van is in the shop etc.

    • @RealRobWright
      @RealRobWright 3 หลายเดือนก่อน +1

      @@SmartyVan Ah those are great automations. And some ideas I will copy!

  • @patmoran3105
    @patmoran3105 3 หลายเดือนก่อน

    Outstanding content once again. FWIW I expect you'll also get some traction from the overlanding community (like me). People spend outrageous $$$ on simple relay boxes or LED color selectors that could be implemented with the components you're describing here (my plan). It would also be wicked cool to integrate the various switched and app controlled components on a built-out overlanding rig using the HA dashboards (my plan). A small, integrated, touch screen interface mounted on the dash and / or at the back of the vehicle (and in the HA app on the phone) would be awesome. There are pseudo solutions out there as pre-built products but they lock you into a specific vendors ecosystem which limits options and drives up costs. One could save a lot of money AND come out with a custom solution tuned for their specific rig. Great stuff!!

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน

      THIS!!! We have a second tablet in the cab with a nice subset of controls and data-it's amazing to see and have full control of the entire van from the driver's seat. I'll feature this in an upcoming video tour of our dashboards.

  • @anthonymehring2064
    @anthonymehring2064 3 หลายเดือนก่อน +2

    Have you by chance figured out a way to connect a diesel heater to home assistant? Or another type of heater that works for van life that can be controlled entirely with home assistant? If so I would love it if you could make a video about it.

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +1

      I have focused specifically on the Rixen's Heat system (which includes an Espar diesel hydronic). Rixen's has provided CAN Bus on their MCS7 control system and I have worked out full Home Assistant control of their system via CAN Bus. As for stand alone heaters (not part of a full system): it's my understanding that some only support a call for heat via CAN Bus, but I know there are some with an analogue call for heat wire. Check your heater's wiring diagram and/or manual to see if there is a single wire that needs 12 volts applied to call for heat. If so, it would be fairly trivial to make an ESPHome thermostat that turns the heater on! I will be making a video about the Rixen's system, but it's very focused on the MCS7 - rixens.com/products/mcs7-hydronic-with-s-3-diesel-furnace-kit

  • @terab1t
    @terab1t 3 หลายเดือนก่อน +1

    Cool project 👍Adding a physical momentary switch somewhere as a binary-sensor/failsafe for unlock might be a good option which would work even if wifi is down... Also just thinking if you used full-power for the initial lock then drop the duty-cycle to only what's reasonable needed to keep the drawers shut to safe power.
    I wonder if you could use a h-bridge instead of the mosfet board to add a drawer-pop function by reversing polarity to the magnets 🤔

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +1

      innnnnterrresting... I'll let this tumble around in my head for a bit. On the first point this is interesting, perhaps could lower duty cycle, but power consumption is so low already that it's really a non-issue. On the second point, there is no real "need" to pop the magnets in opposite direction-without power, the magnets become inert-but I like where your head is at.

    • @terab1t
      @terab1t 3 หลายเดือนก่อน

      @@SmartyVan Yeah power optimisation probably isn't really an issue for this use-case as you say, unless you sometimes wanted to lock them when the van is parked. Drawer-pop might be a cool feature for a hidden/handleless drawer

  • @seanmaher396
    @seanmaher396 3 หลายเดือนก่อน +1

    Great content that I have been following along with week after week adding to my own van as you roll out new videos.
    Two questions: 1-What is the sensor you mention around 12:00 that has to do with the van moving? Is it a physical sensor or is it tied somehow to the van system? 2-I noticed from your original that you said you monitor your DEF and fuel levels as well. Are you tapping into the van system for that, or are you using external Bluetooth tank sensors or the like? I would like to somehow monitor some of the van’s native systems, and I do think that is probably possible, but possibly beyond the scope of this project.

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +2

      Great questions. 1 - the sensor I’m talking about is a template sensor that I’ve defined in Home Assistant. At the moment it requires two things to be true. One, the van’s ignition must be on-this is being determined by a Shelly Plus 1 sensing 12v from the D+ tap under the Sprinter Driver’s seat when ignition is hot. There are usually similar 12v taps in other vehicles, or you can just look for a wire to tap that has 12v when the ignition is on. Two, the van’s speed must have been over 3 mph in the last 5 seconds. This sensor is populated from the GPS info I pull from our Peplink router (which has inbuilt GPS) and provides “speed” via its API. If both things are true, then my Binary Sensor is TRUE, meaning the van is in motion. If either rare false, the sensor is false and the van is NOT in motion. 2 - The Sprinter data is currently coming from the Mercedes App. There is an API and an Integration for Home Assistant. The problem with this is that the van has to be in cellular range. I have a much better solution coming that will not only work offline, but should work on almost any vehicle! And, yes we should be able to pull Def and Fuel (amongst other things). That video will come after thanksgiving!

    • @seanmaher396
      @seanmaher396 3 หลายเดือนก่อน

      @@SmartyVan Thanks for the answers. I will watch for those. One last one question I forgot to ask is about your van tablet. Is it an iPad or Android and is it operating in a kiosk mode, or is it more funtional than that? And your mount/charger for it by the sink? Thanks again for responding.

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน

      The main tablet is actually an Amazon Fire tablet. I had tried a Samsung Galaxy Tab A8 and had some issues with the web view not staying updated (Home Assistant is presented as a web-based GUI). The Fire Tablet doesn't have the same issue. Go figure. We use Fully Kiosk.

  • @ivoevoo
    @ivoevoo 3 หลายเดือนก่อน +1

    Love the video style - quick and to the point. Would you be open to sharing your mounting bracket design files? That seems to be the biggest hurdle in my reproducing this awesome design - I am not an engineer and would have a steep learning curve to design the various brackets and parts you get custom made. Thanks!

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน

      Thanks for watching! I've saved you a step. The brackets are now available for sale through SendCutSend! I've modified them to account for variations in the mounting hole pattern on the mag locks from Amazon. You can grab yours here: marketplace.sendcutsend.com/p/CS70N307/magnetic-drawer-lock-mounting-bracket

  • @TheKohaXun
    @TheKohaXun 2 หลายเดือนก่อน

    Really like the innovative ideas went into the van! Could you explain why you are relying on WiFi and not a wired or ZigBee connection? Controlling smart home appliances over WiFi seems overkill to me.

    • @SmartyVan
      @SmartyVan  2 หลายเดือนก่อน +1

      Thanks! Good question. It's not really that I CHOSE wifi it's that when it comes to ESPHome, wifi is the in-built default approach as esp32 and esp8266 devices all have wifi built in and so I think it's fair to say ESPHome is wifi-first. To be clear, ethernet is supported in ESPHome, but most of the cheap ESP boards don't have ethernet built in. Custom ESP boards or more expensive home automation boards do sometimes include ethernet and I am exploring using those for future builds. Having said that, I haven't had any wifi issues and with a router and wifi infrastructure already in place, wifi is no real burden-except perhaps for radio smog around our heads. We do use Zigbee for sensors and it's quite reliable, but I wouldn't say it's AS reliable as the wifi ESPs. Maybe that's because they can sometimes compete on the 2.4ghz freq. Hope that helps.

    • @TheKohaXun
      @TheKohaXun 2 หลายเดือนก่อน

      @@SmartyVan Really appreciate the reply! What is your opinion on power consumption of Wifi compared to ZigBee?

    • @SmartyVan
      @SmartyVan  2 หลายเดือนก่อน

      We're talking milliamps for either. But seeing how zigbee sensors and switches usually run on little coin cell batteries, they are likely lower power consumers. But esp microcontrollers with built in wifi are pretty low power consumers too. I used Zigbee for basic sensors etc and ESPs when I needed to build custom controllers for devices in the van. So, it was really more about application and convenience than power consumption. Some things just make sense as a zigbee device and some clearly need to be ESPHome builds.

  • @Erwin_Anderson
    @Erwin_Anderson 3 หลายเดือนก่อน

    Thank you for information

  • @LivnlargeCO
    @LivnlargeCO 29 วันที่ผ่านมา

    Another great video, so many thanks! I will certainly start using MOFSET boards as everything I currently have is relays. Would you be willing to share your STL for the case you show here?

    • @SmartyVan
      @SmartyVan  28 วันที่ผ่านมา

      We just became TH-cam Partners. I'm thinking of creating some membership tiers that would include access to STL files. Open to feedback here. Also, be aware that the MOSFET boards generally switch the low side (ground), so be sure they work in your application.

    • @LivnlargeCO
      @LivnlargeCO 21 วันที่ผ่านมา

      @@SmartyVan Sounds like a good plan...let us know when you set this up. On the topic of the MOSFET board, I ordered the one in your link, the input side is getting 3.31V but that is not enough to activate the output side of the board. The spec sheet says it will work with 3V...When I simply use a 9V battery to activate the channel (yes with the D1 Disconnected), the output properly triggers. I am not sure how you have your setup working as we are using the exact same hardware. Any ideas??

    • @SmartyVan
      @SmartyVan  16 วันที่ผ่านมา

      Thanks for bringing this up. I thought about this a bit and remembered that I had desoldered the LEDs near the inputs and bridged the pads with solder to lower the resistance. imgur.com/a/4HLW62u

    • @LivnlargeCO
      @LivnlargeCO 11 วันที่ผ่านมา

      @@SmartyVan That worked, thank you. However, given the complexity of this...I for one will likely keep using my relays :)

  • @michanowak5140
    @michanowak5140 3 หลายเดือนก่อน

    I would like to add also a basic on/off button to control relay board directly without using esp

  • @ericsassaalders1079
    @ericsassaalders1079 3 หลายเดือนก่อน

    Thanks! This video is a great help!
    Question. Can a basic switch override the smart switch as you show in this video?
    It should be, as the magnetic locks only work when its powered. But im not sure if this gives problems on the home automation.
    So what would happen to home assistant software, if the power was interrupted to a certain lock?
    Currently in my build, I’m using touch sensors inside the recessed cabinet and drawer knobs.
    With a touch the magnetic pin locks opens. Similar to the other lock, you showed as example.
    I decided this setup, because the drawers or cabinets are always locked, until you use the switch.
    But it makes a lot of noice, every time the lock pin shoots back. The noice is enough reason to change, but until this video, I wasn’t sure what the alternative was.
    So until your next video, I will be busy changing the locking mechanisms
    Cheers

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน

      Thanks! the easiest way to add a physical switch would be to connect one to a GPIO pin of the microcontroller and define a binary_sensor to sense the physical switch being pressed. But, if you're asking about a physical switch that is completely separate from the microcontroller and smarts, that would require wiring the switch in parallel with the MOSFET and potentially the use of diodes, especially if you have an inductive load.

  • @adamjones9
    @adamjones9 3 หลายเดือนก่อน

    Hey Mike, amazing videos I’m following along with my build! Just a quick one- will you be selling your 3D files for the valve control box & other boxes for different components at any point? I am having to create these myself each time and as you’ve already made these to fit, it just makes sense to purchase the files from you if possible 😅 cheers!

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +2

      Stay tuned... looking into options to make these available.

  • @BobEhm
    @BobEhm 3 หลายเดือนก่อน

    Love your videos have started down the road of HA at home but not a programming wiz. Can this all be accomplished using automations or blueprints and no yaml? HA without YAML makes it more accessible for the majority of people.

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน

      Hey Bob, I wasn’t a programming wiz either, but anyone can learn! Unfortunately, I don’t know of any way to set up ESPHome devices without some YAML, however, you could replicate something like drawer locks using Shelly relays. Home Assistant has a Shelly integration, so you could set this all up without making your ESPHome controller! Really any device that has relays or some way of switching that already integrates with Home Assistant would remove the need to write YAML!

  • @amanalo
    @amanalo 3 หลายเดือนก่อน

    Do you have latches for your drawers in addition to the magnetic locks? I'm thinking I can use these on some large drawers, but I don't want the drawer to suddenly open because I stopped and parked on slightly uneven ground. I think I would want them to be locked at all times (for security reasons) and only disengage when I push a button or with a motion or proximity sensor instead of unlocking all when the van is turned off. I guess there are lots of ways to configure it.

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +1

      Hey Amanalo, great point! We do actually have a ball catch latch on our heaviest drawer (instant pot, cast iron pan, etc) for the exact reason you mentioned! It’s not to keep it closed while in motion-the mag lock does that-but to keep it closed if we are parked off axis and we unlock the drawers. We gave it a very light touch so it’s just enough to hold the drawer back if we’re on angle where the soft close mechanism couldn’t. BUT, it’s also worth noting that are drawers do not automatically unlock when the engine is off. We set an arbitrary time of 3 hours that they stay locked after engine is killed-enough to fill up with gas, go to the grocery or a restaurant, etc. They DO unlock if we open the upper kitchen cabinet (and the engine is off). Or, we use the tablet to unlock.

  • @MeTooHigh
    @MeTooHigh 3 หลายเดือนก่อน

    In one one of the videos i saw you mentioned usb c chargers around the van. How are you going from 12v to a usb c charger that can handle laptops and do all the charging? All the high power 240w chargers ive found run off of AC.

    • @MeTooHigh
      @MeTooHigh 3 หลายเดือนก่อน

      Also, great video!

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +1

      Ohh good idea for a video. We are using chare-it minis www.coolgear.com/chargeit-minis

    • @MeTooHigh
      @MeTooHigh 3 หลายเดือนก่อน

      ​@SmartyVan perfect! Exactly what I was looking for. Thanks!

    • @drewviersen4793
      @drewviersen4793 3 หลายเดือนก่อน

      Something else that may be worthwhile mentioning. That mosfet board you linked isn’t friendly with 3.3v logic. You have to desolder the led on the optocoupler side and bridge it with solder or wire. Else the led and resistor combo they used leaves the voltage too low to reliably(or at all)switch the optocoupler and thus the mosfet. The board is built on 5v logic. I ordered 3 of them and all 3 had the same issue regardless if I used a wemos mini 8266, any other variant of esp8266, or any of the esp32 models going up to an s3 and c6. I received the “newer” version for all 3 boards.

  • @savvycreativeadventurer
    @savvycreativeadventurer 3 หลายเดือนก่อน

    Just curious, why not use solid state relays ?

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +1

      Good question. In this case I liked the small size of the mosfet board and there should be less voltage drop on the MOSFET (and therefore less heat). I think a lot of the SSRs I've seen need driven by 5v, so you have to feed the board 5v-not the end of the world, but just more complexity than I needed. I like that the Mosfet board takes 12v in.

    • @savvycreativeadventurer
      @savvycreativeadventurer 3 หลายเดือนก่อน

      @@SmartyVan aaah I see. Do you have a way to check whether the drawer is open or not? I cannot think of a way to use the magnet to detect that, you'd have to add an additional sensor like a switch or something if you'd want that correct?

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +1

      Great question. I was just thinking about that the other day. I think there probably IS a way to measure inductance or impedance as the magnetic field changes when the steel on the drawer engages (or is not engaged) with the electromagnet. I also wonder if a Hall effect sensor might do the trick?

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน +2

      I actually just tested a reed sensor and it works!! I think there's a fairly straight forward solution to detect successful locking using reed sensors on the energized side of the magnet!

    • @savvycreativeadventurer
      @savvycreativeadventurer 3 หลายเดือนก่อน

      @@SmartyVan you are the smart one here lol! Did not even think about the hall effect sensor! I was also thinking about the reed switch or sensor but in my mind you'd have to add it to the drawer and then trigger it with the electromagnet you use to lock the drawer and that just sounded like a lot of wires hanging and pulling everywhere .... lol ... It sounds like you have a plan so hopefully we will see that soon lol. Thanks for the feedback and the awesome information and knowledge that you share!

  • @Rjhaack
    @Rjhaack 3 หลายเดือนก่อน

    How long did it take you to figure this all out? Being in IT and having done development before I can imagine that at times this was quite frustrating.

    • @SmartyVan
      @SmartyVan  3 หลายเดือนก่อน

      Haha, there were parts that felt a bit tough-mostly when integrating with existing hardware (AC and Heat), but they turned out to not be so bad. I slowly built this out "on the workbench" while we were building the van-tinkered with Home Assistant and then ESPHome for about a year, then started assembling and designing all of the components as we put the van together.

  • @mambocollective
    @mambocollective 3 หลายเดือนก่อน +1

    I love your content, great info and you make it all very doable .
    The negative I have is I find the videos very difficult to watch and actually really annoying.
    Either you talk very quickly or you've speeded the video up. It makes the delivery very monotonic and jerky. The cuts are very sharp which adds to the jumpyness. Added to that, there are a lot of cuts where you've either cocked up what you wanted to say or for some other reason.
    Hopefully you'll be able to sort the videos out because I want to continue watching and learning from your great content.