# H.O.O.P. (Hope) - Homey Object Oriented Programming

**URL:** <https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709>\
**Category:** Apps\
**Tags:** app, tools, flow\
**Created:** [March 4, 2021, 6:22pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709 "2021-03-04T18:22:00Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![Marcel\_Ubels](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marcel_ubels/32/18860_2.png) [@Marcel\_Ubels](https://community.homey.app/u/Marcel_Ubels)\
**Post date:** [March 31, 2021, 2:51pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/24 "2021-03-31T14:51:30Z")

</div>

Great yo guys want to help. Thx in advance.

I want it to be programmed 14 days in advance. I have a script, but have to admit it was made with a lot of help of the community, google , copy/paste and some reading in a javascript book.

This is my script at this moment;

```
// Script by Marcel for randomly playing radiostations and playlists from Spotify with your Sonos Device
// With the use of a Synology Server and the Sonos Docker Api 
// Using Homey's apps Better Logic and HTTP request

// Add your Server's Ipadres and PortnumerPrefix voor radiostations en playlists
const IpAdres = '192.168.178.2'; //Add your local ip adres of your server e.g '190.178.178.3'
const Portnumber = '5005';//Add your portnumber of your server for the Sonos api

// Do not adjust 
const RadioPrefix = 'http:%2F%2F' + IpAdres + ':' + Portnumber + '%2Fwoonkamer%2Ffavorite%2F';
const PlayListPrefix = 'http:%2F%2F'+ IpAdres + ':'+ Portnumber + '%2Fwoonkamer%2Fspotify%2Fnow%2Fspotify:user:spotify:playlist:';

//Add your station at //Radiostations. In your Sonos app, from Sonos(not Homey) you
//need to add your radiostation as favorite. Use this exact name in this script
//I have added three playlists. Therefore the variable names Radio12, Radio13 en Radio14 must be
//stay the same and not been altered. 

//To add some random playlist I have made 17 playlist which you can adjust. Just search the ID 
//of your playlist in your Spotify App(not Homey) and paste this ID at //PlayList between 
//the quotes

// Add 14 string variables in Better Logic, called RadioDay1, RadioDay2.....Radioday3, three extra
//string variables called PlayListDay1, PlayListDay2 and PlayListDay3, and three string variables 
// called PlayListName1, PlayListName2 and PlayListName 3. The variable names are case sensitive.

//Radiostations=> Add the name of your Sonos favorite between the quotes
const Radio1 = RadioPrefix + '538 Ibiza Radio';
const Radio2 = RadioPrefix + 'Deep Radio';
const Radio3 = RadioPrefix + '538 Dance Radio';
const Radio4 = RadioPrefix + 'Dance FM';
const Radio5 = RadioPrefix + 'Deep House Ibiza';
const Radio6 = RadioPrefix + 'Deep Radio';
const Radio7 = RadioPrefix + '538 Ibiza Radio';
const Radio8 = RadioPrefix + 'Dance FM';
const Radio9 = RadioPrefix + 'Sky Radio 101 FM';
const Radio10 = RadioPrefix + 'On Disco';
const Radio11 = RadioPrefix + 'Heart Dance';
const Radio12 = 'Playlist1';//Do not adjust this variable
const Radio13 = 'Playlist2';//Do not adjust this variable
const Radio14 = 'Playlist3';//Do not adjust this variable

//Playlist => Add the ID of your Spotify playlist between the quotes. For your own needs you can add the 
//name of the playlist after the //

const PlayListId0 = '7GQS3BcOeogh8wKEeA3fN8?si=taswh15eRZuXmFAkyn6IfQ'//12inch Classics Part 1
const PlayListId1 = '1C5F8dA3nWRN46u6lCehqm?si=67RdCbXtSG27gx6C7qP2Sw'//Deep Delight Part 2
const PlayListId2 = '1QdAD45sKZQwptkm4VeKmO?si=_5P2-G9-SZG91WsNHt0f4g'//360 Dance Part 2
const PlayListId3 = '4YKqPMOlV5JJK6XVKKdWJ9?si=SL7iH53eSNu-PnsZJIcr6A'//Deep House Part 2
const PlayListId4 = '7jzMzltNsYhaI5Xfkxe9If?si=IwDTD4ylQJC9c5JWxEUXQw'//Massive Pop Remixes Part 1
const PlayListId5 = '5sInx9KNxVqnONg9EsIptX?si=8T0QWluxSDqI3bClrf0OOQ'//Dance Classics Part 1
const PlayListId6 = '0NhMKI95ujIjriBaRXrIBs?si=pG_J4OXGTz6mhN_kG1mvMg'//Dance Pop Remixes Part 1
const PlayListId7 = '1s4YUBb95LaWazpgvNGzAu?si=35wEzzqcQIKAgSZq7bkEaA'//Deep House Relax Part 3 
const PlayListId8 = '60HqFyCYzr6dxr4OMxDtS7?si=x7Oa5bNBQXy4DQlC2COLaw'//Truly Deeply House Part 1
const PlayListId9 = '00JuraVC5HSlXCLpYJ4RQx?si=LJFWf4UoQ-2DtayVAGb26g'//360 Dance Part 1
const PlayListId10 = '0C66rsP0YemHrh3dUhSszt?si=gdtcDlzURLWQVZCKi8Evkw'//Deep House Relax Part 2
const PlayListId11 = '4Vaus40H2m6gkwNqhzzril?si=6y9qg0HxQAqfB_B3bhfeIQ'//Deep Delight Part 1
const PlayListId12 = '7kS4ICEIagMdVKUMAe2Hy1?si=CazM4dkSQLq-0wJ_IaiJDw'//Deep House Part 3
const PlayListId13 = '7fwbNi5Be9Jh2ljr9b8Z34?si=TodSqWEASG2mNdGvxV_CKA'//Truly Deeply House 2
const PlayListId14 = '28MJ5Ws6Hw7K3sM0buLxvS?si=sR9304GXTzikRt1n3so-MQ'//Marcels Favorieten 2017
const PlayListId15 = '4oH8GC0TMvQGlTXlj3luUq?si=RnmzYP4YRCWSPa9ptJTuRA'//Deep House Relax Part 1
const PlayListId16 = '4g1z40nOzcPytHV5DvWpvB?si=GVjxQsb6RTyA5CB72mjSLQ'//Deep House Relax 4

//PlaylistNames => Add the Name ad you want to get presented of your Spotify playlist between the quotes. 

const PlayListName0 = '12inch Classics Part 1'
const PlayListName1 = 'Deep Delight Part 2'
const PlayListName2 = '360 Dance Part 2'
const PlayListName3 = 'Deep House Part 2'
const PlayListName4 = 'Massive Pop Remixes Part 1'
const PlayListName5 = 'Dance Classics Part 1'
const PlayListName6 = 'Dance Pop Remixes Part 1'
const PlayListName7 = '/Deep House Relax 3'
const PlayListName8 = 'Truly Deeply House Part 1'
const PlayListName9 = '360 Dance Part 1'
const PlayListName10 = 'Deep House Relax 2'
const PlayListName11 = 'Deep Delight Part 1'
const PlayListName12 = 'Deep House Part 3'
const PlayListName13 = 'Truly Deeply House 2'
const PlayListName14 = 'Marcels Favorieten 2017'
const PlayListName15 = 'Deep House Relax Part 1'
const PlayListName16 = 'Deep House Relax 4'

//Do not change the next variables
const PlayList0 = PlayListPrefix + PlayListId0//12inch Classics Part 1
const PlayList1 = PlayListPrefix + PlayListId1//Deep Delight Part 2
const PlayList2 = PlayListPrefix + PlayListId2//360 Dance Part 2
const PlayList3 = PlayListPrefix + PlayListId3//Deep House Part 2
const PlayList4 = PlayListPrefix + PlayListId4//Massive Pop Remixes Part 1
const PlayList5 = PlayListPrefix + PlayListId5//Dance Classics Part 1
const PlayList6 = PlayListPrefix + PlayListId6//Dance Pop Remixes Part 1
const PlayList7 = PlayListPrefix + PlayListId7//Deep House Relax Part 3 
const PlayList8 = PlayListPrefix + PlayListId8//Truly Deeply House Part 1
const PlayList9 = PlayListPrefix + PlayListId9//360 Dance Part 1
const PlayList10 = PlayListPrefix + PlayListId10//Deep House Relax Part 2
const PlayList11 = PlayListPrefix + PlayListId11//Deep Delight Part 1
const PlayList12 = PlayListPrefix + PlayListId12//Deep House Part 3
const PlayList13 = PlayListPrefix + PlayListId13//Truly Deeply House 2
const PlayList14 = PlayListPrefix + PlayListId14//Marcels Favorieten 2017
const PlayList15 = PlayListPrefix + PlayListId15//Deep House Relax Part 1
const PlayList16 = PlayListPrefix + PlayListId16//Deep House Relax 4

function wait(ms){//Declaring function wait
   var start = new Date().getTime();
   var end = start;
  while(end < start + ms) {
  end = new Date().getTime();}}

var nums = [Radio1,Radio2,Radio3,Radio4,Radio5,Radio6,Radio7,Radio8,Radio9,Radio10,Radio11,
Radio12,Radio13,Radio14];
var usedNums = [];

let BLApp = await Homey.apps.getApp({id:"net.i-dev.betterlogic" });
    while (nums.length) {
        var nummer = nums.length.toString();
        var randomIndex = Math.floor(Math.random() * (nums.length));
        var randomNumber = nums.splice(randomIndex, 1)[0];
 // console.log( 'First radiostation is: '+randomNumber.toString() + " " + nummer) ;
 // console.log('Nummer: '+nummer)
 // console.log('Randomnummer is :'+randomNumber)
 // console.log('RadioDay is :'+randomNumber)
let result=BLApp.apiPut("RadioDay"+nummer+"/" + randomNumber.toString());
};

var nums = [PlayList1,PlayList2,PlayList3,PlayList4,PlayList5,PlayList6,PlayList7,
PlayList8,PlayList9,PlayList10,PlayList11,PlayList12,PlayList13,PlayList14,PlayList15,
PlayList16, PlayList0];
var usedNums = [];

while (nums.length) {
var nummer = nums.length.toString();
        var randomIndex = Math.floor(Math.random() * (nums.length));
        var randomNumber = nums.splice(randomIndex, 1)[0];
let result=BLApp.apiPut("PlayListDay"+nummer+"/" + randomNumber.toString());
};

wait(2000);

let PlayListDay1 = await BLApp.apiGet('PlayListDay1');//Retrieving Better Logic variable 
PlayListDay1 = PlayListDay1.value
console.log('PlayListDay1: ' +PlayListDay1)
let PlayListDay2 = await BLApp.apiGet('PlayListDay2');//Retrieving Better Logic variable 
PlayListDay2 = PlayListDay2.value
console.log('PlayListDay2: ' +PlayListDay2)
let PlayListDay3 = await BLApp.apiGet('PlayListDay3');//Retrieving Better Logic variable 
PlayListDay3 = PlayListDay3.value
console.log('PlayListDay3: ' +PlayListDay3)

let PlayListDay = [PlayListDay1, PlayListDay2, PlayListDay3]
let PlayListDayNumber = 0
let PlayListIdNumber = -1
let PlayListId = [PlayListId0, PlayListId1, PlayListId2, PlayListId3, PlayListId4, PlayListId5, PlayListId6, PlayListId7, PlayListId8, PlayListId9, PlayListId10, PlayListId11, PlayListId12, PlayListId13, PlayListId14, PlayListId15, PlayListId16]
let PlayListName = [PlayListName0, PlayListName1,PlayListName2,PlayListName3,PlayListName4,PlayListName5,PlayListName6,PlayListName7,PlayListName8,PlayListName9,PlayListName10,PlayListName11,PlayListName12,PlayListName13,PlayListName14,PlayListName15,PlayListName16]

for (let Count = 0; Count <= 16; Count++){

switch(Count){
 
  case Count:{
if (PlayListDayNumber === 3){break;}
PlayListIdNumber = PlayListIdNumber + 1
console.log('Count is: '+Count)
console.log('PlayListDayNumber is: '+(PlayListDayNumber+1))
console.log('PlayListIdNumber is : '+PlayListIdNumber)
console.log('PlayListId is: '+PlayListId[PlayListIdNumber])

x = PlayListDay[PlayListDayNumber].includes(PlayListId[PlayListIdNumber].substring(0,22))

if(x === true){
    {BLApp.apiPut('PlayListDay'+[PlayListDayNumber +1] +'Name/' +PlayListName[PlayListIdNumber])
    console.log('PlayListIdNumber is : '+PlayListIdNumber)
    console.log('PlayListDay'+[PlayListDayNumber + 1] +'Name is: ' +PlayListName[PlayListIdNumber])
    console.log('PlayListDayNumber is nu nog: '+(PlayListDayNumber +1))
    PlayListDayNumber = PlayListDayNumber +1
    PlayListIdNumber = 0
    Count = 0
    console.log('PlayListDayNumber is nu : '+(PlayListDayNumber +1))
    
break;}}

else continue;}

}}
```

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [March 31, 2021, 5:11pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/25 "2021-03-31T17:11:46Z")

</div>

In HOOP in the settings you can add javascript functions and use that in the Flow Variables cards.

---

<div class="post-metadata">

**Author:** ![Jeroen\_Kokhuis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_kokhuis/32/12592_2.png) [@Jeroen\_Kokhuis](https://community.homey.app/u/Jeroen_Kokhuis)\
**Post date:** [April 9, 2021, 4:32pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/26 "2021-04-09T16:32:38Z")

</div>

I log in to the Athom devolper setting and copy/paste the code into the app. When I go back to the app and press “configure app” I get an error :

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/d/3df10533aae31e304591d0e81ffd06aba6f0feac.jpeg)  
I want to install the Homey Elevator but I get also an error :  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/4/f48fa14d175cfd4c832ea456cc6841e663ac5830.jpeg)

