ESP32 Deep Sleep via Timer (off the mesh)?

Is it possible to put the t-beam into deep sleep via a timer using Meshtastic?

I’d like to put my t-beam’s into deep sleep and wake every few hours to take a soil moisture reading, I’m not sure if this is possible with Meshtastic, since I believe all of the power modes try to keep the lora radio on to receive messages.

Sorry fo the late comment: if you have a github-user it might be better to open a feature request here https://github.com/meshtastic/firmware/issues. You need of course reasonable amount of routers to forward those messages and keep the meshnet going. Edit: afterthought: have you considered using LoraWAN and maybe TTN for your IoT-devices

Thanks for the reply! I’ve looked into LoraWAN before but would prefer to stick with Meshtastic if possible as I like the platform / ability to only use ESP32 devices.

My hope is to maintain my existing mesh but add a couple “sensor only” nodes that would deep sleep (entirely) only waking every 30 minutes or so to send telemetry data.

I’ll log into github and submit a request.

There is already a sensor role for just this purpose.

I found this docu https://meshtastic.org/docs/settings/config/device#role but no mentioning that it will go into deep-sleep

1 Like

I saw that, which is great, but it didn’t seem like it was putting it into deep sleep with everything off (I’m assuming it keeps the radio on), I just tested it and after 43 hours it’s at 10%.

For another project I use LilyGo T-Sim7000’s which is an ESP32 + Cellular board and by putting it into deep sleep at 2 hours a time I’m able to get up to a month. I’m not comparing apples to apples but was hoping to do something similar with t-beams and Meshtastic.

If it’s not an option currently I’m not complaining, just wanted to know – if I was a better developer I’d try to submit a change myself.

You would want to use an external MCU to do the deep sleep wakeup. A nrf52 in deep sleep can be woken up via GPIO.

OK, and how would ESP32 go to deep sleep - you described how to wake it up. There is one scenario where TBeam goes to deep-sleep namely when battery is less than 10%. It will then wake up after sdsSecs and happily start doing its tasks. What is missing is a user settable timer that will call deep-sleep - rest is already built in

Pull requests are welcome.