# Xbee 3 micropython sleep\_now()

**URL:** https://forums.digi.com/t/xbee-3-micropython-sleep-now/31809
**Category:** XBee - Zigbee
**Created:** [July 17, 2024, 7:38pm UTC](https://forums.digi.com/t/xbee-3-micropython-sleep-now/31809 "2024-07-17T19:38:14Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://forums.digi.com/u/Grzegorz)
#### Post date: [July 17, 2024, 7:38pm UTC](https://forums.digi.com/t/xbee-3-micropython-sleep-now/31809/1 "2024-07-17T19:38:14Z")

</div>

Hello everyone. I use the XB@-24 (Digi Xbee 3 ZigBee 3, v. 1013) with MicroPython. In the program loop, I use the function `sleep_ms_count = xb.sleep_now(2000, True)` to put the system to sleep for 2000 ms with the possibility of waking up early with a button press. Everything works fine, but occasionally, after start sleeping, the system goes into a complete sleep and does not wake up either after the set time or by pressing the button. Only turning off the power helps. What could be the reason for this? I have been searching for a few days and checked everything, but the problem still occurs.

---

<div class="post-metadata">

### Author: ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)
#### Post date: [July 18, 2024, 12:33pm UTC](https://forums.digi.com/t/xbee-3-micropython-sleep-now/31809/2 "2024-07-18T12:33:03Z")

</div>

I would suggest submitting a case with Digi Support by logging into [https://my.digi.com/](https://my.digi.com/). When doing so, I would suggest providing the radios configuration files as well as the code you are working with.

---

<div class="post-metadata">

### Author: ![Matthew\_Findlow](https://avatars.discourse-cdn.com/v4/letter/m/e47c2d/32.png) [@Matthew\_Findlow](https://forums.digi.com/u/Matthew_Findlow)
#### Post date: [August 6, 2024, 12:09am UTC](https://forums.digi.com/t/xbee-3-micropython-sleep-now/31809/3 "2024-08-06T00:09:25Z")

</div>

I have the same problem, but using Digimesh 3012.

---

<div class="post-metadata">

### Author: ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)
#### Post date: [August 6, 2024, 11:54am UTC](https://forums.digi.com/t/xbee-3-micropython-sleep-now/31809/4 "2024-08-06T11:54:35Z")

</div>

I would suggest adding a WDT to your code. I would also suggest making sure you are using the GB function.

---

<div class="post-metadata">

### Author: ![Grzegorz](https://avatars.discourse-cdn.com/v4/letter/g/58f4c7/32.png) [@Grzegorz](https://forums.digi.com/u/Grzegorz)
#### Post date: [August 9, 2024, 2:47am UTC](https://forums.digi.com/t/xbee-3-micropython-sleep-now/31809/5 "2024-08-09T02:47:00Z")

</div>

> [@mvut](#):
>
> the GB function.

Unfortunately, the WDT function does not work when the circuit is asleep.

---

<div class="post-metadata">

### Author: ![mvut](https://sea2.discourse-cdn.com/flex016/user_avatar/forums.digi.com/mvut/32/31_2.png) [@mvut](https://forums.digi.com/u/mvut)
#### Post date: [August 9, 2024, 12:50pm UTC](https://forums.digi.com/t/xbee-3-micropython-sleep-now/31809/6 "2024-08-09T12:50:39Z")

</div>

That is correct. But it can help. See [Digi MicroPython Programming Guide](https://www.digi.com/resources/documentation/digidocs/90002219/#reference/r_class_wdt.htm?Highlight=WDT)
