[APP][Pro] Device Capabilities - Enhance the capabilities of devices

Please, anyone, everyone, help me:

I need a beter description for the property: Create Flowcards.
What it does:
It makes the fields ShowAs the real deal.
So if you select OnOff and set Create FlowCads to true, the AVD will get a real OnOff property, which is recoqniced by Homey and other Apps as a device having a real OnOff button.
This is why you also get Flowcards.
(Only one type ShowAs with Create Flowcards can exists, a Device can only have one real OnOff button, or one real Dim)

Same goes for f.i. measure_temperature, etc.

I did indeed do that last time, but really didn’t come up in google. I started all over again now, and it does come up now. Very strange maybe I saved a different class the first time so it doesn’t change and therefore doesn’t come up in google as well? In any case thank you very much for your thoughts

I have just added another Flowcard to Test (in review by Athom).

image

You will get a JSON containing all (advanced) flows which contain the selected items.

You can filter the items that is looked for:
image

Use

  • test
  • c31ecacc-26fe-448e-ab00-d109618c8382
  • Device Cap*
  • [{id:‘f6ef2b6f-e3f2-4ecf-a205-4f919a7a6d3f’}, {name:‘Test AVD’} ]
1 Like

I thought about:
“Create real capability + Flowcards” with an explanation like
“Only 1 per type allowed (like OnOff/YesNo/Thermostat); But, virtual capabilities may use unlimited equal capabilities”

Could you maybe make the option in it, that you can also calculate a number with variable? Like example:

1 Like

There is an Set [expression] card, which allows for javascripts calculations to be used.
Use can set functions to be used in the App Settings–> Functions.

See the topic main text above and goto: Setting and Using Functions

1 Like

But for this we first add a function in App settings.
We go to the bottom, fill in average and press add function:
image
Then we scroll down and press on edit, and fill in the function:

function () {
  var sum = 0.00;
  for( var i = 0; i < arguments.length; i++ ){
      sum += parseFloat( arguments[i], 10 );
  }
  return sum/arguments.length;
 }

Please note that you don’t give the function a name in the codefield, but in the namefield.
image

No we go back to the flow for the curtains.
For this we use a Set field to Expression card:
image

And here we use the average function from the App Settings.
All the number tags arenot from the flowcards (because only one trigger triggers the flow), but the tags from the curtain-devices.

And once again, tada! We can now close all curtains in the Living room with one button, next to the tv button :slight_smile:

Ow thank you very much, this indeed works

1 Like

I actually have a question about the ‘watch’ function. In fact, I created the flow below to test it. But I get the same response every time. Even though I ask via google to turn on the lamp or via the flow. Am I doing something wrong?



Hey Erikje,

I am currently out of running / sick, but as soon as i am able, ill pick up all support items.

Well that will come another time, hope you feel better soon. That is really more important

1 Like

Hey Erik,

Is the device you are using an AVD?

By any change, have you created the AVD or field, then the flow with the watch in it, and then enabled create Insights for this field?

If so, i found a bug that it would not refresh the insight reference if the watch was put in place (the first time) before the insights where created by the AVD. This is resolved now in develop.

For all normal devices, i have found no issues.

So, please, let me know if it was an AVD, and if so, update to the new version and check again?

(You could also just restart the app and then it already should work because the watches are reloaded).

I have just update DC in Live to version 2.7.10.

Changes are:

  • In AVD Settings, Create Insights is hidden for buttons that cannot have insights.
    That are all pushbuttons (not On/Off) that you can only push (also buttons like Speaker Next f.i.).
    There is one exception :slight_smile:, the Pushbutton and separate indicator.
    This is the only know (virtual) pushbutton in Homey that can have insights who pushed it!
  • Improved sorting of ShowAs of Buttons.
  • Added Homey icon (old one i guess now) to the default icons (category Devices).
    Thanks @RonnyW!
  • Added icons to defaults that i got from Athom through nl.qluster-it.DeviceCapabilities request for icons · Issue #159 · athombv/homey-vectors-public (github.com)
    Thanks @Ivo_Derksen!

Bugfixes:

  • Watches would not give correct insights if insights were created after the watcher (only happend with AVDs)
  • Set Warning (AVD flowcard) was not registered anymore.

If i missed any tickets for support, let me know, but i believe i have handled all support tickets :wink:.

2 Likes

Just so people know, who want to switch to the new Homey Pro 2023, but don’t want to rebuild al there flows.

With The Flow Exchange(r) (TFE) - Exchange Your Flows with Others! from the Device Capabilities App voor Homey | Homey you can completly export/migrate your own flows from your older model to your new model.

During import, all old devices will show lists of compatible devices on your new homey.
image

You can then select the device on your new homey, which would have the same name i guess.
After that a script is created to recreate all your flows (including variables and stuff like that).
Also, internal references to flows itself are already correctly by TFE.
And many apps are supported by it.

Personally i already use it a lott to copy/paste complex flows which are the same for all (bed)rooms but with different devices, changing it during import.

Now, currently, it only supports advanced flows, but i’ll change that so it will include normal flows (which is almost done already).
Also, recreation of flow-folders will be included, as will other requirements needed to copy the complete flows from an older Homey to a newer Homey, like beeing able to copy/paste your own flows including HomeyScript codes in there original cards.

9 Likes

Hey Arie,

No it’s just an ikea lamp where it didn’t go well. But since update today, it totally works :). Thanks a lot

1 Like

Just an ignorant question: is there no way to restore a backup from a different (older) Homey model? Would it not recreate everything?

Yes that could be done, you can allready exchange flows between Homey’s, and reselect devices during import.

But currently, it creates new flows, not update existing flows.

If athom doesn’t have migration available, i will make The Flow Exchange(r) beter to handle the migration, if that is what you mean?

1 Like

I’m serching an easy possibility to create a mode-like capability. I know modes are only predefined and not possible as virtual device. So I made a device with am “main” on/off switch and 3 mode switches:

grafik
grafik

The example shows a heating mode devide. The main device is: heating on/off.
The other switches are: at home, away, at work.
I change the heating plan depending on the selected switch.

Currently I act with flows on a switch going on and then I switch all other states off, so only one is active.
It’s a bit ugly, but I have no other Idea so solve this in a better way. Has anyone a better solution?

No, sorry, what I means was: If there is a backup-restore option that can help me move to a newer Homey model, then why do I need flow exchange? I mean it’s great for copying devices for myself and for others, so I do see the value, just not for the scenario of replacing a Homey device itself.

No, before, the thought was that there was gonne be no migration to the new Homey right now.
In that case, The Flow Exchange(r) could help to migrate.

But now it seems migration (through backup-and-restore) might be supported by Athom, so in that case, no need for TFE to help there.

1 Like