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

Why is class empty? It should be default Other.
Its other class from creation.

Altho, i guess inow know what happends: when you open settings the first time, it will put the class field to empty, thus an error. I will solved it later.

2 Likes

Excellent! - Care to share? :wink:

1 Like

Sure…

First create a device with a status field, and set button one with the ‘Pushbutton and separate Indicator’ option:

When you press the tile in the mobile app, this flow ‘rotates’ the mode from off to on to auto

By listening to changes to the status capability you can light up of dim the tile with his flow

The same (istening to status changes) can be used to do stuff when the status changes to on (mode is 1) or auto (mode = 2).

This is just a very simple example. My flows for handling my ventilation system are way more advanced (taking toilet use and bathroom humidity into account) but the tile itself only handles the manual mode, rotating the speed of the fan.

Hope this helpes

2 Likes

Still it would be nice to have custom picker capabilities though, that was the biggest thing missing in the (old) virtual devices app IMHO, it had it at the start, until it was made impossible.

I guess now with the new repair function in this app might make it possible to do it at all?, though probably break the capability in flows every time you add or remove a new enum value :thinking:

2 Likes

You mean a dropdownlist?

Technically it is more like a scroll list (cherry picking 1 value, hence the picker name, that’s what it is called in Homey), but you could see it as a dropdown, behaviour is the same, see the capabilities “Thermostat Mode”, “Vacuum cleaner state” or “Home alarm state” as examples.

1 Like

Yeah, i allready have some sourcecode implementing this, not not succesfull. Will work on it, but first gonna fix all loose ends.

2 Likes

as a status indicator I can only put the value in the status. And no more number text why does this no longer work?
Already pressed repair and tried things but it won’t come back. also made a new one, same result.

I mean the numbers and text on the title of the device.

Holy crap, that was fast :smiley:

1 Like

Use the other “set Status” THEN card, there is 2 :wink:

1 Like


This worked normally until yesterday. is something broken?
Number 2 i have no other flow card with 2 ? :upside_down_face:

1 Like

Aaah I see, I read it wrong.
You might need to enable “create flowcards” but that’s the only thing I can think of.

2 Likes

Lol you are right with the flow card on, it works again :smile:

but why create a flow card for this ?

1 Like

Oh, I was kind of gotten used to it. If I want a numberfield as status indicator, I first have to run a flowcard which sets a value to the numberfield.
After that, I can select the numberfield as status indicator.
Probably it can’t be selected while it hasn’t a value yet.

Maybe numberfields should hold a 0 by default @ creation time?

Didn’t try that, thanks😉

1 Like

Hey @Peter_Kawa , @Caseda and @HuisCHovens,

Sorry about the changes. This actually had nothing to do with the new Settings themself, but with a few days back added options to all field to: Create Flow Cards and Create Hidden Fields.

This might get a bit technical, but i’ll still try to explain.
First: A capability is what you would see as a field in AVD. All used capabilities on a device must be unique. You cannot have onoff and onoff. But you can have onoff and onoff.btn2
There are basicly three ways Homey recognises “default” capabilities (Fields/Device-properties) and create functionality (like status indicator), flowcards or handle pushes/clicks:

  • A capabilityname has a specifiek default id like, onoff, button, dim, alarm_contact, measure_temperature, target_temperature.
    When a name is entered exactly like this, Homey will create buttons, flowcards, etc.
    You will get all “real” flowcards.
  • A capabilityname start with a default Homey id plus a dot and a surname, like onoff.btn1.
    If i would only create this capability, it would still function as an onoff button, because it is the first appended yes/no capability/field. But you will not get the Default flowcard: Device is turned on/off.
    That flowcard you will only get with the exact id onoff.
  • A capability starts with a prefix, like alarm_ or measure_
    Alarm_AndOwnName will be flashing red when set to true and capabilities that starts with measure_ gets a) flowcards with value changed greater/smaller then and the are pickable as status indicator @Peter_Kawa. It doesn’t need to be filled to be choosen, it only needs to be filled to been shown as device tile in Mobile.

Okay, now, about the Create Flow Cards (And the hidden fields).
For all (well a few exceptions where i also hide the create flowcards checkbox) fields goes that, you can choice to create these capabilities with a default capability id like onoff, or with an added surfix, like onoff.btn1 or status (own) and measure_status (also own).
So you can have full control over which fields create which flowcards and are pickable in the Status Indicator.

Here for instance: If i create a device and add 3 number fields with flowcards (so the are selectable as status indicator), i also get 6 flowcards, that just mess up my view:

Imaging having 20-30 numberfields: you will not use them all as status indicator, so disabling the Create Flow Cards is a real resource saver when you will not use the flowcards.
I usually won’t, because i can achieve more with the AVD flowcards, and they keep references intact.

I see i only made Status different: it will always set status to measure_ (so it can be selected as Status Indicator), unless Create hidden fields is selected (then the status is hidden from indicators and only the hidden fields is shown there, so you cannot pick the wrong one).

Now, i agree that i still wrestle with the name/definition of “Create Flow Cards”, because it actually does a little bit more.

  • If you want a motion alarm to set off the zone, create flow cards needs to be selected.
  • If you want to pick a numberfield as indicator, you need “create flow cards” checked.
  • If you want a thermostat (see images below) you can select 2 number fields and the will combine (thats how i wrote it). And because one is a measure_ you will get the great/smaller then flowcards, but only for the measure_temperature, not the target:

    Now, if you want the flowcards that you otherwise have for thermostat, you need to select Create Flow Cards.
    When you do that, you will get one more flowcard for each field (target and measure):




So, coming back to my point: i might need a beter name or explanation for the “Create Flow Cards” checkbox and i am open to suggestions :slight_smile:

2 Likes

Long night, early morning was it today :wink:

Do you now how they did it? And why was it made impossible? Is it that Athom doesn’t want it, or just had to close bugs or improve the SDK and as a result it became impossible?

I am not sure how the new Device Settings (repair) should help to resolve the issue: pickers are defined in the app.json before App build, and, as far as i know, there is now way of altering them.
I tried a few ways through capabilityOptions, but no luck so far.

Only think i plan on trying is to create fixed definitions of pickers, say 1, 2, 3, etc in length, with default values like val1, val2, etc, and then try to make titles/translations match does definitions.
But not sure if its gonna work.
We’ll see.

though probably break the capability in flows every time you add or remove a new enum value :thinking:

Why do you say that? Is there a way you have in mind? Because i can get around the breaking of capabilities in flows, so if you have i way to change enum values (or at least there title), let me now, i’ll find a solution to the flow-issue :wink:

Just to be clear: being able to pick a numberfield (or status) as Status Indicator is the exact same reason you get the default greater/smaller than cards: the capability start with measure_ (no matter the surfix). There is no way i know of too not create the flowcards, but be able to pick it as status indicator.

That goes for all “special default” functions, like zone-activity or smoke alarm: to get Homey to recoqnice that also means Homey will create flowcards.

And while the effect may be different for all fields, one thing is the same: you will get some default flowcards.
(One of the reasons for me naming it “Create Flow Cards”.)
But i am always open to suggestions as it makes it more clear.

I hope the new tooltips about the hidden fields also make it more clear.

@Arie_J_Godschalk thank you for the detail explain why the flowcard is needed. It is more than only the flow card. its more how homey works how I understand it from the explanation.

1 Like

And to give people to options to create as less mess as the want and use as few resources as possible.

When you disable most options for fields, you can have many fields, while the performance is very vast.

At least i notice a big improvement with the new settingsscreen.