# Restore lost Better Logic and CountDown configuration \[HowTo\]

**URL:** <https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416>\
**Category:** Apps\
**Tags:** homeyscript\
**Created:** [December 13, 2018, 7:50pm UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416 "2018-12-13T19:50:37Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [December 13, 2018, 7:50pm UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416/1 "2018-12-13T19:50:37Z")

</div>

Both Better Logic and CountDown have an configuration page with Variables / Timers you need te configure before the App works.  
And wetter you made a mistake and deleted all, removed accidentally the App from Homey and lost all…  
If you forgot to make a backup, you are screwed…

If you still have your Flows On homey all configuration can be retrieved.

The script is available here [0.5-recreateBL&CD-BackupFromFlows.js](https://github.com/Dijker/nu.Dijker.UnseenHomeyScripts/blob/master/recreateBL%26CD-BackupFromFlows.js)

Instructions  
Install [HomeyScript](https://apps.athom.com/app/com.athom.homeyscript) on your Homey!  
Go to [https://homeyscript.athom.com/](https://homeyscript.athom.com/)  
(Preferably from a desktop, Chrome works great.)

- Login
- Select your Homey
- Add a new Script (+ left bottom)
- Give it a name… fe recreateBL&CD-BackupFromFlows.js
- Open the script from [here (plain text)](https://raw.githubusercontent.com/Dijker/nu.Dijker.UnseenHomeyScripts/master/recreateBL%26CD-BackupFromFlows.js) Copy All / Paste in your new created HomeyScript

Uncomment the App you want to restore configuration for (Line ~ 19, 20 )

```
// App to Check: Choose one, Better Logic (Patrick Sannes) or CountDown (Ralf van Dooren)
// let appName = 'net.i-dev.betterlogic'
let appName = 'nl.bevlogenheid.countdown'

```

- Press Save and Run

In the result you get a block with the variables and a second block to restore the variables.  
Copy everything from the lines between the second and third line -=-=-=-=-=- …  
It should start with [{ and end with }]

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/2X/5/5aad64a35b35afb9a73979f17b698390c08b754b.png)

Paste these lines in the Import. on the App configuration screen.

Tested with:  
on Homey v 1.5 x

- Better Logic - v0.9.12 - Patrick Sannes
- CountDown - v1.2.5 - Ralf van Dooren

on Homey v 2.0.0

- CountDown - v2.0.3 - Ralf van Dooren
- Better Logic - v1.0.1 - 18.12.18 - Patrick Sannes

on Homey v 4.2.0-rc14

- CountDown - v2.0.3 - Ralf van Dooren
- Better Logic - v1.0.5 - 18.12.18 - Patrick Sannes

---

<div class="post-metadata">

**Author:** ![PhilS](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/phils/32/12941_2.png) [@PhilS](https://community.homey.app/u/PhilS)\
**Post date:** [December 14, 2018, 6:07am UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416/2 "2018-12-14T06:07:30Z")

</div>

Great @Dijker! Thx

---

<div class="post-metadata">

**Author:** ![Lindansaren](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/lindansaren/32/2596_2.png) [@Lindansaren](https://community.homey.app/u/Lindansaren)\
**Post date:** [December 14, 2018, 9:15pm UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416/3 "2018-12-14T21:15:41Z")

</div>

Thank’s. This script saved my friday night. I lost all of my countdowns all off a sudden, but got them all recovered by your script! 😀  
@Dijker

---

<div class="post-metadata">

**Author:** ![ReneO](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/reneo/32/3522_2.png) [@ReneO](https://community.homey.app/u/ReneO)\
**Post date:** [January 10, 2019, 10:19am UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416/4 "2019-01-10T10:19:02Z")

</div>

Thnx for the script! Makes my day. I did also make a backup, just in case 🙂

---

<div class="post-metadata">

**Author:** ![matrover](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/matrover/32/12112_2.png) [@matrover](https://community.homey.app/u/matrover)\
**Post date:** [January 21, 2019, 11:58am UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416/5 "2019-01-21T11:58:33Z")

</div>

Script gives me an error:

* * *

Script Error:  
invalid\_script

do you guys have it still working?  
im on 1.5.13

---

<div class="post-metadata">

**Author:** ![matrover](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/matrover/32/12112_2.png) [@matrover](https://community.homey.app/u/matrover)\
**Post date:** [January 23, 2019, 7:16am UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416/6 "2019-01-23T07:16:58Z")

</div>

Works again, i did nothing to solve it 🤔

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [January 23, 2019, 1:44pm UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416/7 "2019-01-23T13:44:44Z")

</div>

Could have been an browser or cache issue.

---

<div class="post-metadata">

**Author:** ![Keverjeroen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/keverjeroen/32/369_2.png) [@Keverjeroen](https://community.homey.app/u/Keverjeroen)\
**Post date:** [January 29, 2019, 8:34am UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416/8 "2019-01-29T08:34:14Z")

</div>

Script works great to restore CountDown timers! Thanks!

---

<div class="post-metadata">

**Author:** ![Dave\_Meijer1](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dave_meijer1/32/12661_2.png) [@Dave\_Meijer1](https://community.homey.app/u/Dave_Meijer1)\
**Post date:** [May 21, 2020, 8:50pm UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416/9 "2020-05-21T20:50:02Z")

</div>

Hi,

I accidentally deleted my timers. how to restore that?  
The link of the script is not working.

Regards,

Dave

---

<div class="post-metadata">

**Author:** ![Dijker](https://avatars.discourse-cdn.com/v4/letter/d/b9bd4f/32.png) [@Dijker](https://community.homey.app/u/Dijker)\
**Post date:** [May 21, 2020, 10:00pm UTC](https://community.homey.app/t/restore-lost-better-logic-and-countdown-configuration-howto/5416/10 "2020-05-21T22:00:24Z")

</div>

> [@Dave\_Meijer1](#):
>
> The link of the script is not working.

Fixed!
