# 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:** 3

<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 20, 2021, 5:45am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/44 "2021-04-20T05:45:26Z")

</div>

> [@Peter\_Kawa](#):
>
> The Homey app on my Android is keeping the logoff button a secret to me, so I did not logoff from the app.

Just in case you are still looking, go to more then tap on the upper part of the screen where your picture and name is shown.

---

<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 20, 2021, 10:22am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/45 "2021-04-20T10:22:50Z")

</div>

Hey Peter, i just created

And for me, this is working fine.

---

<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 20, 2021, 12:10pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/46 "2021-04-20T12:10:29Z")

</div>

@Dennis_van_Dinter and @Peter_Kawa ,

Version 1.3.0 is ready, (waiting to be uploaded to HCStore):  
You can now add multiple Triggers in the conditional part:

---

<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 20, 2021, 12:36pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/47 "2021-04-20T12:36:55Z")

</div>

Ooowww Grrrrreat! Thanks for alle the work!

Will try tonight.

Regards,

Dennis

---

<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 20, 2021, 12:37pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/48 "2021-04-20T12:37:55Z")

</div>

> [@Adrian\_Rockall](#):
>
> Just in case you are still looking, go to more then tap on the upper part of the screen where your picture and name is shown

Thanks! I seemed to completely missed the obvious😄

---

<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 20, 2021, 12:40pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/49 "2021-04-20T12:40:30Z")

</div>

> [@Arie\_J\_Godschalk](#):
>
> Hey Peter, i just created

Many thanks Arie, I will try again!

---

<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 20, 2021, 12:42pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/50 "2021-04-20T12:42:25Z")

</div>

> [@H.O.O.P. (Hope) - Homey Object Oriented Programming](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/46):
>
> @Dennis_van_Dinter and @Peter_Kawa , Version 1.3.0 is ready, (waiting to be uploaded to HCStore): You can now add multiple Triggers in the conditional part:

Fantastic! Thanks again, Arie.

---

<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 20, 2021, 12:50pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/51 "2021-04-20T12:50:42Z")

</div>

@Peter_Kawa and @Dennis_van_Dinter

You can even use the Conditional-trigger-cards within normal flows (without HOOP trigger).

Please keep in mind tho that IF-THEN-ELSE-cards **WILL** work when triggered by HOOP (so in this example when the Kapstok Lamp is turned on), but **will NOT** work when started without HOOP (so in this example when the Hal Lamp turns on)

---

<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 20, 2021, 5:30pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/52 "2021-04-20T17:30:28Z")

</div>

Yes, I got it working now.  
After comparing with your example flow, I noticed you don’t use the logics cards conditions `Pulse Button has been pressed = True`. I removed the logics _et voilá_.

> ![1btn_logicakaart_overbodig](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/3/835a53cfb7f19b36de988968a8a5000df8cb71cd.png)

To me at first that was kind of logical to have them there, but the Trigger card is, well, the Trigger card of course 😉

> 

> Timeline “check” messages:
> 
> ![Screenshot_20210420-192149_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/e/7edd71c9e147457d5e0cba313be337a89ea4d62c.jpeg)

And it did happen 😉 :  
[Watch video](https://www.youtube.com/embed/7o0qXaRlrAE)

---

<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 20, 2021, 10:50pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/53 "2021-04-20T22:50:10Z")

</div>

**ActionCards Explained**

Hey Arie, I h.o.p.e. you did not work on it yet, but I created an “ActionCards Explained” pdf for myself, you and other users.  
Here’s a screenshot:

 ![H.o.o.p.ActionCardsExplained](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/a/faacef65d0e60c6731fba479132e26ccf9c07a86.png)

---

<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 22, 2021, 10:50pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/54 "2021-04-22T22:50:18Z")

</div>

Hey Arie, don’t know what’s wrong, but creating a function does not work, after entering the name “test”, and hit “Add function”, it returns:  
`TypeError: Cannot read property 'name' of undefined`  
It used to work, I created the function named ‘random’ the other day **Edit while still on V5 firmware**  
Homey `v6.0.0`  
H.O.O.P. `v1.3.0`

No hurries, I just was fiddling with it

 ![Screenshot_20210423-003640_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/e/7e49dec3dfbb40b218221df1e3f85238f516aa19.jpeg)

---

<div class="post-metadata">

