The Smallest WiFi Button in the World (ESP8266, MQTT, IFTTT)

Поділитися
Вставка
  • Опубліковано 9 лют 2025
  • This tutorial is showing how to built a small WiFi/Dash button for an ESP-01 module. A button and a LiPo Battery is added. The case is 3D printed. The software is based on Mongoose OS and sends notifications to an MQTT server and IFTTT over a direct web link. The video is also showing a possible use case for such a button.. enjoy watching.
    The code can be found here:
    github.com/bit...
    Please support my work on Patreon:
    / bitluni
    Links to the parts (I get small cut at no extra cost for you):
    Esp-01
    s.click.aliexpr...
    ebay.to/2vVTznf
    amzn.to/2wgvlqy
    Programmer:
    s.click.aliexpr...
    ebay.to/2wwljku
    amzn.to/2uXVACb
    Battery:
    s.click.aliexpr...
    ebay.to/2vguaCN
    amzn.to/2wg1HRX
    Charger:
    s.click.aliexpr...
    ebay.to/2xsX83X
    amzn.to/2w4htNl
    Mongoose OS:
    mongoose-os.com/

КОМЕНТАРІ • 328

  • @NoviceRobot
    @NoviceRobot 7 років тому +345

    The cat feeder machine got me!

    • @bastelbudi
      @bastelbudi 7 років тому +3

      same here xD i need something like this for my chickens

    • @oetken007
      @oetken007 7 років тому +1

      Me too :-)

    • @mitropoulosilias
      @mitropoulosilias 7 років тому +5

      i need that to feed my dad :-(

    • @dusnoki
      @dusnoki 6 років тому +2

      I laughed way too hard :)

    • @toadmadhatter
      @toadmadhatter 5 років тому

      lol I came here to say that

  • @iFireender
    @iFireender 5 років тому +165

    Inefficient, imo. You went for full software, but with a simple, tiny MOSFET or transistor of any kind, you could increase the battery life massively.
    Instead of going for deep sleep, make the pushbutton actually supply voltage to the ESP; once the esp boots up, make it latch the power supply for itself, do the WiFi stuff, and then unlatch the power supply (simple GPIO set/reset) - battery is not connected anymore, 0 power drawn. No need for deep sleep here, as it doesn't have to wake up on its' own.

    • @moth.monster
      @moth.monster 5 років тому +14

      His goal was to minimise added hardware, I think. A month of battery life is good enouhgh.

    • @SNK1995
      @SNK1995 5 років тому +1

      Thanks Peter... :)

    • @AugustoCarmo
      @AugustoCarmo 5 років тому +10

      that solution will not increase the response time of the button?

    • @SNK1995
      @SNK1995 5 років тому

      @@AugustoCarmo , Tell me more.. :)

    • @AugustoCarmo
      @AugustoCarmo 5 років тому +1

      @@SNK1995 I really don't know, I'm just asking... I don't know the time difference to "boot" and send the MQTT message when the ESP is off or in deep sleep.

  • @dnyaneshvarsalve
    @dnyaneshvarsalve 3 роки тому

    You just recalled me this powerful yet small wifi board.
    Nice one

  • @pocketscience911
    @pocketscience911 4 роки тому +3

    This is nice - especially the cat feeder! :) I did something similar, albeit larger, to control Hue lights using a Wemos D1. To get the required latency I went for static IP addresses, so no waiting on DHCP. Works great in a home environment. Didn't use MQTT or anything - just straight API calls to the Hue bridge.

  • @crazieeez
    @crazieeez 6 років тому +15

    "Oh damn, I forgot to feed the cat." Gets to me. Good one! :D

  • @lenaroseguera1241
    @lenaroseguera1241 7 років тому +3

    I just found your channel and now is my favorite electronic tutorials channel 👽

  • @MjwAllMusic
    @MjwAllMusic 7 років тому +5

    Loved that feeding the cat part haha!

  • @ytfp
    @ytfp 7 років тому +3

    Once again excellent in every way and made me laugh. Sooo happy your back making videos, one of my all time favorite makers and youtuber.

  • @madskillz1o1
    @madskillz1o1 4 роки тому +1

    This video is exactly what I was looking for, thank you.

  • @siddacious
    @siddacious 7 років тому +1

    I am annoyed that I didn't find your channel until now. I am also amused by your cat.

    • @bitluni
      @bitluni  7 років тому +1

      thanks, I'm still happy that I made 30k subs so far :-)

  • @isaacrafaelnunezservian708
    @isaacrafaelnunezservian708 3 роки тому

    ajajsjdaj the cat feeder needs a litle bit of love. Genial bro!

  • @Nicksperiments
    @Nicksperiments 6 років тому +1

    I rarely see Blender used for 3D printing. Very interesting

  • @ivan-spb
    @ivan-spb 5 років тому

    Super! Best and shortest full-circle video!

  • @madrian_hello
    @madrian_hello 7 років тому +11

    Man, your acting is the best. 😜

  • @Tarbard
    @Tarbard 7 років тому +2

    Nice, I like the case.

  • @joshuarosen6242
    @joshuarosen6242 7 років тому +6

    For just a few pennies more you can buy an ESP-01 programmer with a UART/flash mode switch.

  • @EricOnYouTube
    @EricOnYouTube 3 роки тому +1

    Why do you need 4.2V? I thought that was 3.3V device.

  • @James02876
    @James02876 7 років тому +3

    Do you have any plans to release the 3d model for the button? I'd like to print a few of those cases myself.

  • @CircsC
    @CircsC 3 роки тому

    6:25 Cat approves of current design. Says to push to production immediately.

  • @cbmeeks
    @cbmeeks 7 років тому +21

    Yeah, you might want to tweak the cat feeder...unless you want him to be 200 LBS. LOL

    • @morganaverynz
      @morganaverynz 6 років тому +1

      If cat is good then surely more cat is more good.

  • @fxtattoo
    @fxtattoo 4 роки тому

    Ok, you get my thumbs up for the feeding the cat joke. LOL!

  • @croydon21H
    @croydon21H 5 років тому

    Hi, I want to copy this, but I am not sure about your statement @3:58 is worrying. Is the case pressing a very tiny tactile button on esp01? Can you tell about the receiver. Thx

  • @k4k48g8fi3kk
    @k4k48g8fi3kk 7 років тому

    I screamed after i seen the cat feeder. Very good video

  • @freeelectron8261
    @freeelectron8261 6 років тому +2

    Nice job - very neat. That Li Po is the smallest I have seen. The cat feeder is still in Beta, I'm guessing? ;) Love the vid's :)

    • @NGC1433
      @NGC1433 5 років тому

      Earbuds like apple airpods have lipos in them, amongst other crap...

  • @darknessblades
    @darknessblades 6 років тому

    this is something i plan on creating.
    only then to controll a smart home.
    1 main controller with multiple override buttons
    1 timer switch
    that is send a command to the slaves to run the program at a set time.
    for example
    run program X1 at time 12:00
    run program X2 at time 18:00
    run program X3 at 19:00
    run program at: 20:00
    it needs a screen so you can easily set up times for each day of the week. {time setting will be in intervals of 15 minutes}
    with multiple settings like override program till time X.
    for example normally monday you have 2 4 programs, like on off on off (so it is on when you are at home but off when you are gone)
    but if you are at home on that day the override programming will keep the program for that day till X?
    {something like a holiday button for a smart thermostat}

  • @bjornotto98
    @bjornotto98 3 роки тому

    Hey I didn't really understand you at 4:19
    Did you say 50mAh Battery? 50mAh with current drawn of 50mA I only come to a battery live of 1hour:
    0.05Ah / 0.05A x 60 = 60 Min
    What am i doing wrong?

  • @jsmythib
    @jsmythib 6 років тому

    6:20 and you became a mandatory sub :) I finally got my esp-01 up and running. A great little board.

  • @TrasteIAm
    @TrasteIAm 7 років тому

    Perfect, i will definitely try this one. Thanks for yet another great video!

  • @maebedotme
    @maebedotme 4 роки тому

    Awesome video, I love how you made it with a single button even though it was at the expense of battery life.

  • @bartolo1780
    @bartolo1780 4 роки тому +1

    Hi, mongoose os that you use in the video is not the same as the version I download for windows?

  • @kke
    @kke 5 років тому

    The maximum deep sleep time is about 71 minutes, so this button will self-click almost hourly unless you write code that checks if the button is still pressed when the program starts up.

  • @kychemclass5850
    @kychemclass5850 3 роки тому

    What time elapses from the time the button is clicked and then the cat flap opened?
    Is the adafruit server reliable to connect to?

  • @VeteranTuner
    @VeteranTuner 3 місяці тому

    I know it wasn't yesterday.
    but where do you get this version of Mongoose OS with the WEB UI?

  • @TheSterrlingArcher
    @TheSterrlingArcher 3 роки тому

    Hi I would like build this project myself but it seems the mongoose os has been updated and I cant follow the steps you took at 1:21min to configure the wifi, any advice on how I can complete this step no that mongoose os has been updated ?

    • @rikuyonjuni
      @rikuyonjuni 3 роки тому

      seems like an entirely different installer now :/

  • @stevanastardust8487
    @stevanastardust8487 4 роки тому

    The ESP8266 chip isn't designed for that battery. You shouldn't go above 3.6v and a lithium polymer works at 3.7 to 4.2v when fully charged.

  • @vincenzo-patti
    @vincenzo-patti 3 роки тому

    Can you also use it for multi press le hold press? Is there a way ti do that? I can do it with tasmota but i wuold like do it with low energie consumation

  • @doro516
    @doro516 5 років тому

    to save battery you shouldn,t use the RST pin, instead of that, yu should use the button to feed source power to the VCC pin, thus the mini board Will be on only when your press the button.

  • @robhein
    @robhein 2 роки тому

    This was 4 years ago, can i buy a finished product like this somewhere? Banggood or aliexpress must have?!

  • @JensC919
    @JensC919 7 років тому

    I like your videos, I have similar projects in mind to what you show, and it looks like we both don't want to mess around with lots of microelectronics and soldering complex custom relays. Thanks for the videos! My gf will love the led strip I will copy from you :-)

  • @1q1q1q1q1q1q1qw
    @1q1q1q1q1q1q1qw 7 років тому

    what is the best and smallest option to use it with 230V i live in europa and an phone charger is big and uglie i would like to set up this next to my lligthswitch running 230 is there any cheap small solution

  • @gunjanpaul4372
    @gunjanpaul4372 7 років тому

    Hey Bitluni, I have tried your way of flashing the Esp8266, but as soon as I plug it in after the process stars, It freezes there. No more messages come, and the leds on the boards are still. Please help me out. My usb-to-serial converter uses a CP2102 chip.

  • @B4x4
    @B4x4 7 років тому +1

    I am a new follower. Thank you for å great show, and I will be checking out that Ota programming os... 👍👍
    Cheers from Norway

  • @jhana.2023
    @jhana.2023 6 років тому

    You are a artist. I do it. Cool. 1000 likes !

  • @MrRetep57
    @MrRetep57 4 роки тому

    Nice video!

  • @RC_Raceway
    @RC_Raceway 7 років тому

    Hello. I have tried to create the button in your tutorial. When I flash the board it says all done but the leds remain lit and the flash process freezes on the pc. There are ascii character output on the mongoose screen but it doesn’t allow me to add WiFi details for this button. Any ideas would be greatly received

  • @Karateschnitzl
    @Karateschnitzl 7 років тому

    Great Idea and great video!
    Keep it up

    • @bitluni
      @bitluni  7 років тому +1

      thanks.. I will :)

  • @croydon21H
    @croydon21H 4 роки тому

    Hi Bitluni, If you remove the pins..how are you going to upload any new sketch?

  • @BryanLeeRagon
    @BryanLeeRagon 6 років тому

    Is the connector for the battery charger just hooked up in parallel with the rest of the circuit? Can you charge the battery while the battery is still connected to the ESP provided that the ESP is in deep sleep? What happens if it's not in deep sleep? i.e. What happens if someone presses the button while it's charging?

  • @meierthomas
    @meierthomas 5 років тому +1

    Very inspirational! Your MEGA LED matrix got me hooked onto the journey of ESP32 and ESP8266. Have ordered a couple of components to get the LED matrix going. I'm conceptualising a few more projects and one thing that happens often is missing to lock the sliding windows. Here's the question: Taking the cue from the smallest Wifi switch in the world do you think it would be possible (or maybe you've done it already) to incorporate one part of a hall sensor into the casing housing the ESP which then registers a "closed" event when the lever of the window lock is in the locked position? In other words this setup checks for the lock in the locked position rather than the window/door shut - well I could possibly monitor both window shut and locked :)

  • @abpccpba
    @abpccpba 7 років тому

    Very nice work. Congratulations. New subscriber.

  • @JNET_Reloaded
    @JNET_Reloaded 5 років тому

    Can you make heating controll and thirmistat all wifi with a mini and can be set via webpage?

  • @RichardT2112
    @RichardT2112 5 років тому

    Feed the cat ..that amount of food will last longer than the battery... still brilliantly done!

  • @dennisbsutube
    @dennisbsutube 6 років тому

    Great Video! You mentioned using Direct Web Links versus using an MQTT site. Would this allow me to program the 8266 with a destination SMS mobile number without opening an MQTT or IFTTT type account? How can this be done? Thanks!

  •  4 роки тому

    Excellent humor. Good content . Yup
    Im in.

  • @hansdampf2529
    @hansdampf2529 4 роки тому

    @bitluni
    Hallo ich hätte da mal eine Frage:
    Wie hast du Mongoose Os installiert und auf den ESP
    hochgeladen, weil ich in dem Video "The Smallest WiFi Button ..."
    nicht sehr viel entnehmen konnte und ich keine vernünftige/verständliche/aktuelle Anleitung finde!
    Danke im voraus!

  • @panjann
    @panjann 6 років тому

    Hello, my ESP-01 doesn't wake up when I push the reset button. Any idea what could be the cause? Thanks.

  • @2madrobot
    @2madrobot 7 років тому +6

    Emergency Cat feeder - I need one ASAP!

  • @jobopolo
    @jobopolo 6 років тому

    Nice project!

  • @jackoziel8280
    @jackoziel8280 Рік тому

    I watched your videos they are very interesting and impressive
    Are you able to make a wifi or Bluetooth switch that can be operated with a smart phone
    Please advise
    Jack

  • @mstylesms
    @mstylesms 7 років тому

    Very nice! A quick question for you. Can this be written or wired so that it detects when a door opens or closes? Think of a garage door that may stay open or closed a long time and using a coin cell battery. Is this possible?

    • @onshisan
      @onshisan 7 років тому

      I don't think a 3V coin cell is necessarily appropriate, but conceptually the push-button switch could be replaced by a different sensor. For a door, which is necessarily not moving around, using a larger battery (or accessing mains power with an adaptor) would give considerable flexibility. But as mentioned elsewhere here, it would likely consume less power to have the sensor send a signal by some other, lower-power radio technology than WiFi to a bridge or hub... lots of ways to approach this problem :)

  • @prashantmanshrestha
    @prashantmanshrestha 3 роки тому

    can we send notification offline or locally with out internet??

  • @grindel80
    @grindel80 7 років тому

    Great work!!!

  • @RupinChheda
    @RupinChheda 7 років тому +3

    I am kind of confused. Firstly, can you run the esp from a >3.3V power source? And how is the reset kept pulled high with just the push button? Won't it go back to being low once you remove the finger? Or is it a two position switch?

    • @triularity
      @triularity 7 років тому

      He did say "do so at your own risk" using a direct 4.2v battery.

    • @gmiller123456
      @gmiller123456 7 років тому

      Those are 3.7v batteries, and in my testing with a benchtop power supply 3.7 is the cuttoff where they stop working. Works fine at 3.6v, 3.7v it hangs. It's possible these small batteries can't deliver enough current to keep the voltage above 3.6, or aren't fully charged.

    • @casemodder89
      @casemodder89 7 років тому +2

      Just make use of these LiFePo4 batterys ! 2,8-3,65volt and even easier to charge/trickle charged for ages without degradation of capacity.

  • @uiopuiop3472
    @uiopuiop3472 6 років тому

    The charger link for aliexpress is dead i think, it shows something called "20pcs U0301for iPhone 5S 6 6plus 6s 6s-plus fix repair blue display screen IC 4pins"

  • @darklord_ice
    @darklord_ice 4 роки тому

    Great project! would you share the .stl for the case? Thaaanks :)

  • @DreaMinder1
    @DreaMinder1 7 років тому

    Nice, but what the advantage of using mongooseos frimware? mJS API? I mean the same could be done with arduino IDE, am I right?

  • @Corgitronics
    @Corgitronics 7 років тому

    Very nice work, both the project and the video!
    Subbed.
    I found you on Patreon, might be good to put a link to your Patreon account in the description!

  • @picktrick1
    @picktrick1 6 років тому

    is it possible to make such a button with konttaktron? click the door open and go to sleep, click the doors closed

  • @stewartrv
    @stewartrv 7 років тому

    Am I missing something? I don't understand why the ESP8266 couldn't do this at power up? Then the button just needs to be a momentary power button, once you press it it powers the ESP8266 it connects sends the data and then its powered off again. Worse case you need a capacitor to keep it powered for 1-2 seconds. Then it would only use power when you actually press the button...

  • @janiwindsor
    @janiwindsor 6 років тому

    This man a legend

  • @MrHbpatel
    @MrHbpatel 7 років тому

    👍 my wish u could include wall button panel powered directly without lipo , similar to thermostat

    • @bitluni
      @bitluni  7 років тому

      more projects coming :)

  • @doxy612
    @doxy612 7 років тому +1

    Great vid and top work! Is there a possibility to get the STL file for the button?

  • @jonathanjuarezgarcia579
    @jonathanjuarezgarcia579 5 років тому

    Which IDE / toolchain do You use? In 6:31?

  • @piereligio_ds
    @piereligio_ds 6 років тому

    Hi, well done in this video! I've just a question. With this circuitry and Mongoose OS, could I make a button that turns off or on my Yeelights using LAN Control Protocol, without needing other devices, or also trigger IFTTT commands?
    LAN Control protocol enables prompt commands that you can trigger from the LAN network.

  • @Darieee
    @Darieee 6 років тому

    Beautiful - cat approves as well

  • @PremiumStyleLP
    @PremiumStyleLP 4 роки тому

    Hey, kann man sowas auch an 230 Volt Wechselstrom betreiben? (Mit Adapter natürlich) Wäre super, wenn man sich sein eigenes Smart-Home bauen will :)

  • @freeelectron8261
    @freeelectron8261 6 років тому

    Cool little iot button. Some would say its a bit loony but what would they know ;)

  • @hulladek3
    @hulladek3 6 років тому

    How about a BT version? Sends a BT low power signal a few times when the button is pressed. Set up a phone to search for low power BT signals and start assistant when it finds one.
    I have have a Chinese BT button but the thing needs constant connection for the phone lost features. And it can't be disable. That keeps the phone awake what drains the battery.

  • @docholliday7381
    @docholliday7381 6 років тому +1

    IS there a reason to use deep sleep instead of powering the chip down completely ?

    • @martinrocket1436
      @martinrocket1436 5 років тому

      Doc Holliday, theoretically, you can add a timer to deep sleep so that your button pings your server daily. You could use that to detect buttons with empty batteries.
      A downside of switching the power supply is that either the user needs to hold the button until it is empty or you need to solder a latch to it.

  • @samueljuuliversen5162
    @samueljuuliversen5162 6 років тому

    Will this work with a reed switch instead?
    Does the code run when you press the button? Or does it run when the button is released?

  • @SaumavaDas
    @SaumavaDas 6 років тому

    what's the name of the tool u used to hold the ESP while u solder?

  • @rico8192
    @rico8192 7 років тому

    I really like the big button. Can that be purchased somewhere or was that printed. Thanks

  • @officialnickname
    @officialnickname 6 років тому

    Does the board come with a way to determine the battery's voltage level (to avoid over discharging)?

    • @danielstellmon5330
      @danielstellmon5330 6 років тому

      He is using a separate board to charge the battery. Presumably the charge board does provide over charge protection.

  • @blueeyesvideos
    @blueeyesvideos 2 роки тому

    it would be nice if you can update this for 2022. The mongoose software has changed.

  • @HellaFunnyShorts
    @HellaFunnyShorts 7 років тому

    Cool project

  • @innovation4u336
    @innovation4u336 6 років тому

    Boom, nice tutorial boss

  • @platformkami2222
    @platformkami2222 7 років тому

    hallo Mr. i want to ask. how to make wifi speaker with nodemcu esp8266, thankyou

  • @eqisoftcom
    @eqisoftcom 6 років тому

    In your video you have an ESP-01 which is a 512kB version. However, the text in the video says 1MB version (which should be ESP-01S). Is ESP-01 sufficient for this project?

  • @sorhu72
    @sorhu72 7 років тому

    Hello how can you plug lipo directly without any resistor?

  • @akantifirst
    @akantifirst 2 роки тому

    Is there something like this on the market?

  • @flodachieftori
    @flodachieftori 6 років тому

    Awesome Project. I tried to build it myself and ordered the things over the links you provided. However, I am just not capable of flashing mongoose OS to my esp8266. I am on a mac and it always says that it will not fit in flash.. I did not found anyone with the same issue in the internet.. any suggestions or wisdom from you in this matter?

    • @scuderia888
      @scuderia888 Рік тому

      i'm lost when he tried to put GPIO 0 low at 0:57. I am not sure why he does that and how to do that. I hope you can help :)

    • @flodachieftori
      @flodachieftori Рік тому

      ​@@scuderia888 On some esp boards that is needed to be able to flash the program to the board. Otherwise you wont be able to upload it. Only needed while uploading.

  • @MetalDeepthroat
    @MetalDeepthroat 7 років тому

    Coole Idee !

  • @SoundGuy
    @SoundGuy 6 років тому

    Got a link for the box on Thingyverse? also a link to buy the button and the microswitch?

  • @blueeyesvideos
    @blueeyesvideos 2 роки тому

    how do I get this flashed on the esp8266??

  • @dualfever
    @dualfever 4 роки тому

    you have a lot more options than me on your mos tool

  • @Abbici
    @Abbici 2 роки тому

    Hallo...
    I like your WONDERFULL project!
    Can I ask you a stupid question?
    How long does that rechargeable battery last?
    Isn't it better for projects like these two AA batteries?
    @}-,-'---------
    Gianfranco

  • @krzysiojezyna3558
    @krzysiojezyna3558 6 років тому

    Great stuff

  • @hectyre
    @hectyre 7 років тому

    I've just recently subscribed and I'm really enjoying your videos. I've just bought a D1 mini and I was planning on putting mongoose on it. I have no experience with JavaScript, should I just jump right in or read a book on JavaScript first? I know a little C, PHP, Delphi/Pascal

  • @costenalolek973
    @costenalolek973 7 років тому +6

    What's the time between trigger and action after deep sleep?

    • @SierraGolfNiner
      @SierraGolfNiner 7 років тому +1

      Yea. I want to know the latency too. I assume since you're rebooting the device, it has to renegotiate wifi connectivity before sending the MQTT message. So it probably won't be super fast. I was thinking something like this could be cool for an IoT light switch, but even at a fast 2 seconds (my guess at fastest possible time), it'd be annoying.

    • @bitluni
      @bitluni  7 років тому +8

      yes, there is delay. It's a trade off to run it from a battery.. a faster way would be using an rf-transmitter and a station just like a remote... could be a project

    • @andreamitchell4758
      @andreamitchell4758 7 років тому

      so could this programmer flash a lixada H801 led controller that is based on 8266 ? what is the difference between this programmer and an FTDI USB to serial besides the connector ? is it just that the FTDI can flash more different types of chips and this can only flash arduino esp?

    • @msurguy
      @msurguy 7 років тому

      Something like Moteino would do

    • @mariusmotea
      @mariusmotea 7 років тому

      lixada H801can be flashed with any serial adapter, just be sure you first connect GPIO0 to ground. I recommend this firmware: github.com/mariusmotea/diyHue/tree/master/Lights/Arduino/Generic_RGB_CCT_Light . It is based on a custom PWM library that works much better.

  • @hamimadboy
    @hamimadboy 2 роки тому

    you didnt show anything about the reciver part. please explaine a little. thanks alot.