# How can I restart my WR31 device using python code?

**URL:** <https://forums.digi.com/t/how-can-i-restart-my-wr31-device-using-python-code/21097>\
**Category:** Python\
**Tags:** os, connection\_lost, wr31, python\
**Created:** [February 5, 2020, 9:01am UTC](https://forums.digi.com/t/how-can-i-restart-my-wr31-device-using-python-code/21097 "2020-02-05T09:01:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![marvin.jagadits](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@marvin.jagadits](https://forums.digi.com/u/marvin.jagadits)\
**Post date:** [February 5, 2020, 9:01am UTC](https://forums.digi.com/t/how-can-i-restart-my-wr31-device-using-python-code/21097/1 "2020-02-05T09:01:02Z")

</div>

The device I am using seems to lose the connection, yet acts to python as if everything was in order, resulting in messages not being sent and no errors being raised, therefore I’d like to restart the device on a daily basis as a workaround until the problem is adressed by a firmware update.

---

<div class="post-metadata">

**Author:** ![Anny](https://avatars.discourse-cdn.com/v4/letter/a/71c47a/32.png) [@Anny](https://forums.digi.com/u/Anny)\
**Post date:** [February 6, 2020, 2:28am UTC](https://forums.digi.com/t/how-can-i-restart-my-wr31-device-using-python-code/21097/2 "2020-02-06T02:28:54Z")

</div>

Hi and welcome to Digi Forum.

If you want to reboot the router at a certain time every day, you can use the option explained here:

[http://ftp1.digi.com/support/documentation/QN\_030\_Digi\_Transport\_reboot\_by\_time.pdf](http://ftp1.digi.com/support/documentation/QN_030_Digi_Transport_reboot_by_time.pdf)

If instead you may want to do a reboot or other recovery methods basing on PPP failures, you may want to have a look here:  
[http://ftp1.digi.com/support/documentation/AN07\_TPort\_Cell\_Prob\_Det\_and\_Rec\_using\_SureLinkWiz.pdf](http://ftp1.digi.com/support/documentation/AN07_TPort_Cell_Prob_Det_and_Rec_using_SureLinkWiz.pdf)

I hope the above helps, for any further help, please review our support options on our website: [https://www.digi.com/support](https://www.digi.com/support)

Regards

Anny  
Digi Technical Support Team

---

<div class="post-metadata">

**Author:** ![marvin.jagadits](https://avatars.discourse-cdn.com/v4/letter/m/35a633/32.png) [@marvin.jagadits](https://forums.digi.com/u/marvin.jagadits)\
**Post date:** [February 13, 2020, 1:32pm UTC](https://forums.digi.com/t/how-can-i-restart-my-wr31-device-using-python-code/21097/3 "2020-02-13T13:32:28Z")

</div>

Thanks for your reply and the warm welcome, I implemented the solution suggested by you, configuring it to restart at 04:00, but from what I can see in the connection logs of the Digi Remote manager there are no daily disconnects at 04:00, which means no restart.

I also would like to pull logs from the router, but the Digi Remote manager fails to do so, I also don’t get a proper error message, the same happens when I try to execute commands most of the time I’ll get some timeout message, not knowing if anything happened at all, installing the sb script for the automatic restart took me over 2 hours because of this and every bit of debugging is incredibly tedious. Is there any way to get Digi Remote manager to be as reliable as one would expect?

---

<div class="post-metadata">

**Author:** ![sushmithagowda](https://avatars.discourse-cdn.com/v4/letter/s/54ee81/32.png) [@sushmithagowda](https://forums.digi.com/u/sushmithagowda)\
**Post date:** [February 18, 2020, 11:07am UTC](https://forums.digi.com/t/how-can-i-restart-my-wr31-device-using-python-code/21097/4 "2020-02-18T11:07:42Z")

</div>

Thank you for the information
