DIY Smart Parcel Box with ESP8266 & HomeAssistant | Step-by-Step Guide

Sdílet
Vložit
  • čas přidán 29. 06. 2024
  • Welcome to my channel! In this video, I'll show you how to build a smart parcel box for secure package deliveries using an ESP8266 and HomeAssistant. This step-by-step tutorial is perfect for anyone interested in home automation and DIY projects.
    #esp8266 #esphome #diy
    🔔 Don't forget to subscribe for more DIY projects and tutorials! 🔔
    📌 What You'll Learn:
    • How to set up an ESP8266 microcontroller
    • Integrating the ESP8266 with HomeAssistant
    • Building and assembling the smart parcel box
    • Setting up notifications for package deliveries
    🔗 Useful Links:
    • ESP8266 : amzn.to/3R3ogl9
    • TOF Sensor: amzn.to/44XkzTV
    • 12V DC Shield: amzn.to/3KfGOeb
    • 12V DC adapters: amzn.to/4bRNpXX
    • Header Pins: amzn.to/3KgPMYI
    • Landscape Wire: amzn.to/3UNsG0s
    • Prototype Board: amzn.to/3KeBw2r
    • Adhesive Cable Ties: amzn.to/44Y7I3C
    • HomeAssistant Setup Guide: www.home-assistant.io/docs/
    • Sensor Kits: amzn.to/3VcU4Xb
    📖 Chapters:
    0:00 Introduction
    1:14 The Plan
    2.56 Setting Up ESP8266
    8.02 Connecting TOF Sensor
    15.14 Bench Testing
    20.17 Final Assembly
    26.25 Finished Product
    Thanks for watching! Please like, share, and subscribe if you found this video helpful.
    DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links that I provide I may receive a small commission. There is no additional charge to you! Thank you for supporting this channel so I can continue to provide you with free content each week!
  • Věda a technologie

