Make your bed SMART with ESP32 and Home Assistant

Тәжірибелік нұсқаулар және стиль

Learn how to make your bed smart with ESP32 and Home Assistant in this DIY tutorial.
In this short tutorial I will be using the well known ESP32 along with some cheap accessories in order to make your bed SMART!
Flexible resistors:
www.aliexpress.com/item/10050...
ESP32:
s.click.aliexpress.com/e/_DCz...
Brakeout Board:
s.click.aliexpress.com/e/_Dm4...
ESP32 pinout:
www.electronicshub.org/esp32-...
ESP Home yaml addon text:
binary_sensor:
- platform: gpio
pin:
number: 12
inverted: true
mode:
input: true
pullup: true
name: Person 1
device_class: occupancy
filters:
- delayed_on: 5s
- delayed_off: 30s
- platform: gpio
pin:
number: 13
inverted: true
mode:
input: true
pullup: true
name: Person 2
device_class: occupancy
filters:
- delayed_on: 5s
- delayed_off: 30s

Пікірлер: 18

  • @HATipsByLarry
    @HATipsByLarry2 ай бұрын

    Good Video. I use this as well but use the resistor method. Also use a VL53LOX time-of-flight sensor so it can tell if i'm laying down or just sitting on the side of the bed. Also use a PIR sensor under the bedside table so when my feet hit the floor when i get out of bed to go to the bathroom for example it can turn on a LED strip i have under the bed.

  • @TricksAndThings

    @TricksAndThings

    2 ай бұрын

    Thank you for the comment. that is very interesting approach that you took :). knowing even when you are on the side is a mega cherry on top :)

  • @adfjasjhf

    @adfjasjhf

    2 ай бұрын

    Interesting take with the TOF sensor. Did you mount it on your ceiling or how does it know that you are laying down?

  • @HATipsByLarry

    @HATipsByLarry

    2 ай бұрын

    ​@@adfjasjhf At first i put it in a small project box and stuck it to the wall at the head of my bed.. Worked well, but had a poor wife approval factor. So cut a hole in the drywall about 8 inches from the edge of the bed and about 15 inches above the mattress. Then install a blank plate over the opening after drilling a hole for the TOF sensor. Also added a TTP223 capacitive touch sensor to the blank plate to turn on/off my bed tables light and other devices. Also added a few other sensors to the MCU for various other tasks. A BME280 Temp/humidity sensor , a BH1750 light/lux sensor, a LD2410C mmWave presence sensor higher up in the wall. 😀

  • @adfjasjhf

    @adfjasjhf

    2 ай бұрын

    @@HATipsByLarry Ah, thanks! I'm in the EU and we have brick walls so that's not feasible haha. I guess I could make a way how to mount the TOF sensor at the bottom of the edge of the bed to see if there are any feet. Although it might not be that reliable as you have. Shouldn't some mmWave sensors be able to detect if you are lying down as well?

  • @HATipsByLarry

    @HATipsByLarry

    2 ай бұрын

    @@adfjasjhf there are some mmWave sensors that can tell if you fall down yes. They have to be put above in the ceiling and from what I've heard are not that reliable.

  • @MarkWilsonUK
    @MarkWilsonUK2 ай бұрын

    Great idea. Thanks for the video. Do you have to load some software on the ESP32 board too?

  • @TricksAndThings

    @TricksAndThings

    2 ай бұрын

    Thank you for the comment!. Yes the ESP 32 must be loaded with ESP Home. In this days this can be done in 2 min via the web browser. No need for complicated commands. I can make a #short video if needed to explain how it can be done.

  • @MarkWilsonUK

    @MarkWilsonUK

    2 ай бұрын

    @@TricksAndThings thanks for this - I will give it a go when my ESPs arrive in a few days…

  • @MarkWilsonUK

    @MarkWilsonUK

    2 ай бұрын

    @@TricksAndThings Thank you for replying. I'll see if I can work that part out... but I'm sure people will appreciate a video if you get the time!

  • @madtyzz2219
    @madtyzz22192 ай бұрын

    Great video! 👌😁 Is there any way to read the actual pressure that is applied or am I dreaming of such a thing? 😂

  • @TricksAndThings

    @TricksAndThings

    2 ай бұрын

    Thank you for the comment. Yes there is!. Same parts just an extra resistor and using the 3.3v output instead of ground + some math. I will try to get some time and also show the "advanced" version. The entire system turns into a giant scale and depending on the registered value it can tell you who is sitting on the bed :)

  • @Durosity

    @Durosity

    2 ай бұрын

    @@TricksAndThingsthat could be VERY useful! I hope you make a video on that!

  • @adfjasjhf

    @adfjasjhf

    2 ай бұрын

    Just look for FSR pressure sensor and you'll find a great post on home assistant forum :)

  • @xyzheng9672
    @xyzheng96722 ай бұрын

    Hi there! really impressed by your channel and would like to collab with you, just wondering how can we contact u? Thanks!! Sienna from PCBWay🥰

  • @davidtjac
    @davidtjac2 ай бұрын

    Hi, maybe i missed this. I have large bed and very heavy mattress. Presumably to get two people notification i need two strips? Also will the heavy mattress set it off or is thrre a way of setting a zero point once installed?

  • @TricksAndThings

    @TricksAndThings

    2 ай бұрын

    Hi, thank you for the comment. Indeed for 2 side monitoring you will need 2 strips (one for each side). I also have a heavy mattress and there are no issues since the strip is not that sensitive. I you somehow do encounter false trigger then you will need to convert it to the advanced method (you have to add a resistor and use different pins) that can actually trigger the status based on the measured weight. I will try to also show that version in a video when I get some free time :)

  • @hiscottocsih

    @hiscottocsih

    2 ай бұрын

    @@TricksAndThings Would love to this please as i could then tell if my child is on the bed and automate Alexa to tell him off!!!

Келесі