ESP32 wake from Deep Sleep | ESPHome and HomeAssistant + MQTT

  Рет қаралды 12,407

OMG The Cloud!

OMG The Cloud!

Күн бұрын

Пікірлер: 13
@bgable7707
@bgable7707 6 ай бұрын
Great video, but, 50% + was on setting up the secrets file, at about 6mins you got to talking about setting the ON flag and your fall back method. Kind of sped through that park.
@dhavalshukla6615
@dhavalshukla6615 2 жыл бұрын
This is nice, but what if I had a project in which I wanted to read a digital pin when the button pin was pressed to connect to the Bluetooth? Been trying to connect to the bluetooth that way but it just immediately rushes past it, how can I effectively let it, let me establish serial connection, send text back and forth and then disconnect the bluetooth upon which it can go back to sleep? Any suggestions?
@farazanwar5208
@farazanwar5208 3 жыл бұрын
I would rather go like this: 1. Each new update on server will have update version. 2. On each update the device will save this update version as its current version in NVS. 3. On each wake up, device will compare its current version (retrieved from NVS) with available version on server. 4. If the available version is greater than current version, the device will update. Other wise go to sleep again after performing its task. 5. Update message on broker will be retained there for other devices to wakeup and update. 6. Update message will change when new update is available.
@OMGTheCloud
@OMGTheCloud 3 жыл бұрын
I like this approach, and I think it could be done. One thing to remember is an ‘update’ in ESPHome firmware for an IoT device is not like a regular software revision update, since it is compiled real-time. An update is a functional change to the code initiated by you, for example changing what the sensor does or how it reports its’ data, so you wouldn’t have all your sensors ‘update’ wholesale. But to your point, once you compiled the new firmware, I think it would be possible to have that successful compile action then send the retained wakeup MQTT message for that device so the next cycle it wakes up and stays awake, ESPHome then sees the device and pushes the new firmware, and removes the MQTT retained message. I think this could be done!
@stefancremers9304
@stefancremers9304 2 жыл бұрын
on minute 2.20 you say "edit the file and it will create it", I am new to home assistant but what command do you use?
@OMGTheCloud
@OMGTheCloud 2 жыл бұрын
Good question! Watching that back, you’re absolutely right, I assumed everyone knew exactly what I was talking about 😂 the command is: nano secrets.yaml Another option which is actually a bit easier, is if you have ESPHome add-on installed in Home Assistant, when you’re in the ESPHome UI menu, there’s a “Secrets” button in the upper right of that window. Click that, and you’ll be able to edit your “secrets.yaml” right in the webUI without having to get in to the SSH terminal. I hope this helps!
@ThereWillBeCake
@ThereWillBeCake 3 жыл бұрын
Thanks for the video. I have the sleep function working well but the temp and humidity card on the dashboard is now showing as unavailable. Still when I click on the card and look at the graph of the temp data, I can see it is still logging it. Is there a way to get the dashboard card to show the most recent value?
@OMGTheCloud
@OMGTheCloud 3 жыл бұрын
I've encountered this too with battery sensors, and there's an easy fix for this! In the "mqtt:" section of your ESPHome config for the device, add in: birth_message: will_message: ^^ Both of those as blank items. This way it will not send a "will_message" of anything, which if you're familiar with MQTT is the 'last will and testament', ie "it died" message. This should take care of it! Thanks for watching!!
@boopeshkumarprabhakaran
@boopeshkumarprabhakaran Жыл бұрын
hi any updated version of it? I'm trying to make a door sensor based on esp deep sleep(battery powered). If you tried something similar please share.and thanks for this great video❤️
@OMGTheCloud
@OMGTheCloud Жыл бұрын
Hey there, thanks for the interest! No updates to this build, it was just a proof of concept. For your idea of using a door sensor with ESP deep sleep mode, this can certainly be done: In that case, rather than using a time event in your code to wake up the ESP from deep sleep, you would use an interrupt pin to wake it. This way when your door sensor triggers, that event itself would wake the ESP, and trigger the event (presumably to Home Assistant). Read the data sheet for the particular model of ESP you are using, to understand which pin or pins can be used to wake from deep sleep, and whether they need a pull-up or pull-down resistor to prevent false triggers. Cheers!
@boopeshkumarprabhakaran
@boopeshkumarprabhakaran Жыл бұрын
@@OMGTheCloud thanks for responding...any idea which gpio can be used to wake the device using the reed switch in esp12f?
@nicolascumu7044
@nicolascumu7044 3 жыл бұрын
404 error on provided link. Thank you for the video
@OMGTheCloud
@OMGTheCloud 3 жыл бұрын
Thanks, I botched the timezone on the scheduled post on my website 😅 It should be good now 👍
ESPHome OTA Updates for Deep Sleep Devices
12:05
Tech Dregs
Рет қаралды 1,9 М.
MQTT 101: Integrate your DIY Devices into Home Assistant
28:06
ResinChem Tech
Рет қаралды 72 М.
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 13 МЛН
Just Give me my Money!
00:18
GL Show Russian
Рет қаралды 1,1 МЛН
So Cute 🥰
00:17
dednahype
Рет қаралды 46 МЛН
escape in roblox in real life
00:13
Kan Andrey
Рет қаралды 27 МЛН
The ESP32 Wake-Up Call: Exploring External Triggers in Deep Sleep Mode (ext1)
26:32
Programming Electronics Academy
Рет қаралды 8 М.
Getting started with ESPHome
15:24
Let's Automate
Рет қаралды 47 М.
DIY WIFI Rain Gauge, powered by Home Assistant
13:30
Smart Solutions for Home
Рет қаралды 35 М.
Best power saving mode - Much Deeper Deep Sleep ESP8266
10:30
DIY TECH BROS
Рет қаралды 97 М.
This is SO Much Better! Getting Started with ESPHome 2021
29:42
Everything Smart Home
Рет қаралды 332 М.
Beyond the Zzz's: ESP32's External Wake-Up in Deep Sleep Explored
14:05
Programming Electronics Academy
Рет қаралды 7 М.
Fake watermelon by Secret Vlog
00:16
Secret Vlog
Рет қаралды 13 МЛН