# 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:** 1\
**Showing post:** 1

<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 4, 2021, 6:22pm UTC](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709/1 "2021-03-04T18:22:00Z")

</div>

**UPDATE: Triggers (and condition-triggers) with argument Time!**  
This way you can have one flow trigger at different times.

**Update: Its Live: [H.O.O.P. | Homey Community Store](https://store.homey.community/app/nl.qluster-it.HOOP)**

### Bringing you H.O.O.P (Dutch for Hope).

Homey Object Oriented Programming (for advanced users).

This apps transforms your Homey in a programmable object, changing standard flow behavior.  
Take a look at the diagrams, examples and overal usages explanations.

Create one (or more) Method Group device(s) and use it like in an Object Oriented Programming manner.  
Give it (overloadable) methods which will handle their own objects (devices, flows, variables, etc), removing the need for repetitive flows.

Also allows the execution of (almost) any Actioncards (Then-Cards) (installed on your Homey) as Conditions and await them.

Or change the conditions way from “if-or-or” to “if-or-finally” or “try-catch-finally” so as to not have to repeat (condition)actions.  
And add If, Or, Then, Else, Else-If and End-If within(!) the condition part of a flow.

Throw errors which stacktrace, handle them or just Return;

### Please check all flow-cards from the App aswell as the flow-cards from the devices.

# Examples

Examples will be collected on another Topic to keep it in one place:  
[H.O.O.P. (Hope) - Examples](https://community.homey.app/t/h-o-o-p-hope-examples/45114)

# App Flows Actions and Conditions

- Await - Awaits any start-able flow as condition
- Wait - A timeout, useful in Await calls
- Throw - Throws an error, useful in Await calls

# App Tokens - global but always recent and scope bounded

- error
- stacktrace

# Devices (and there Flows)

- [Method Group](https://community.homey.app/t/h-o-o-p-hope-method-group/43911) - Turn flows into (awaitable) methods with arguments
- [Trigger Cards](https://community.homey.app/t/h-o-o-p-hope-card-overloader/45512) - Use any triggercard in your Homey as H.O.O.P. trigger, and/or add multiple triggers as conditions, so you only need one flow!
- [Action Cards](https://community.homey.app/t/h-o-o-p-hope-card-overloader/43912) - Run any ActionCard as condition
- [Flow Director](https://community.homey.app/t/h-o-o-p-hope-flow-director/43970) - Add If, Or, Then, Else, Else-If, End-If within(!) the condition part of a flow, or try-catch
- [Flow Variables](https://community.homey.app/t/h-o-o-p-hope-flow-variables-in-line-flow-variables/44327) - In-Line scoped flow variables with javascript expressions and Json handlers with default javascript Functions that can be created in the settings.  
  

# **You first need to create a Homey Elevator device.**

You need to grant ‘developer’ access rights’ to the app.  
In Homey App, add device from H.O.O.P. called Homey Elevator and follow the steps.  
It won’t really create a device tho.  
If you get an error, use the App Settings to Elevate the App.

### Working on

- Action Cards freetextfield - Set any fieldtype (like dropdown) of any card from a textfield (so you can use variables)
- Array Adapter (to be used for example with the LaMetric Time, almost done)
- Array (text, number, boolean)
- Dictionary
- Direct (Awaiting) variable management (Action Cards allready can be used for that)

**UPDATE: Multiple triggers in one flow!**

### Apps:

> [@\[Profile\] Arie J. Godschalk](https://community.homey.app/t/profile-arie-j-godschalk/70663/2):
>
> Apps developed or maintained by me: [Advanced Triggers](https://community.homey.app/t/app-pro-advanced-triggers-trigger-and-action-cards-with-eventname-for-advanced-flows/65651) , [BeNext](https://community.homey.app/t/app-pro-benext-benext-devices-for-homey/76104) , [Better Logic](https://community.homey.app/t/app-pro-better-logic-just-some-better-logic-and-variable-management/5568) , [Chronograph](https://community.homey.app/t/app-pro-chronograph-adds-precise-timer-stopwatch-and-transition-functionality-to-homey/18214) , [Device Capabilities](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287) , [Advanced Virtual Device](https://community.homey.app/t/app-pro-advanced-virtual-device-device-capabilities-app-with-unique-text-status-indicator/68198) , [FTP Client](https://community.homey.app/t/app-pro-ftp-client/70876) , [Google Services](https://community.homey.app/t/google-services-app-for-translate-and-new-text-to-speech-for-any-device-with-url-input/43257) , [Homesh Controller](https://community.homey.app/t/app-pro-homesh-controller-homesh-satellite-connect-homey-pro-2023-to-homey-pro-for-led-speaker-zwave-satellite-and-network-resource/70369) , [Homesh Satellite](https://community.homey.app/t/app-pro-homesh-controller-homesh-satellite-connect-homey-pro-2023-to-homey-pro-for-led-speaker-zwave-satellite-and-network-resource/70369) , [JSON Handler and Manipulator](https://community.homey.app/t/app-pro-json-handler-and-manipulator/66317) , [LOQED](https://community.homey.app/t/app-pro-loqed-your-personal-doorman/89816) , [Music Url Converter](https://community.homey.app/t/music-url-converter-play-music-urls-on-homey-bigger-then-900-kb/43546) , [Simple Log](https://community.homey.app/t/simple-log-app/146) , [Universal Media Player](https://community.homey.app/t/universal-media-player-a-generic-storages-place-for-your-homey-speakers-tvs-or-other-media-devices/43450) and [Virtual Devices](https://community.homey.app/t/app-pro-virtual-devices-virtual-devices-to-simulate-1-or-more-real-devices/1723) . [Goto profile of Arie J. Godschalk](https://community.homey.app/t/profile-arie-j-godschalk/70663) for more …

### Donations or Sponsorship

> [@\[Profile\] Arie J. Godschalk](https://community.homey.app/t/profile-arie-j-godschalk/70663/3):
>
> Donations or Sponsorship. You can help with the development, maintenance and support for the Apps, by donating or becoming a sponsor. This would be much appreciated! The more donations i receive, the more time i can make free for development and support. slight_smileDonations can be done through: [[PP] PayPal](https://paypal.me/QlusterIT) Requires a PayPal account. [[GS] Github Sponsors](https://github.com/sponsors/XeroxQ) Allowes for CreditCard. Sponsorships can be done through: [[P] Patreon](https://www.patreon.com/QlusterIT/membership) Requires a Patreon account. [[GS] Github Sponsors](https://github.com/sponsors/XeroxQ) …

---

_[View the full topic](https://community.homey.app/t/h-o-o-p-hope-homey-object-oriented-programming/43709)._
