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

Heya @HexaDroid ,

I’ll look into my opening “statement” :wink:

For flowcharts, you first need to create the device(s that you want).

Because of the many flowcharts, the are linked to devices, grouping them together.

Hi all,

I have a problem building a flow with H.O.O.P…

Situation:

One Aqara door sensor
One Zigbee light bulb

Both installed in the same room. I now have 2 non-H.O.O.P. flows. One when the sensor alarm goes to ON (the door just opened), turn on the light. And one when the alarm goes OFF (the door just closed), turn the light off.

I want to combine these 2 flows in 1 H.O.O.P.-flow.

This is what I got so far. The first part works. Alarm goes to ON, the light goes on. Turning the light of does not work, which makes sense in a way because the flow is triggered when the alarm goes to ON.

Any help would be highly appreciated.

Regards,

Dennis

Hi Dennis,
The flow shouldn’t start with the sensor trigger, now it only triggers if sensor=on
& you missed adding the first IF THEN statement
I think this works

1 Like

Thank you! Will try and let you know.

Regards,

Dennis

So I tried it and put this together:

It didn’t work. Any ideas?

This should work (from an other H.O.O.P. example) maybe you can compare it.

Yes I know. Your previous example makes sense. I must be doing something wrong.

Could it be that the elevated device isn’t working?

I don’t get it. This should work imho. The sensor cards of course have to be H.O.O.P. trigger cards, with “if sensor A is on”
But even then, I tested it, but the flow seems dead. The papertrail logs don’t get triggered too…

So you experience the same thing?

Maybe the app developer can take a look?

Did you replace the sensor cards with Hoop triggercards?

Hey Dennis,

The added trigger cards are not supose to be within the IF-THEN-ELSE part.
Just place ALL triggercards before any other conditional cards.

What you want is this:
image
This part will take card of all triggers; it will make sure the flow is triggered by all trigger cards.

After this you can create your IF-THEN-ELSE part.
But i think what you want is the below example:

I just used a “direct” HOOP trigger (Sensor On) and added a second trigger (Sensor Off).
Then a simplyfied If-Then statement.

(If you want to trigger this flow to test it, you can use the HOOP Await card, like this:

)

I’ll update the HOOP cards with some more information.

N.b.
There is no way to make an (added) trigger part of a condition.
Because to run the trigger-condition, the flow would have to be triggered, before knowing if it should be triggered.
So, adding a trigger is just like telling the flow simply: if …(Seonsor on) trigger flow and if …(Sensor off) trigger flow and if …(Button pushed) trigger flow.

1 Like

EDIT
This works indeed Arie. Not that I doubt that, but to see for myself :wink:

It’s nice to see the different possibilities!
Somehow this is more logic to me to read:

|2021-05-31 14:19.13.226||Lamp aan [Flow TST Beweging J/N]|
|2021-05-31 14:20.14.691||Lamp uit [Flow TST Beweging J/N]|
|2021-05-31 14:23.13.946||Lamp aan [Flow TST Beweging J/N]|
|2021-05-31 14:24.20.292||Lamp uit [Flow TST Beweging J/N]|

Original post:
Thanks Arie. Crucial info I wasn’t able to put together myself. It makes sense the way you explained it (very well).
Cheers,
Peter

1 Like

@Peter_Kawa & @Arie_J_Godschalk

Thank you guys for your info and time! It works!

The ‘trigger card’ part makes sense. And this Will save me and my Homey a lot of extra flows.

Thanks again guys!

Regards,

Dennis

2 Likes

I think your way is more readable too.

Only difference is, the Triggercards has a lott of Tags, like text1 or boolean3.
Those will be filled with the real values of the real trigger, based on tag-index of real trigger.

So, for example, if you would use my Google Service TTS Devices, the have a URL Triggered card.
It has 3 tokens, URL, Text and Duration.
If you use a HOOP Trigger Card for trigger, you can use those tags:


(Text2 would be the Text-tag from the original triggercards, Text1 would be the URL)

1 Like

Dennis, to really minimize your flows for this specific function you want, you can use the Timer app, and use only two cards.
The Timer card switches the light on, and then off after X secs.
Your flow would look like this

Now I onderstand a little bit more of H.O.O.P… With the examples I will be able to combine a lot more flows. The door sensor was the first step.

The timer app would apply better in a situation where the door isn’t always closed after it was opened. In my specific case it is a door that will always be closed after opening.

Regards,

Dennis

I get it. In my head it was ‘a sensor’ :relaxed:

1 Like

Well I have some lazy Friends, so the timer would be great for the toilet. :slight_smile:

2 Likes

Hi @Arie_J_Godschalk & @Peter_Kawa

Me again.

Question. You helped putting together my “turn on light when door alarm is true” flow.

When I want to make the same flow, but then for a motion sensor when triggered then turn on a light. Do I need to add a new method group device, or is there a way to use the same method group device? Something with a certain number or string?

Because when I create that flow based on the method group device, it does not work unless I deactivate the flow and hoop trigger flows that I made with your help a few days ago.

Regards,

Dennis

@Peter_Kawa & @Arie_J_Godschalk

Any ideas? Not meaning to push you guys, but I always need a little guidance pointing me in the right direction.

Regards,

Dennis