I’ve read the above and tried again but no luck? Anyone can help?

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [April 9, 2021, 5:23pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/27 "2021-04-09T17:23:24Z")

</div>

Install 1.2.3 when its in the store and use the settings, the issue for iOS has been resolved.

---

<div class="post-metadata">

**Author:** ![Jeroen\_Kokhuis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_kokhuis/32/12592_2.png) [@Jeroen\_Kokhuis](https://community.homey.app/u/Jeroen_Kokhuis)\
**Post date:** [April 10, 2021, 6:38am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/28 "2021-04-10T06:38:28Z")

</div>

Okay thanks, I will install it when it’s in the store

---

<div class="post-metadata">

**Author:** ![Adrian\_Rockall](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/adrian_rockall/32/13209_2.png) [@Adrian\_Rockall](https://community.homey.app/u/Adrian_Rockall)\
**Post date:** [April 10, 2021, 7:21am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/29 "2021-04-10T07:21:30Z")

</div>

v 1.2.3. is in the store now.

---

<div class="post-metadata">

**Author:** ![Jeroen\_Kokhuis](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jeroen_kokhuis/32/12592_2.png) [@Jeroen\_Kokhuis](https://community.homey.app/u/Jeroen_Kokhuis)\
**Post date:** [April 10, 2021, 10:39am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/30 "2021-04-10T10:39:02Z")

</div>

I’ve installed version 1.2.3 and still the same error when I tried to install the Homey Elevator device. The error when I go to the configure app page is gone. Thanks for that.

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [April 10, 2021, 12:17pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/31 "2021-04-10T12:17:43Z")

</div>

Indeed, the Elevator device will give an error on some phones (iOS) and there is nothing i can do about that. Thats why i have the backup settings-elevation which again works correctly as backup for some phone’s.

---

<div class="post-metadata">

**Author:** ![Dennis\_van\_Dinter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dennis_van_dinter/32/28180_2.png) [@Dennis\_van\_Dinter](https://community.homey.app/u/Dennis_van_Dinter)\
**Post date:** [April 12, 2021, 12:26pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/32 "2021-04-12T12:26:27Z")

</div>

Hi,

Is someone willing to point me in the right direction for my use case?

I have a Aqara Opple light switch with 2 buttons. What I want is a flow with 2 “when” conditions. If button 1 or button 2 is pressed, turn on the light.  
More like a “If-Or-Then” statement.

Now I have 2 flows. One for each button.

Is this possible with this app?

Regards,

Dennis

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [April 12, 2021, 12:38pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/33 "2021-04-12T12:38:44Z")

</div>

Hey Dennis,

Not yet! I have been working on a if-if-if structure, and it is looking promising.  
I allready have build the trigger system, just need to make the conditional-trigger-cards.

I just need time to finish it.

---

<div class="post-metadata">

**Author:** ![Dennis\_van\_Dinter](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dennis_van_dinter/32/28180_2.png) [@Dennis\_van\_Dinter](https://community.homey.app/u/Dennis_van_Dinter)\
**Post date:** [April 12, 2021, 2:13pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/34 "2021-04-12T14:13:46Z")

</div>

That sounds great! Please keep us posted!

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 18, 2021, 3:08pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/35 "2021-04-18T15:08:09Z")

</div>

Hey Arie,

> [@H.O.O.P. (Hope) - Homey Object Oriented Programming](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/15):
>
> Hey Peter, I see you use two cards for If Then: IF (all cards until THEN are true); Operator = AndAlso && and then this card: THEN But this card does the same and has the THEN operator included: IF the next X cards are true THEN execute the X cards after that; Operator = AndAlso && To me the first way is somewhat clearer to read, because there is a THEN operator card visible, which isn’t the case with the 2nd case. I think in hindsight it’s a bit more difficult to ‘read’ the flow steps. …

It’s been a while, but very appreciated:  
Thanks a lot for your explanation and examples.  
Agreed, in case of multiple IF statements before THEN, using the seperate IF - THEN cards keeps it readable.

And in case of just ONE IF statement, the card with `IF the following 1 cards are A THEN do B` seems readable enough, and indeed shortens the flows with mulitiple if-A-then-do-B statements

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 18, 2021, 10:22pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/36 "2021-04-18T22:22:43Z")

</div>

Hey Arie, I got this error this evening when searching for trigger card devices, screenshot:

 ![H.o.o.p.](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/7/87a7fdd9924ba85209a4b6f2231cf509bbf91f41.png)  
I realized I enabled 2FA the other day, and did not logout everywhere I could think of. The Homey app on my Android is keeping the logoff button a secret to me, so I did not logoff from the app.

So I logged on to various Athom & Homey related sites with my H. account and 2FA codes, also at my.homey.app  
But no difference whith this error.  
At the Homey app on Android the trigger devices are still presented and selectable.  
Any ideas? No hurry (for me)

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [April 18, 2021, 10:34pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/37 "2021-04-18T22:34:25Z")

</div>

Trying to create an homey elevator device again? Or use the settings to re-elevate.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 18, 2021, 10:53pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/38 "2021-04-18T22:53:03Z")

</div>

Update2:

- 1st used the settings to re-elevate. No effect
- 2nd re created an homey elevator device. No effect
- 
  - NOTE: While starting with building flows it seems to work fine, when reaching flows of this size, it gets worse (this flow doesn’t do what I expect it to do yet):

- 
  - 

- The Homey memory check page timed out with an Unknown Error, but after 10 retries, now it works.
- Oww, the H.o.o.p. app uses 45.5MB. Not your fault my Homey is choking because of the extra 20-30MB of ram usage, it is packed to the max so that’s solely my problem.  
 ![Screenshot_20210419-023258_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/7/c7ab0f7ceb95c3cbbbe655962600fb415584aea5.jpeg)
- 
  - I gave the H.o.o.p. app a restart command, but it timed out after 30 secs.  
Now I, reluctantly, restarted Homey and call it quits for today.

- **After rebooting Homey, H.o.o.p. app is using 18,1MB, and Homey 106.4MB… it shrunk with 110MB’s…**  
So all in all it’s a combination of a growing app, and growing Homey ram usage.
- ![Screenshot_20210419-025257_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/d/ad1b0a59bd3d426468f2868947bed8932e6dd1f9.jpeg)

* * *

Thx for the quick response, Arie.  
Update: it occurs occasionally now, also while trying to save a flow.  
I will re create an homey elevator device.

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [April 19, 2021, 8:12am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/39 "2021-04-19T08:12:44Z")

</div>

I just updated to 5.0.4.  
I wend from Homey ~200MB to 179.7MB.

I did update all stuff for HOOP, will be publishing the newest version, but i didn’t change anything except the newest athom-api.

For me everything works fine, but i don’t use MFA/2FA yet, and i will not be doing that this month (because of lack of time if something goes wrong).

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 19, 2021, 12:46pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/40 "2021-04-19T12:46:16Z")

</div>

Thanks Arie. All of your work is much appreciated.  
In hindsight I knew when Homey’s got full memory problems, apps go stalling and network (wifi) goes banana’s.  
The papertrails app indicated that.  
It was kind of coincidence it occurred while editing large flows.  
Well,  
I shoud restart apps & Homey from the beginning (note to self)

Oh I fully understand you want wait to enable 2FA, this can have unexpected side effects.

---

<div class="post-metadata">

**Author:** ![Arie\_J\_Godschalk](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arie_j_godschalk/32/63027_2.png) [@Arie\_J\_Godschalk](https://community.homey.app/u/Arie_J_Godschalk)\
**Post date:** [April 19, 2021, 12:58pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/41 "2021-04-19T12:58:47Z")

</div>

Indeed, and i have so mucht customly-writen system in my House connected to/through Homey.  
But in may i’ll probably change to MFA.

It shoudn’t matter, but “shouldn’t” and “does-not” ain’t the same 😉

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 19, 2021, 1:38pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/42 "2021-04-19T13:38:02Z")

</div>

> [@Arie\_J\_Godschalk](#):
>
> “shouldn’t” and “does-not” ain’t the same 😉

That is a truth as a cow, Arie 😉😆

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [April 19, 2021, 10:06pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/43 "2021-04-19T22:06:58Z")

</div>

So I want to create a flow for a 4-function-click switch.  
Expected functionality: The second click can be x mins/hours later, so if you want to turn the light off, just click a few times until it turns off (no need for remembering how many clicks are needed here).  
1 click = dim light to 20%  
2nd click = dim light to 50%  
3rd click = dim light to 100%  
4th click = turn light off

The only thing what works at this time is the timeline message from the THEN card, after pushing the button 😉 It displays the counter var value, it stays on `0`

 ![Screenshot_20210420-003340_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/b/f/bff6ad98b64f811e2f8e8f85041a643cef70c9a1.jpeg)  
Any ideas, I can’t see it anymore, I tried 1,000 things…

My Flow:

Because some betterlogic texts disappear, a screenshot of the first part (of 4)

 ![eettafel flow](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/2/924e4bb10459762e5fdba25d52bfd0e2f3328933.png)

[Previous page](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709.md?page=1)

[Next page](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709.md?page=3)
