How to reuse flows for other devices (make the generic)

Hello.

I used to manage all my devices at home with Openhab (first on a Synology, then on a Raspberry Pi 4), then moved to Smarthings (with an Aeotec Hub). So have a some experience with the configuration, scripting, creation of widgets, …

But I want now to move everything to an Homey Pro, so I have to restart from zero; learning everything.
And I have already questions… like: “how to reuse my flows” on other similar devices.

I found a post mentioning that the Apps Advanced Triggers and Device Capabilities could help to make something “generic”. I also found a post mentioning that “flow templates” can be exchanged when using Device Capabilities… So, it sounds what I am looking for…

Nevertheless, before spending time on reading/trying/… that, could one confirms to me that there is nothing more “native” with Homey ? Shouldn’t I investigate how to create custom cards with Args or Token as input instead ? (I only saw an introductive video so far)… Or is there a way to define parameters (devices) for an Advanced Flows and a way to reuse them (that I didn’t find yet) ?

I am eager to learn, but would like to go directly to the right (best) solution…
[EDIT] I just imported my first flow using TFE, and it will help a lot, for sure… but it’s quite for “advanced” users. I would expect an easier solution for end-users (in the future at least ?)

Many thx in adv for your advices !

V.

Just in case I am not clear on my purpose… I have created basics flows to manage a Philips Hue Bulb with a Philips Hue Dimmer (using the App “Philips Hue, without the bridge”). I have :

  • a flow to turn on the bulb with pressing the on button
  • a flow to it off with pressing the off button
  • a flow to dim the bulb +20% with pressing the dim up button once
  • a flow to dim it -20% with pressing the dim down button once
  • a flow to set the relative dim level of the bulb at 100% with keeping the the dim up button pressed
  • a flow to set its relative dim level at 20% with keeping the the dim down button pressed

This is already quite a long list and it would be really boring to create the same flows for all the other 20 bulbs in my house… I would expect the possibility to create “something” that I can reuse with other pairs of bulb and dimmer as input parameter.

In my opinion, there is no easy way to transfer flows from one lamp with dimmer to another lamp with dimmer. But of course I could be wrong about that.
What I usually do if I have a remote control with 4 on/off buttons, I create the flows for button 1 on/off and the corresponding lamp.
I then copy all flows and give them another name with e.g. Button 2.
Then I stand on a card and click on “replace” then I am immediately at the right remote and choose button 2. You don’t have to go through the whole list of devices then. And at the lamp I also choose replace.

So you can possibly call the lamps and dimmers you have added Lamp 1, Lamp 2, Dimmer 1, Dimmer 2 etc. so you can find the dimmer easier after replacing it.
And after that rename them to what you want.

Thx for sharing your experience.

I did try the App “Device Capabilities” and it works very well (although not IMHO the best user experience for end users). The big advantage is that it facilitates the replacement of the devices in all cards used by the flow.

As explained here: The Flow Exchange(r) - Exchange Your Flows with Others!

  1. I did recreate all the y basic flows for the dimmer and the bulb into a single advanced flow.
  2. I do export this advance flow via App > “Device Capabilities” > Configure > Export (under "the Flow Exchanger)
  3. I copy the text generated after clicking on “Create Exchanger File”. It’s my “template” (I do not click on “Post Template” however, as it’s not the purpose the share it with the Community, for now…)
  4. I do next import this template via App > “Device Capabilities” > Configure > Import (The text of my template is already there). I just have to click on “Read Flows”
  5. I rename there the flow and replace the devices (bulb and dimmer) used in the original advanced flow by those to be used in the new flow. I can also change the arguments used in my flow if any (Ex.: timers).
  6. I click on “Update Text” to generate the new version of my flow, copy the output text and paste it into the developer Homey API Playground (as mentioned below the generated text)

It’s a real tile saving, although a few manual steps a required. And it works very well as I mentioned. Any developer or reasonably advanced user will feel confortable with these manip…

I still have to investigate if it will be possible to bulk update all my flows when I will change something in my template…

Just found this topic/app, it getting a bit towards what you’re looking for, I guess, else it probably might bring some ideas?

.

1 Like

Thx a lot, I will look into this ! I didn’t see that App yet.

1 Like