**Author:** ![Kongedam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kongedam/32/35807_2.png) [@Kongedam](https://community.homey.app/u/Kongedam)\
**Post date:** [April 23, 2021, 6:37pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/56 "2021-04-23T18:37:05Z")

</div>

Im so lost, I cant find my error  
I wanted to rewrite my flow, to go from 4 flows to 2, but have some trouble with it  
1 Push (ON/OFF) = OK  
2 Push 50%dim = Not OK (goes to the flow, but will not dim)  
3 Push 100%dim = Not OK (goes to the flow, but will not dim)

I tried to add a push message for each IF, to check it picks the right IF statement.  
This works, but it will not DIM my lamps

TRIGGER (Counter)

Main Flow (IF 1, 2 or 3)

best regards  
Michael

---

<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 23, 2021, 8:21pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/57 "2021-04-23T20:21:21Z")

</div>

I’ll have a look, in the meanwhile, check out [my flow](https://community.homey.app/t/h-o-o-p-hope-examples/45114/15), which sequentially dims a light after 1 click at a time.  
So no double- triple clicks needed.

---

<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 23, 2021, 8:38pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/58 "2021-04-23T20:38:13Z")

</div>

I just thought, if a variable ‘on the fly’ isn’t created for some reason, just create a temp flow with the variable card and test run it. Now you have a selectable ‘existing’ variable .

(About:  
After you create a flow-variable in flow, they flow needs to be triggered once for the variable to become visible (and to select it)).

> [@Arie\_J\_Godschalk](#):
>
> Yeah, still thinking about a solution for that “issue”

---

<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 23, 2021, 9:04pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/59 "2021-04-23T21:04:05Z")

</div>

Fixed that, you just need to save the flow, then the variabele is create and can be used. No need anymore to trigger the flow first.

Allready part of version 1.3.0

---

<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 23, 2021, 10:24pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/60 "2021-04-23T22:24:57Z")

</div>

Thanx, didn’t notice yet, sorry 😉

---

<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 24, 2021, 2:11am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/61 "2021-04-24T02:11:55Z")

</div>

> [@Kongedam](#):
>
> I tried to add a push message for each IF, to check it picks the right IF statement.  
> This works, but it will not DIM my lamps

I can’t see what’s wrong 1, 2, 3. So notification cards do work, but the lights don’t respond?  
What happens when you add notification cards after every light command card?

---

<div class="post-metadata">

**Author:** ![Kongedam](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/kongedam/32/35807_2.png) [@Kongedam](https://community.homey.app/u/Kongedam)\
**Post date:** [April 24, 2021, 7:21am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/62 "2021-04-24T07:21:34Z")

</div>

Nothing works anymore, I just updated to v. 1.3  
I will try to make the elevator again

**Update**  
Elevator run, I can see the trigget activates the timer  
The main flow is activated by the timer, but it look like the flow variable “PuchButtonPushesCount” does not contain any value anymore?

“PuchButtonPushesCount” = Null

**Update:**  
By changing from flow variables to better logic, then the push count are working again. 1 and 2 push are working, but DIM 100% not

1 Push (ON/OFF) = OK  
2 Push 50%dim = OK  
3 Push 100%dim = Not OK (goes to the flow, but will not dim)

**Update**  
Found the last error is was the logic card for “3 pushes” that was misplaced

So the solution was to change flow variables to better logic

**TRIGGER (Counter)**

**Main Flow (IF 1, 2 or 3)**

---

<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 24, 2021, 7:38pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/63 "2021-04-24T19:38:56Z")

</div>

Cool you pinpointed your issue. Also v1.3 here.  
I didn’t know Flow Variables don’t seem to work as expected.  
But my head spins of this troubleshooting my test flows also. I just would like to see a log of some kind, I get no sign of life whatsoever, so feels like running in the dark.  
I saw the “throw” card, but where does it write to?  
My knowledge is too little for these details.  
I also tried the Try-Catch-Finally method card. Makes no difference

I created 2 flows, one with H.o.o.p. Flow Vars and one with BetterLogic Vars  
The H.o.o.p. flow doesn’t work at all, the BetterLogic flow ran 1 time, partly …

---

<div class="post-metadata">

**Author:** ![HexaDroid](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/hexadroid/32/35034_2.png) [@HexaDroid](https://community.homey.app/u/HexaDroid)\
**Post date:** [May 9, 2021, 5:05pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/64 "2021-05-09T17:05:25Z")

</div>

Thanks for creating this app. Looks like something I can use for debloating some double flows. I’m not a programmer but I understand the concepts of ELSE, IF, OR etc…

It will take me some time to learn this for sure. But your original post has a bit of a rude stab in it right…Why shouldn’t people learn? 🙂

> _“If you dont understand (the usefulness of) this app, please don’t use it.”_

I have installed the app and executed the elevator device. However, in flows, HOOP is not visible for use. Any pointer?

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

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