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

Do you mean like this, with a dash instead?
image

1 Like

Indeed.

I have requested Athom to be able to show a text without a number or dash, since there is a difference between the Web App en Mobile App and the need to fix that: i hope they will make it a possibility, but weā€™ll see.

4 Likes

Nice addition sharing devices and flows.
@Peter_Kawa I have tried your ram flow i only get this.

I kept name as in the example. And tokens donā€™t change.

1 Like

Iā€™ll check his avd and flow out tomorrow.

(Link to that shared ADV , for your and my convenience)

Thanks for trying. This one has a bit explanation needed.

As explained in the flow card youā€™ll have to run the flow at least once, then the HomeyScript variables are created on the fly. Then, the ā€œonbeschikbaarā€ (ā€œunavailableā€) tags should change into the ones of my flow screenshot.
Screenshot from 2022-09-21 23-11-06



And, keep in mind, the HomeyScript flowcard is imported as DeviceCapabilities ā€˜cloneā€™. Explanation below!
Screenshot from 2022-09-21 23-22-29


So, click on the blue text, copy the script inside of it (ctrl-A ctrl-C),

Screenshot from 2022-09-21 23-15-54


and replace the card with an AND type card HomeyScript ā€œRun codeā€,
Screenshot 2022-09-21 at 23-37-28 1.HomeyPro Peter

so it should look as the card in the screenshot above, and paste the just copied script.


Homeyscript and Device Capabilities import

2 Likes

Hey @HuisCHovens and @Peter_Kawa,

Iā€™ll build a solution where you, if there are HomeyScript cards in it, can read the code(s) before creating the flow script, so you can choose to not override it with dummies.

(not right now tho) :wink:

1 Like

Okay thanks for the explanation. Itā€™s easier on the computer i will try again in evening.
Android is not always easy with this kind of program. :wink:
.

2 Likes

Device Capabilities 2.6.19 is Live!

With Templates, Import and Export for The Flow Exchange(r) - Exchange Your Flows with Others!
image

Also Templates, Import and Export for Advanced Virtual Device - Share Your Device! (optional includes flows):
image

Start share your AVDs and Flows!

2 Likes

New, also in live:
In The Flow Exchanger (and AVD Export), when you export, there will appear a new button:

When you press the Goto Topic button, there will be a pre-typed message in your clipboard, and you will be send to the bottom of the topic-site, so scroll down a bit and there is your reply button.

Press it, paste your clipboard, alter the header, description and picture and youā€™re readyto: Post that Flow!

image
And



1 Like

I tried creating a adc-VD of type wall socket. I expected this to add the on/off capabilities. Is my line of thought correct, or why does this not happen?

Like a wall plug device, I would like to switch the device on/off (so when in off state, the device is greyed out in the UI).

1 Like

You need to add a button: on off, and create flow cards.
I am at home in about 30 minutes, ill create a AVD for you!

Thanks for the offer Arie, but I now have sufficient info I think.

Really generous though!

2 Likes

Okay Roger :wink:

Still, since i was allready done when reading this, iā€™ve posted the AVD (including the flows) on Share Your Device.

You can select it while creating a new AVD:
image

image

1 Like

Known bug: I am having some issues creating a device from templates, while creating and then reading templates works fine.

In debug it works, when i install normal, it doesnā€™t always work.

Working on it.

EDIT

Resolved in 2.6.31, in test now (waiting for the review).

Hey Roger, and other people.

I just created one more AVD Template OnOff and Dim AVD with Default Flowcards (with Flow).

This to explain how Homey handles Devices classes and capabilities.

Device Class doesnā€™t create anything in Homey, as far as i know.
It only reacts.

Capabilities (what i call Fields) are what creates Homey default flowcards.
For instance, when a Device, no matter the class, has an OnOff capability (only one real OnOff can exists), you will get several flowcards: Devices Turned On, Device Turned Off, Turn On Device, Toggle Device on/off and Turn Off Device.
All the cards on the next image, are created because the AVD has a OnOff(button)+create-flowcards and a Dim(number)+create-flowcards.
afbeelding

This is why there is a Create FlowCards property when you select a default ShowAs type.

Back to Device class.
The example AVD can be turned On Off / dimmed through the flowcards in the image above.
But if you use Default Zone/Class flowcards, it would only react if you have the same Class.
Also other apps, like Group search for classes (sometimes).
Thats why i included the Class option.

Lets say you use the AVD as ā€œreal light controlā€, then you might want it to react to the default flowcard: Turn [[device-class]] On/Off.
If you put this on Turn All Lights On, the AVD is only gonna react if the class is Light (and it needs the OnOff button with flowcards).
image

I hope this clarifies things?

2 Likes

Hi,
I just got my device working nicely.
image

The device is greyed out when not charging, the charging power and energy are neatly updated when charging is in progress.

Now I wanted to add a charging duration, and there are 2 struggles I encountered.

  • I added a text field and called it Duration.
  • I tried choosing a clock as icon for this field, but cannot seem to find the right icon for that. I have seen it, but I just cannot select the right one in one go - and a trial and error is time consuming.
  • I cannot get the duration to work

Struggle/Question 1: could someone please post a complete overview of the default icons in the app?

Struggle/Question 2: I try to calculate the duration since charging started. I can foresee several ways to do it but Iā€™m sure thereā€™s an easier way:

  • use a timer/stopwatch/chronographā€¦ app but I cannot seem to find a way to extract the elapsed time (there are no flow cards for this it seems)
  • use javascript - but Iā€™m not very proficient at this it seems. Taking two snapshots and calculating the time elapsed is a bit of an over-ask for me.

What would be a simple way - and do you have an example somewhere?

Thanks for considering to spend time on my request.

1 Like

You can see al Default icons in the App Settings, where you can change the Custom Icons.
Also, you can give the customicons a name in App Settings by double-clicking in the textarea with the Custom_** name in it. A field will appear and you can alter the custom name to what you want.
After that, the custom icon list in the Device Settings will show your own custom name.

I was allready thinking about to more DC Flowcards:

  • One to ask for the duration (hours, minutes, seconds) that an Insight was changed.
  • The average of a Insights in the last ****

I think card one would solve your question 2?

2 Likes

Aaaah H.O.O.P! That was/is a great app.

1 Like

Hi Arie,

Yes, excellent:
Question 1 solved in App Settings icon overview (which displays an error btw. when opening app settings: Error: Cannot read properties of undefined (reading ā€˜flowā€™) - but it works nonetheless)

Question 2 - yes it would be great if there were a flow card duration-since-last-change for a property. Thanks for considering.

Roger

1 Like

@RogerSt Please send me a app diagnostic after you recieved that error, that would help me resolve it.

Wait, are you running Test or Live?
Live has a bug yeah, solved in test (with a lott of other improvements and bugfixes).