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

**URL:** <https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287>\
**Category:** Apps\
**Tags:** flow, virtual-device, homey-pro, device-capabilities, avd\
**Created:** [February 19, 2021, 8:20am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287 "2021-02-19T08:20:51Z")\
**Posts on this page:** 20\
**Page:** 89

<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:** [August 19, 2024, 2:56pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1794 "2024-08-19T14:56:58Z")

</div>

> [@Rrrr](#):
>
> Is there a way to update Insights to the actual fields?

No, not throught the app.  
Perhaps with HS?  
Only solution for this is using the Create Hidden fields option every AVD field has.  
This is why the option is there: it will create extra hidden fields that never change the ID, so that you can use those fields for the insights, which will then never change. Even when changing icons or whatever, the hidden fields will keep the insights.

> [@Rrrr](#):
>
> Not sure it is something you would know as app developer, if not I can ask Athom next.

I am not sure. I guess a little bit yeah, but how much that effect is, i do not know.

> [@Rrrr](#):
>
> Please note: Insights for both number fields Temperature (Target) and Temperature (Measure) are not shown in Homey Insights

Okay, never knew this.  
I guess here you can also check the option for hidden fields to create insights.

---

<div class="post-metadata">

**Author:** ![Rrrr](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/rrrr/32/629_2.png) [@Rrrr](https://community.homey.app/u/Rrrr)\
**Post date:** [August 19, 2024, 3:18pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1795 "2024-08-19T15:18:06Z")

</div>

@Arie_J_Godschalk It is still a little difficult to me, I appreciate your patience. I would prefer to discuss current status only and not old stuff that may confuse.  
I refer to this option, which you approve:

> [@Peter\_Kawa](#):
>
> the ‘temperature’ indicator shows the remaining duration.

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/6/9602afe2d7985e832553a96afe8dd8944097187f.png)

> [@Arie\_J\_Godschalk](#):
>
> But using the Unit field of a numberfield to show and update text on the device tile (and the AVDs special Status Indicator Field used that Unit text), that is very heavy on the mobile app especially

I am not aware why anyone would update the Unit(s) field of a number field? Do you mean the Units field where in the example it says “min.”?  
Are you perhaps referring to an old trick?

> [@Arie\_J\_Godschalk](#):
>
> And since a Textfield-value can now be shown as DeviceTileText

What do you mean with “shown as DeviceTileText”? Is this something internal?  
Do you mean the status indicator field of the device?

---

<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:** [August 19, 2024, 4:34pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1796 "2024-08-19T16:34:58Z")

</div>

> [@Rrrr](#):
>
> I am not aware why anyone would update the Unit(s) field of a number field?

Because it used to be the only way to show text on the device tile.

Both examples that you use, use the same resources (and are not heavy).

---

<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:** [August 19, 2024, 4:36pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1797 "2024-08-19T16:36:43Z")

</div>

> [@Rrrr](#):
>
> Do you mean the status indicator field of the device?

Yes, since my call with Emile, since about one year, you van select any Textfield as Status Indicator, which will be shown on the device tile.  
If you want to show text on the device tile, using a text field is the best way for that.

---

<div class="post-metadata">

**Author:** ![fmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fmb/32/27097_2.png) [@fmb](https://community.homey.app/u/fmb)\
**Post date:** [August 31, 2024, 9:30am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1798 "2024-08-31T09:30:31Z")

</div>

I assume the answer can be found somewhere in this topic, but I have been unable to find it so far.

I am now adding advanced virtual devices to be able to easily make a sum of the values measured by other actual devices. Previously I managed this with flows, but this method works better.

However I would also like to calculate the difference between two values (or actually three 🙂 ), but I can only select to have the sum of those values as calculation. Is it possible to also do some basic calculations here?

Like; value1 + value2 - value3  
Not sure of BLL expressions can help here?

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 31, 2024, 11:09am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1799 "2024-08-31T11:09:27Z")

</div>

Haven’t seen a question about diff as well.  
This works in homeyscript:

```auto
let diff = _.difference([1, 3], [2, 6]);
log (diff);

```

Returns: `[1] [3]`

[Source](https://lodash.com/docs/4.17.15)

Now I think it could work like this, but no results (I miss error msgs)

> ![1000033632](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/b/cb3562fef15d7eef5e1e62eb740fb9ed775771c9.jpeg)

Edited:  
BLL expression used:  
`_.difference([$values[0], $values[1] ])`

\_

> [@fmb](#):
>
> value1 + value2 - value3

This should work I think

> ![1000033634](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/3/43c313678f7d49854367fbfd0d0bdd3b516fe956.jpeg)

Edited:  
`round($values[0] + $values[1] - $values[2])`

---

<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:** [August 31, 2024, 1:51pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1800 "2024-08-31T13:51:47Z")

</div>

@fmb  
@Peter_Kawa

Peters examples should work except, you should use `$values[x]` instead of `$value[x]`.

So, for example, place this in the **Calculation BBL expression** :  
`$values[0] + $values[1] - $values[2]`

And then just leave the plane **BLL expression** field empty.

---

<div class="post-metadata">

**Author:** ![fmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fmb/32/27097_2.png) [@fmb](https://community.homey.app/u/fmb)\
**Post date:** [August 31, 2024, 3:10pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1801 "2024-08-31T15:10:56Z")

</div>

Thanks @Peter_Kawa & @Arie_J_Godschalk  
This works!

[Above edited based on reply]

So I used indeed:  
Calculation: BLL  
Calculation BBL expression: $values[0] + $values[1] - $values[2]  
BLL expression: [leave empty, so unchanged from default]

---

<div class="post-metadata">

**Author:** ![fmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fmb/32/27097_2.png) [@fmb](https://community.homey.app/u/fmb)\
**Post date:** [September 1, 2024, 7:39am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1803 "2024-09-01T07:39:42Z")

</div>

Oops, missed that one. And indeed, that works as well. Will adjust my earlier reply.

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [September 2, 2024, 7:54am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1804 "2024-09-02T07:54:51Z")

</div>

I wonder if any "Show as options as Boolean, where change by Tags / script possible (but not allowing UI to change)

To test, created fresh AVD (also) for boolean-type of data:

e.g. boolean “sensor” :  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/f/cff3cf526510551b14aa581c4e59a9ef475801d6.png)  
and boolean “ON/OFF button”  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/4/c4c1633ac469ff7f5f640c1e9a45805c4a9a6040.png)

When trying to update each (with HomeyScript)

> result = await device.setCapabilityValue(capability, target);

**field4** (1233w) allowing change of value wo issue - result looks like:

> { transactionId: ‘homey-api-axxxx-63a1-4dac-a1a7-e5xxxxxx’,  
> transactionTime: 1725260095481,  
> value: true}

but on **field3** (1233r) I get error “Capability Not Setable”:

> Failed to update value: HomeyAPIError: **Capability Not Setable**  
> at Device.setCapabilityValue (file:///node\_modules/@athombv/homey-core/dist/lib/Device.mjs:749:19)  
> at process.processTicksAndRejections (node:internal/process/task\_queues:95:5) {  
> statusCode: 400,  
> description: ‘ **Capability Not Setable** ’  
> }

same error if changing to any of “show as: alarm xxxx” - must be due below:

> ‘alarm\_devicecapabilities\_boolean-custom\_17.boolean1’: {  
> id: ‘alarm\_devicecapabilities\_boolean-custom\_17.boolean1’,  
> type: ‘boolean’,  
> …  
> getable: true,  
> **setable: false** ,  
> …  
> }

Is the only way to set is as number sensor? Then would be e.g. (and can live with it if no other choice 🤐 ):

![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/c/1/c1ecd157ae285ed253e013a473642ff8a7eb87c4.png)  
where:

> ‘measure\_devicecapabilities\_number-custom\_17.number29’: {  
> id: ‘measure\_devicecapabilities\_number-custom\_17.number29’,  
> type: ‘number’,  
> …  
> getable: true,  
> setable: true,  
> …  
> min: 0,  
> max: 1,  
> step: 1,  
> units: null,  
> decimals: 0,  
> …  
> }  
> }

Bottons not used as no insights:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/3/7/370d98f7a5a9ef7ab15bed02e69773761982e5aa.png)

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 2, 2024, 12:23pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1805 "2024-09-02T12:23:55Z")

</div>

> [@Eko\_taas](#):
>
> Bottons not used as no insights:

To me it seems very logical when insights only are created & become available after the first event.  
No initial event = no insights 🤷‍♂️

---

<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:** [September 2, 2024, 1:00pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1806 "2024-09-02T13:00:10Z")

</div>

Im not entirely sure i understand what you want.  
But booleans also have only insights in the Homey App, the same as buttons.

But you can set Booleans through the flowcards.

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [September 2, 2024, 1:56pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1807 "2024-09-02T13:56:18Z")

</div>

Curious, did you get some results with  
` _.difference([$values[0], $values[1] ])`  
?

---

<div class="post-metadata">

**Author:** ![fmb](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/fmb/32/27097_2.png) [@fmb](https://community.homey.app/u/fmb)\
**Post date:** [September 2, 2024, 2:13pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1808 "2024-09-02T14:13:02Z")

</div>

Don’t know, did not test it 🙂

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [September 5, 2024, 1:15pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1809 "2024-09-05T13:15:06Z")

</div>

My Homey is offline (mod data failed for some reason 🤒), so giving principle answer only…

Let me explain basic reason and idea I have implemented:

- AVD has say 60 values to be updated from external (actual) device (via http)
- around 10 of them of above values are also writable (via http)
- Out of read/write variables some are status 1/0 (of which I wanted to show as True/False in UI)

main issue: I have noticed, that sometimes write command is refused even originally reported OK (can happen even minutes away due ext.device own logic / protections) (sidenote only: yes, I do misuse (safely) that device to me benefit 🙂 )

To counter that my idea was to

- separate read and write parameter e.g. 1234r and 1234w
- allow user to change (only) write-parameter (i.e. only 1234w)
- read parameter is always actual value from ext.device and shown to user as sensor value)
- And when both 1234r and 1234w has insights (1/0) I can compare them easily for trouble shooting

Regarding flow-cards I (always) try to minimize them as much as possible - instead using generic scripts (thanks to this forum help), so that multiplying device and its functionality has been very easy… (even in this case will have only one of these, want to follow same philosophy…)

I hope this clarifies my reasons and intentions…

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [September 10, 2024, 5:28pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1810 "2024-09-10T17:28:39Z")

</div>

> No initial event = no insights 🤷‍♂️

Finally Homey back online so can show some new findings on my AVD:

Example “write” parameter has these settings (i.e. with insights):  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/4/14362359ff1f20b944c4f0307bbddc34da70961a.png)  
vs. “read” one  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/0/708c302ec284325bd932b593929dfb19e380369c.png)

Then I push 1215w ON and OFF (from UI) several rounds of :  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/3/73f8e51dfb63644a92e9e9e9d247cc1ff587d801.png)  
and  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/a/9/a9c13cc37509260da7d8a685f029c6af27d83c09.png)

and can see from AVD-history-log:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/2/225e129d1fcf80fa87dccb8a7679fdc0ebd0ea82.png)

Now to (refreshed) insights - so changed 1215w (botton one) not seen, but only 1215r (number one):  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/c/8cedb03bdfbea1ea19c16bddbcb3b4418cc1d4c1.png)

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [September 11, 2024, 11:41am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1811 "2024-09-11T11:41:18Z")

</div>

(Just to close to loop…)  
Resolved issue by moving all write “botton”/boolean to be as sliders/number

e.g. 1215w as slider - testing (1215 **t** w) was OK for UI (web and app) and Insights point of view:  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/8/1/81198f1d6cc92997fee628b68df503dd47aeb96e.png)  
 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/f/5f5d2ad841d49b0e0a6b87db573b7dde4ab292bb.png)

Can live with this 🙂

add:  
now device online, and seem to work as wished for (delay acceptable as only \<10s) e.g. 0 =\> 1 =\> 0

 ![image](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/4/4/441b974e9ff4716194ffe452f57559758b4b2acd.png)

---

<div class="post-metadata">

**Author:** ![daniel3](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@daniel3](https://community.homey.app/u/daniel3)\
**Post date:** [September 16, 2024, 6:57pm UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1812 "2024-09-16T18:57:17Z")

</div>

I have an questions regarding insights for a device I have. The Device has the following Status Indicator Fields:

 ![Screenshot 2024-09-16 203218](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/6/c/6c6d9a4103188312ede992dd87637915e7a89511.png)  
 ![Screenshot 2024-09-16 203228](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/e/7e6a39aa50c51ffaaf2c353ca4617d11f8e4a89b.png)  
 ![Screenshot 2024-09-16 203236](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/e/7/e77deda143d12d97d7abfddbb848a0a2afa624bd.png)  
 ![Screenshot 2024-09-16 203245](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/d/4/d44e2939253eab103ed9e762be03d6b575b90ecd.png)  
 ![Screenshot 2024-09-16 203257](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/a/9a7ed94d8b9483d6819e010dbc497adebe39716d.png)  
 ![Screenshot 2024-09-16 203307](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/9/1/911ae05f295e4ed12fad23a7e63ec8721923c36c.png)  
 ![Screenshot 2024-09-16 203318](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/5/d/5d712e8b18b9f268feef6b43f37e8726d4f40565.png)

With these settings there should be insights for the following fields:

- Gem. afgelopen uur
- Gem. afgelopen uur (licht sensor)
- Donker

But when I check with Insights I have the following insights:

 ![Screenshot 2024-09-16 205638](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/2/3/23bd63f5ab9e9edbbb17d9ef37548b4f434797c0.png)

Is there any way to only see the Fields that I selected?

---

<div class="post-metadata">

**Author:** ![daniel3](https://avatars.discourse-cdn.com/v4/letter/d/a4c791/32.png) [@daniel3](https://community.homey.app/u/daniel3)\
**Post date:** [September 22, 2024, 1:48am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1813 "2024-09-22T01:48:37Z")

</div>

Does anyone have an idea how to solve this?

---

<div class="post-metadata">

**Author:** ![Eko\_taas](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/eko_taas/32/74256_2.png) [@Eko\_taas](https://community.homey.app/u/Eko_taas)\
**Post date:** [September 22, 2024, 6:01am UTC](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287/1814 "2024-09-22T06:01:45Z")

</div>

Just one thing I have seen before: If you create AVD with some insights, then rename field / change something (e.g. symbol) / remove insight selection, old ones also remains in selection (even if not new data).

Create new AVD with Repair / export TEF and copy to desktop / create new AVD / import TEF

I hope this is solving your doubt…

[Previous page](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287.md?page=88)

[Next page](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287.md?page=90)