Komentáře • 106

  • @repsej74
    @repsej74 Před 25 dny +4

    lazy person = inventive person. Great project. Thanks :)

  • @Genzzry
    @Genzzry Před 28 dny +6

    You could also mount 3 load cells under the box too (3 being a number of "legs" that self-level).
    That'd alert you to packages placed on top & inside of the box... due to the change in weight of the box.
    Load cells are fairly cheap, accurate and are the things you'd find inside of electronic kitchen scales, etc.
    Other uses for them would be things like putting under bed legs to detect WHO is in bed (by being within x% of their last recorded weight) or if its just clothing / a box of crap on the bed that can be ignored... they could also record daily weight into a spreadsheet / database if you're dieting, etc.
    Hell... there are MANY more projects you could do with load cells... like an automated cat bed that turns on a heating mat when a cat lies on its cat-bed (if the temperature of the rooms is below x) 😛

    • @projecttimetech7022
      @projecttimetech7022  Před 27 dny

      I really like this idea. Thanks!

    • @IvanDorozhkin
      @IvanDorozhkin Před 25 dny +2

      Or load cells under the bed can end in divorce.. Don't use it 😁

    • @bennylloyd-willner9667
      @bennylloyd-willner9667 Před 15 dny

      Good idea depending on the climate. I live in Sweden and during winter there can be quite a bit of heavy snow on the parcel box making it hard. I'm not dissing your idea, just saying there are many parameters to consider.

    • @projecttimetech7022
      @projecttimetech7022  Před 15 dny

      @@IvanDorozhkin LOL!

  • @jasonwhite2775
    @jasonwhite2775 Před 17 dny +1

    Man, the good idea fairy is always present after your project is complete. So here is my 2 cents...
    1, consider mounting sensor low as possible, shooting diagonally corner to corner. On the door side. I think this would give the best chance at a small or flatter packages being detected. But now that I'm thinking about it, a sticker ("Place Package here") in the center of the box could improve lazy delivery drives placement.
    2, If you did want to use a battery, a simple contact button or switch on the door could close/open a circuit that could wake the deep sleep, run the threshold condition, then send the notification. And with it being in deep sleep for the majority of the time, a solar charging circuit can trickle charge the batter. Lastly a Low Bat. notification could prompt one to bring a recharged battery out when picking up a package:)
    Awesome work!

    • @projecttimetech7022
      @projecttimetech7022  Před 17 dny +1

      Thanks, this is exactly why I love the tech community. Sooo many good ideas. I really like the door contact/wake-up idea. That's awesome!

    • @bennylloyd-willner9667
      @bennylloyd-willner9667 Před 15 dny +1

      Great idea! Unfortunately, I live in Sweden, and the delivery drivers here can't get more uninterested in reading such stickers, only thing that interest them even less, is following them😁

  • @mattylad8035
    @mattylad8035 Před 17 dny +1

    Awesome project.
    If you could get it to send you a notification to several phones that would be good too, that way you don't need to keep checking home assistant. I may have a go at one of these one day.

    • @projecttimetech7022
      @projecttimetech7022  Před 17 dny

      Yep! You're right, that's already on my "to-do" list. LOL, the laziness progression is strong at my house - First we got tired of checking the box, so I automated it, then we got tired of checking our HA dashboard, so I'm going to get notifications. Next, I need to do a drone automation to go get the packages and open them for me.

  • @squeezysoft
    @squeezysoft Před 25 dny +5

    Pretty slick! I was also looking to do a project where the box would lock after a package was added.

  • @hi-ccowboy7983
    @hi-ccowboy7983 Před 3 dny

    Good job man! I like this channel!

  • @hornetbad
    @hornetbad Před 19 dny +1

    Great project 👌👌

  • @alanjrobertson
    @alanjrobertson Před 22 dny +1

    Nice video. Very impressed with ESP Home and how nicely it let's you configure things! (I'm used to doing I2C on my Raspberry Pi via SSH)

    • @projecttimetech7022
      @projecttimetech7022  Před 19 dny

      I'm pretty impressed with it too. Now it's time to automate all the things!!

  • @bennylloyd-willner9667
    @bennylloyd-willner9667 Před 15 dny +1

    Great video! I have an ESP32 with a Touch screen project in my head for my car, controlling work and driving lights wirelessly to relays in the engine compartment. More closely to your project here, I also have my mailbox about a mile from our house, so I want a similar thingy to detect mail. I will need some LoRa stuff I suppose, but you triggered me to actually start a project.

    • @projecttimetech7022
      @projecttimetech7022  Před 15 dny

      Ah, automotive stuff - My other channel, Project Time Garage is all about automotive stuff - check it out, it's a much larger channel: czcams.com/users/projecttimegarage

  • @wjn777
    @wjn777 Před 21 dnem +1

    Interesting project. Many ways of achieving the same goal but since you have power and WiFi close by, this is a nice simple solution. Thanks for sharing

  • @libertine5606
    @libertine5606 Před 25 dny +2

    Very well explained.

  • @danahoward316
    @danahoward316 Před 25 dny +2

    Nice project. Well done video.

  • @PauloAbreu
    @PauloAbreu Před 23 dny +1

    What an awesome project! Thanks for sharing!

  • @IvanDorozhkin
    @IvanDorozhkin Před 25 dny +2

    So, next project - autonomous drone, moving new parcel to home?)

  • @nicohofmann9510
    @nicohofmann9510 Před měsícem +1

    The only Thing i can say is WOW! Great Video! That gave me a lot of inspiration. Keep on going! 🙂

  • @MrDead1975
    @MrDead1975 Před 22 dny +1

    you could also use a light sensor, in a sealed, no light box 0 lux is the norm, if you get a lux spike you know the box has been opened.
    another option would be a vibration sensor on the lid.

    • @projecttimetech7022
      @projecttimetech7022  Před 19 dny

      Yeah, I considered the light sensor, or mag sensor for the door, but neither of those tell me if there's something actually in the box at the moment. Using something like a prox sensor, we can have a notification displayed as long as there is "stuff" in the box, and have the notification disappear when the box is actually empty.

  • @Tntdruid
    @Tntdruid Před měsícem +2

    Automat everything 👍

  • @Piasecznik72
    @Piasecznik72 Před měsícem +1

    Consider mounting it on the bottom of the box hidden under some kind of second floor. Then you can detect even thin envelope. Also open box sensor with some kind of alarm when it is open with parcel in it.

  • @mikegodin23
    @mikegodin23 Před 27 dny +1

    Muito bom:
    Ganhaste um novo seguidor....

  • @AzzamDaaboul
    @AzzamDaaboul Před měsícem +1

    Many thanks for sharing this project. Could you please explain more how we can create our own conditions in HomeAssistant like you did?

    • @projecttimetech7022
      @projecttimetech7022  Před měsícem

      I will. I plan to have quite a few more home assistant and ESB home projects coming up soon. I have automated a lot of interesting things, and I want to share a lot more of them. Definitely stay tuned.

  • @truenorth9508
    @truenorth9508 Před měsícem +1

    Great job! May want a notification when package is removed.

  • @gordon861
    @gordon861 Před měsícem +1

    Did a similar thing for my parents (not Home Assistant capable) using an Aqara Tilt Sensor and just stuck it to the lid. Box gets opened, they get a pop-up on their phones.
    I would probably add a magnetic sensor to the door just to log that the box has been opened, as I'm not sure of the beam spread of the sensor, or use an ESPcam board to visually check.

    • @projecttimetech7022
      @projecttimetech7022  Před měsícem

      I had initially thougt about using an "open/close" type sensor, but it would prevent the "awareness" of packages, it would only tell me if the box was opened/closed. Good example of this would be multiple deliveries in one day.

  • @giannisd961
    @giannisd961 Před měsícem +1

    nice project man well made. You could add a light sensor for future automations

    • @projecttimetech7022
      @projecttimetech7022  Před měsícem

      That's interesting you mention that. I was actually considering adding a light sensor inside the box that will notify my phone anytime the light level goes above a threshold and then drops below a threshold. Basically that would tell me that the box had been opened and closed.

    • @projecttimetech7022
      @projecttimetech7022  Před měsícem

      I was actually considering that. Using a light sensor to trigger a notification anytime the light level went above a certain threshold and then drop back down. Basically that would be an easy way of seeing that the box is open then closed. Thanks for the suggestion that's awesome

  • @JoshFisher567
    @JoshFisher567 Před měsícem +1

    I did the same thing only I used an aqura contact sensor at my parents house, it sends a text message and does a voice announcement on their sonos soundbat. My Mom thinks im a wizard but mail delivery there ramges from 7am to 9PM so tjey were checking ot multiple times a day. Extremely easy to do. Se.comcept, aitomation triggered when comtact sensor is open.

  • @meszarosrob
    @meszarosrob Před měsícem

    Nice project 👍. You might consider expanding the number of sensors with an additional magnetic one that would notify you on your phone when the door has been opened.

  • @ChrisS-oo6fl
    @ChrisS-oo6fl Před měsícem +1

    Add a cheap load cells under a platform. More free data and info on what may be delivered.

  • @phankins11
    @phankins11 Před 12 dny +1

    This was a great Guide! I'll be using this to tell me the salt level in my water softener! I do have one quick question. You mentioned deep sleep for the D1 mini at some point. I'm curious to know if you've ever gotten hat to work? It would be great to know how to do deep sleep with the d1 mini for things like battery operated temp sensors, but I haven't found any things that works for this yet, shy of manually tripping the reset. Any ideas?

    • @projecttimetech7022
      @projecttimetech7022  Před 12 dny

      As I understand it, inside YAML for the device, it's as simple as adding deep_sleep, then a run_duration and sleep_duration. I've not personally worked with it, but I have a project about to start that's going to need it.

    • @phankins11
      @phankins11 Před 12 dny

      @@projecttimetech7022 Thanks for the reply! I'm afraid its not as simple as it seems. I have used that very configuration and it doesn't work. I've not found conclusive documentation on whether or not its supported in a software only config. Meaning, you cannot wake it out of deep sleep without some sort of manual intervention like a button push. Think the ole Amazon smart buttons, where they would just sit there until you pushed the button and then it would automatically order the item it was configured for (if you remember those). I'm willing to bet that what you'll run into is that you'll see it go to seep and never wake up. I certainly hope you get it figured out tho! I'll be following along to see if you do. And, if I get it figured out, I'll come back here an update you :)

  • @pneumantic6297
    @pneumantic6297 Před 26 dny +1

    An i2c address is usually fixed and sits within the datasheet. Also, for future reference, there are also door opening sensors (like a block with a magnet in it) and you can just detect when the doors open. Keep making videos. We need more people doing this. Some may ask why you are so lazy or "just by this". If it weren't for people like us who like to design things the world would be just dudes with sticks.

  • @dnzrobotics
    @dnzrobotics Před měsícem +1

    👏👏👏

  • @Tntdruid
    @Tntdruid Před měsícem +2

    The Esp32 C3 Mini is 50% less size than the D1 mini.

  • @TheUnofficialMaker
    @TheUnofficialMaker Před měsícem +1

    I would just use a tilt switch or magnetic contact but nice project.

  • @zeero4ever
    @zeero4ever Před měsícem +1

    2:25 I have a large box of about 100x40x40cm and my delivery instructions say "black box at house wall" as delivery location. Delivery services still put boxes on top of it instead of in it...

  • @cambodialaos
    @cambodialaos Před 24 dny +1

    what if the parcel is ie. 2" x 2" x 2" and placed in the very corner of your box? I don't know anything about the hardware, but would it still function as expected?

    • @projecttimetech7022
      @projecttimetech7022  Před 24 dny

      I think it would miss it in that case. In looking at my parcel delivery history, all of them have been very close to the center front. So far, we've had about 15 deliveries and none have missed the mark. If we start to have issues, I'll add another TOF sensor to the board.

  • @marosmincak5754
    @marosmincak5754 Před 9 dny +1

    What about a pressure sensor? The box may be small in a corner of the box

    • @projecttimetech7022
      @projecttimetech7022  Před 9 dny +1

      I had the same thought. So far each package has been close enough to the beam to work. It even worked with a thin padded mailer.

  • @bawitdaba1337
    @bawitdaba1337 Před měsícem +2

    Wouldn't it use less battery and have the same effect if it was using an open/close contact sensor whenever the box is opened?

    • @projecttimetech7022
      @projecttimetech7022  Před měsícem

      It would however, an open close sensor would only tell me that the locker had been opened and closed. It wouldn't actually have any knowledge that there were actual contents inside the box. That's what I was going for. I considered the switch and I also considered using a photo cell, but ultimately scrap those ideas in favor of time of flight. Also since I'm powering it directly, battery power is really not an issue.

    • @hagak1679
      @hagak1679 Před měsícem +2

      @@projecttimetech7022Combine the 2. Use the open/close sensor to wake the micro and then once the lid is closed take a distance reading and transmit. This way you get the "accuracy" you are looking for and still have the unit in deep sleep 99% of the time.

    • @ChrisS-oo6fl
      @ChrisS-oo6fl Před měsícem

      @@hagak1679add a load cell and gauge the size and type of package. Adding a contact sensor is a good idea to know the box was left open for any reason though.

    • @projecttimetech7022
      @projecttimetech7022  Před měsícem

      @@hagak1679 Great idea!!

  • @b00573d
    @b00573d Před měsícem +1

    i dont have the distance you do, but i was able to put a Third Reality Zigbee motion sensor in my mailbox to notify me. It takes triple-a batteries and has some decent power management so it has been quite a while since I have had to change batteries. I have tried other Zigbee door/window sensors and even a Z-Wave long range door/window sensor, but neither have had the distance that this particular motion sensor has.

    • @JoshFisher567
      @JoshFisher567 Před měsícem +1

      Using an Aqara contact sensor over zigbee and it works great. Odd that you had distance issues. It's been in place well over a year and the battery is still at 75% (watch battery)
      I'm surprised you had issues over Zwave. I listen to the creator of Home assistant say the next device they released is going to be a Z-Wave adapter because it's distance advantages. When. doin a test with a "new" Zwave and "Old" Zwave device (I'm assuming new is a newer protocol longer distances) they were still able to communicate at 0.7 miles outside.

    • @projecttimetech7022
      @projecttimetech7022  Před měsícem +2

      Thanks for sharing

    • @b00573d
      @b00573d Před měsícem

      @@JoshFisher567 my mailbox is aluminum so I’m sure that reduces range.

    • @JoshFisher567
      @JoshFisher567 Před měsícem

      @@b00573d Yes, Zigbee is very close to the 2.4Ghz band and metal of any kind is the worse things for WiFi,. Large metal objects can almost.wioe out your bandwidth and signal. A mailbox may not be enough but I also don't know how far you near Zigbee radio or repeater device is, which is obviously another huge factor.
      I watched an interview with the guy who created HA and he said the next hardware device they were going to release was a Z Wave adapter and during the interview he said with a Z Wave "new" device and "old" device (I'm assuming that he meant the protocol version so new would possibly have longer range) that they were able to communicate at 0.7 of a mile outside.
      He was at a Z Wave conference or something and he said there wasn't anywhere in the hotel where 2 devices couldn't communicate so not just an outdoor thing.
      That's impressive. I never used Z Wave before personally.. It's a lot cheaper than LORO, which still wins by a lot but more expensive. Might be worth some research for a long distance solution if needed.

    • @JoshFisher567
      @JoshFisher567 Před měsícem

      @@b00573d metal is the worst thing for WiFi and Zigbee is pretty much WiFi slightly off the 2.4Gjz frequency. They also attract it and absorb it. There is a reason antennas for WiFi are metal.
      Watched an interview with the guy who created HA and he said next hardware they release is going to be a z wave adapter which surprised me. Then he said they couldn't communicate at 0.7 of a mile with it and he was at a Z Wave conference. He also said there was nowhere in the hotel that 2 devices couldn't communicate over z wave. I had no idea it had that type of range and have never used it.

  • @Electronieks
    @Electronieks Před 23 dny +2

    Where i can find your yaml?

    • @projecttimetech7022
      @projecttimetech7022  Před 20 dny

      esphome:
      name: parcelbox
      friendly_name: ParcelBox
      esp8266:
      board: esp01_1m
      # Enable logging
      logger:
      # Enable Home Assistant API
      api:
      encryption:
      key: "REDACTED"
      ota:
      password: "REDACTED"
      wifi:
      ssid: !secret wifi_ssid
      password: !secret wifi_password
      i2c:
      sda: GPIO4
      scl: GPIO5
      scan: true
      id: bus_a
      sensor:
      - platform: vl53l0x
      address: 0x29
      name: "Distance"
      update_interval: 20s

  • @jerrygaguru
    @jerrygaguru Před 25 dny +2

    I would suggest you add a camera also, You never know why or for what reason you'll need it, but eventually you regret not having one.

    • @projecttimetech7022
      @projecttimetech7022  Před 24 dny

      Yeah, this is a very good suggestion.

    • @jerrygaguru
      @jerrygaguru Před 24 dny +1

      @projecttimetech7022 a cheap bling camera works great. woot is wear I get mine, I buy them on close out, I have box of them I never know when need 1. I am doing 1 for 3D printed birdhouse I am making right know.

    • @Electronieks
      @Electronieks Před 23 dny

      Esp32 cam has maybe a spare io pin

    • @jerrygaguru
      @jerrygaguru Před 22 dny +1

      @Electronieks Yeah, for that I would just grab one of the car backup cameras and
      it comes with everything to mount in the top of the box.

    • @Electronieks
      @Electronieks Před 22 dny

      @@jerrygaguru and homeassitant ?

  • @SirTodd.
    @SirTodd. Před 18 dny +1

    what if they dont place the package directly under the TOF sensor?

    • @projecttimetech7022
      @projecttimetech7022  Před 18 dny +1

      So far, we've had about 17 packages delivered and so far every one of them has broken the beam. Makes me question how large the beam pattern is.

    • @SirTodd.
      @SirTodd. Před 17 dny +1

      @@projecttimetech7022 well that is awesome! good point on the spread, I didn't even consider it.

    • @projecttimetech7022
      @projecttimetech7022  Před 17 dny +1

      @@SirTodd. Yeah, I was actually worried about it when I built it.

  • @ericcxxxx
    @ericcxxxx Před 27 dny +1

    no such thing as smart items. smartphone smart computers it's only a sales gimmick....

    • @projecttimetech7022
      @projecttimetech7022  Před 27 dny

      Yep

    • @pneumantic6297
      @pneumantic6297 Před 26 dny +3

      Not really true, would you really compare a smart phone to a rotary phone?

    • @ericcxxxx
      @ericcxxxx Před 26 dny

      Yes I would smartphone is as Dumb as a rotary phone

    • @jamess1787
      @jamess1787 Před 24 dny

      Hmm, sending wireless radio signals is not the same as opening and closing a circuit. Lots of engineering involved to do it and connect thousands of handsets simultaneously to a cell tower.
      I'd consider this parcel box "smart", it could be as simple as a light bulb on a flip-flop/relay for a yard light, if a parcel is in the box.

    • @dwang085
      @dwang085 Před 20 dny

      So brave