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

<div class="post-metadata">

**Author:** ![Ron\_Meijsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ron_meijsen/32/29929_2.png) [@Ron\_Meijsen](https://community.homey.app/u/Ron_Meijsen)\
**Post date:** [July 19, 2021, 7:07pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/105 "2021-07-19T19:07:51Z")

</div>

Hi,

it stays on for 30 seconds, I also tried it with zone active instead of the PIR.  
I just created the same flow with a door contact of neo Coolcam and that does not trigger also.

the only triggers that work are buttons, I am really puzzeled what is wrong.

Ron

---

<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:** [July 19, 2021, 7:19pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/106 "2021-07-19T19:19:20Z")

</div>

That’s odd indeed, especially the zone trigger should work while it works for me.

You could try to reinstall the Homey Elevator, it can be a rights issue (a guess but it can’t hurt).

 ![Screenshot_20210719-211448_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/9/29014b94ecc10cdf0b4f55783583b0ab7dce2ca0.jpeg)

---

<div class="post-metadata">

**Author:** ![Ron\_Meijsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ron_meijsen/32/29929_2.png) [@Ron\_Meijsen](https://community.homey.app/u/Ron_Meijsen)\
**Post date:** [July 19, 2021, 8:54pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/107 "2021-07-19T20:54:53Z")

</div>

Hi Peter,  
the elevator sis not change anything

I have deleted h.o.o.p, completely deleted all devices, reinstalled the app. started al over again, now it works.

Thanks for all your support.

Ron

---

<div class="post-metadata">

**Author:** ![Ron\_Meijsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ron_meijsen/32/29929_2.png) [@Ron\_Meijsen](https://community.homey.app/u/Ron_Meijsen)\
**Post date:** [August 27, 2021, 8:25pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/108 "2021-08-27T20:25:44Z")

</div>

Hi

I have a question. I have a neocam door contact(dc) to trigger the alarm for the barn but because I read that a low battery could cause false triggers I added a motion detector(bm) in the barn.

And created a virtual device “barn security”(sb)

I made a flow that

when dc goes on

```
waits 5 sec

if bm is on
     turns on sb

```

otherwise  
turn sb off

if dc goes off

```
and bm is on
     turn sb on

```

otherwise  
turn sb off

[https://homey.app/f/jbzd9K](https://homey.app/f/jbzd9K)

Did i code this correctly with HOOP

Thanks  
Ron

---

<div class="post-metadata">

**Author:** ![Ron\_Meijsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ron_meijsen/32/29929_2.png) [@Ron\_Meijsen](https://community.homey.app/u/Ron_Meijsen)\
**Post date:** [August 27, 2021, 9:00pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/109 "2021-08-27T21:00:56Z")

</div>

Hi

I have another question. You can call the app simple log with 2 text variables. Group and text. There is no HOOP action card with 2 text variables

How can i use these?

Ron

---

<div class="post-metadata">

**Author:** ![Arjan-21](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arjan-21/32/27181_2.png) [@Arjan-21](https://community.homey.app/u/Arjan-21)\
**Post date:** [August 28, 2021, 9:30pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/112 "2021-08-28T21:30:20Z")

</div>

I don’t know what I’m doing wrong. A flow like this without the extra triggers works for me, but this flow isn’t. Is there something I’m doing wrong?  
I want my lights to dim time based (like the spline app does), but the dim value has to change with the sun.

[https://homey.app/nl-nl/flow/uJdGeK/](https://homey.app/nl-nl/flow/uJdGeK/)

---

<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:** [August 29, 2021, 6:11am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/113 "2021-08-29T06:11:26Z")

</div>

Hey Arjen,

I will have a better look later, but I did see one await-dim lamp within the conditional part (before a Then card).  
Does it work when you fix that to after the Then card?

---

<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:** [August 29, 2021, 6:13am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/114 "2021-08-29T06:13:38Z")

</div>

I will create one next week.

---

<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:** [August 29, 2021, 6:16am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/115 "2021-08-29T06:16:18Z")

</div>

Yeah it looks correct.  
Does it work correctly?

---

<div class="post-metadata">

**Author:** ![Arjan-21](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arjan-21/32/27181_2.png) [@Arjan-21](https://community.homey.app/u/Arjan-21)\
**Post date:** [August 29, 2021, 7:18am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/116 "2021-08-29T07:18:57Z")

</div>

That’s really stupid of me. Should notice that before. I think I changed it when the flow was not working.

But the flow works now. So it’s not a issue with Hope.

Edit: unfortunately it doesn’t work. It looked like it.  
This is the changed flow.  
[https://homey.app/f/3I5nhK](https://homey.app/f/3I5nhK)

---

<div class="post-metadata">

**Author:** ![Arjan-21](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/arjan-21/32/27181_2.png) [@Arjan-21](https://community.homey.app/u/Arjan-21)\
**Post date:** [August 29, 2021, 11:35am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/117 "2021-08-29T11:35:54Z")

</div>

It’s really strange, suddenly al my flows with hope won’t work anymore. Didn’t update anything the last week. So I don’t know what’s wrong.

Edit: I’ve removed the 2 new flows (they are the same as the example) and after deleting. the rest of the flows with h.o.o.p works again. So this is really strange. Is there a max of triggers or something like that?  
Is it correct that the folder with the hoop triggers isn’t removing itself while removing the trigger card?

---

<div class="post-metadata">

**Author:** ![Ron\_Meijsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ron_meijsen/32/29929_2.png) [@Ron\_Meijsen](https://community.homey.app/u/Ron_Meijsen)\
**Post date:** [August 29, 2021, 3:22pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/118 "2021-08-29T15:22:42Z")

</div>

Hi Arie

No it always hits the first if but never the motion sensor is true. Although i am moving. Inside. So. I always get contact aan beweging uit.

Addition. Found out the wait time is too tight. Will check with 4 sec. Is now 2 sec.

Ron

---

<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:** [August 31, 2021, 6:59am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/119 "2021-08-31T06:59:27Z")

</div>

Hey Ron,

I have just added an actioncard for 2 textual arguments and succesfully tested it with the Simple LOG app.  
Just requested an update to the HCS, so it will probably be coming through today.

**Just let me know if you require any another actioncard or methodcard.**

---

<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:** [August 31, 2021, 7:07am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/120 "2021-08-31T07:07:21Z")

</div>

Hey Arjan,

- No there is no max on the amount of triggers.
- The HOOPInternal folder itself should never be automaticle removed no.
- Flows within the HOOPInternal folder will be automaticle added or removed when the trigger is not used in any flows anymore.
- For every unique trigger with unique arguments, there will be a flow created in the HOOPInternal folder.

I will try to recreate the fault.

---

<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:** [August 31, 2021, 7:13am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/121 "2021-08-31T07:13:16Z")

</div>

Hey Ron,

Is the flow working correctly with the 4 seconds?

If not, could you explain to me (textually) what you are trying to archive?  
Because i cannot seem to grasp what you are trying to do, since some actions seems to be the same within the Then and Else parts (perhaps this is more a testing flow then actual/real flow)?.

---

<div class="post-metadata">

**Author:** ![Ron\_Meijsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ron_meijsen/32/29929_2.png) [@Ron\_Meijsen](https://community.homey.app/u/Ron_Meijsen)\
**Post date:** [August 31, 2021, 9:02am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/122 "2021-08-31T09:02:06Z")

</div>

Great, as soon as the actioncard is there I will test.

Thanks  
Ron

---

<div class="post-metadata">

**Author:** ![Ron\_Meijsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ron_meijsen/32/29929_2.png) [@Ron\_Meijsen](https://community.homey.app/u/Ron_Meijsen)\
**Post date:** [August 31, 2021, 10:10pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/123 "2021-08-31T22:10:28Z")

</div>

Hi Arie

I have been testing. I found 2 problems

1. the hue motion sensor directly connected to homey dit not react in the barn. Did not send anything bsck to homey. Although there was a hue smartplug 1 meter away which worked ok. Inside the house the motion sensor worked ok. A bit strange. So i replaced the hue sensor with a sonoff motion sensor.

Then it worked for doorcontact(dc) on and montion sensor on or off

1. in the flow when i want to trigger doorcontact off i had a triggercard instead of the doorcontact on card. That is why it went to the else at the bottom of the flow.

This is the flow that works for all situations

[https://homey.app/f/dypduK](https://homey.app/f/dypduK)

In the screenshot below is what i did wrong after the elseif the correct card is the second card. I had at first the 3rd card the triggercard. Deleted the 3rd card and replaced with the second card. Now it works.

 ![Screenshot_20210831-234357_Homey](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/f/5f9626e153992cda770ae7c7fe4dd3db13243324.jpeg)

Thanks for your help  
Ron

---

<div class="post-metadata">

**Author:** ![Ron\_Meijsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ron_meijsen/32/29929_2.png) [@Ron\_Meijsen](https://community.homey.app/u/Ron_Meijsen)\
**Post date:** [September 1, 2021, 4:04am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/124 "2021-09-01T04:04:56Z")

</div>

Hi arie,

I have a similar problem as Arjan. Since i modified the flow above. My other flows do not work anymore.

The thing that could have caused that is that i deleted 1 motion sensor from the flow to another. I have now disabled this flow but no luck.

Update i deleted the flow i was working on now everything works again

Any idea?  
Ron

---

<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:** [September 1, 2021, 6:04am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/125 "2021-09-01T06:04:15Z")

</div>

Hey Ron (And Arjan),

I need to find some time to test it, i tried it yesterday, but i received no faults.  
Any change you could share more info about the flow you made that made HOOP stop functioning correctly?

Any more info, images or flows would be appreciated.

---

<div class="post-metadata">

**Author:** ![Ron\_Meijsen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/ron_meijsen/32/29929_2.png) [@Ron\_Meijsen](https://community.homey.app/u/Ron_Meijsen)\
**Post date:** [September 1, 2021, 6:21am UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/126 "2021-09-01T06:21:28Z")

</div>

Hi Arie,

It is the flow i shared yesterday.  
I have built more flows in the past with no problem

Yesterday the 2 things i maybe did different then before

1. replaced a device with another
2. did some hesvy testing where it triggered the flow about 30 times in 10 minutes.

If you need anything else let me know.

Ron

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

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