[APP][Pro] Advanced Virtual Device (Device Capabilities App) with Unique Text Status Indicator

Thanks!


If you also want a status text on your device tile, please continue reading!


Device Capabilities 2.0 App voor Homey | Homey
It’s live!

This Addendum to Device Capabilities (Forum topic) is for explanation on, and examples, for the newly created free fully customisable virtual device.

Fully Customisable Advanced Virtual Device with Unique Text Status Indicator for Device Tile.

You yourself can completely customise these virtual devices, the way you want!

Also allows for the creation of Insights for capabilities of existing devices that have no insights.



To explain how far this goes and how this works, i will create a Livingroom Device, which i will configure to accommodate multiple devices in my livingroom.

I will be using the Web App for this example and Advanced Flows, but neither are needed.

Because of the length of this article, i placed the texts inside summaries, click on them to open to open.

Living Room Example

Create a device

Summary

Goto create a device, then select Device Capabilities, then Virtual Device (the name is up for suggestions and could be changed).
A list with one device will be shown (allthough you can create more if you wish, one by one).
image
Click continue.

Next you can select a icon from the list, or you can upload your own icon.


After that, click continue.
The device will now have been created and you can change the name to Living Room.

Enter the Device Settings

Summary

Because there are a lott of Device Settings, i’m gonna do this step by step.

The status field is unique, and can be used as a textual (and number) status on the device tile in the Web/Mobile App.

I am gonna turn button 1 into an indicator. That means that the device tile in the Web/Mobile App will be light/dark based on that buttonvalue.
You remove a field by removing its name.

Only button 1 can be a hidden button, so i will first use other buttons, until i know what i will use it for.

After removing all fields and pressing save, my device looks empty:

Create Media Buttons

Summary

Firstly, i want my media to show on this device, firstly from my sonos, but we can later overrule that to also show TV info.
We first need a few buttons for this:

Create a Flow

Summary

Now we need a flow to handle this virtual device.
We need to setup the status and reactions to the music buttons.

  • Because the Playing button can be false or true, we need to check the value (waarde)

After this, the playing button on the LivingRoom device can be used to start the music, and it will also show it if music is playing or not.

Next up we need to react to the previous and next button being pushed.

  • No need here to check for the value, it will always be true

Textfields

Summary

Next i would also like to Add the Artist, Album and Track.

And we need the flow for it:

Volume

Summary

First we add a Volume to the settings.

And then we write the next flow.

And, tada, we are done with the Media!

Lets now add the four Curtains that we have in our livingroom to this same device.


Four Curtains

Summary

Again we go into the device settings to add four number fields:

And for those we need flows, two ways.
First a reaction to us change the slider in the Living Room device:

Then we need to update its status:

And now we have, within this one device, my music and my curtains from the livingroom in one device :slight_smile:

Custom Buttons

Summary

Lets continue with Buttons for the TV and Xbox.
First we define the buttons in the device settings:

This gives us two on-off buttons on the small button tab, next to each other, so we see tham al at once.

.

We could actually do the exact same thing with the Yes/No fields, when set to Button


Would result in:

But back to the Buttons, lets add a flow for the TV first:

And next for the xbox:

And the final result us now:



One Main Curtain Button

Summary

Now i want one button for all my curtains, which should be a light button when one is open, and dark when all are closed.

Will result in:

And now for the flows.
First a flow, that when i push the button, i want them to all close/open:

Setting and Using Functions

Summary

And now for the button status to be set.
But for this we first add a function in App settings.
We go to the bottom, fill in average and press add function:


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.


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 are not 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:


let dcApp = await Homey.apps.getApp({id:'nl.qluster-it.DeviceCapabilities'});

Added an API call to set the value of AVD fields:

await dcApp.apiPost('setvalue', {device:'Day-Amount', field:'number1', value:21});

await dcApp.apiPost('setvalue', {device:'Day-Amount', field:'measure_devicecapabilities_number-custom_1.number1', value:22});

await dcApp.apiPost('setvalue', {device:'c34dc5b4-3c30-48a9-8a4e-014aea93d00d', field:'measure_power', value:501});

Added an API call to set the name of AVD fields:

await dcApp.apiPost('setfieldname', {device:'Day-Amount', field:'number1', name:'Day-More'});

await dcApp.apiPost('setfieldname', {device:'Day-Amount', field:'measure_devicecapabilities_number-custom_1.number1', name:'Day-More'});

await dcApp.apiPost('setfieldname', {device:'c34dc5b4-3c30-48a9-8a4e-014aea93d00d', field:'measure_power', name:'Day-More'});






To be continued.

If you would like to add an example, please feel free to do so.


Apps:

Donations or Sponsorship

11 Likes
Share Your Device! - Advanced Virtual Devices from Device Capabilities
The Flow Exchange(r) - Helfen und Fragen stellen
Teilen Sie Ihr Gerät! - Erweiterte virtuelle Geräte aus den Gerätefähigkeiten
The Flow Exchange(r) - Exchange Your Flows with Others!
Share Your Device! (HCS edition) - Advanced Virtual Devices from Device Capabilities
The Flow Exchange(r) - Tauschen Sie Ihre Flows mit anderen aus!
The Flow Exchange(r) (HCS edition) - Exchange Your Flows with Others!
Device Capabilities - Alles rund um die DC App
[APP][Pro] Device Capabilities - Enhance the capabilities of devices
Help set a virtual sensor value
[Profile] Arie J. Godschalk
Zustand virtuelle Schalter und Variablen nach restart homey
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
Zelf afstandsbediening maken
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
Virtual device with status indicator
Virtueel netto vermogen monitor
Converting km/h to m/s in Netatmo app by Athom
Changing Control Type for Smart Shutter Switches After Tuya Update
[APP] ThermoSmart - Faillissement 2023 en overname Plugwise (NL)
Is it possible to get the active user in a flow?
[APP][Pro] Power by the Hour: Insights per hour, day, month and year
Homey pro Übersicht Temperaturen Handyapp
How to get virtual device to show text from variable?
Homey Dashboards | Megathread
Homey Dashboards | Megathread
Lampen dimmen met VD
Request custom picker for Advanced Virtual Devices from the Device Capabilities App
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
How to build a “man down” flow?
Extra decimals for sensor in virtual device
Hulp met automatiseren mechanische ventilatie
Extra decimals for sensor in virtual device
How to see status of a roller blind open or closed
Where is my bottleneck?
[APP][Pro] Better Logic Library - Just some better logic, variable and library management
At all time show open door/window sensors
Energy tab does not show me what I need
Energie Anzeige
Energie Messung werte voneinander abziehen
New App function, but how to use it?
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
[APP][Pro] Solar Forecasts (SolCast + Forecast.Solar)
Problem with Tapo Light?
Create a new device by extracting information from another device
Homey moods reliability issues
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
Alexa mis-reads Hygrometer/Temperature sensors
[APP][Pro] HomeKit Controller voor Homey (NL)
Virtual device for Home battery?
[APP][Pro] SolarEdge + Growatt TCP modbus
What's the current status of heltun devices support by homey?
[Hoe dan?] Zet de waarde van een virtuele sensor
iSmartgate app
MQTT device: text item
[TUTORIAL][PRO] How to integrate Home Assistant with Homey Pro and v.v
Homeydash.com, a Homey dashboard
Markise wird von Alexa nicht erkannt
[APP][Pro] Chronograph - Adds precise timer, stopwatch and transition functionality to Homey
Slow Flow
Sonoff ZBMini 2 en IKEA Trådfri-lamp combineren tot één bediening in Homey
Merge Devices (Power Meter + A/C Base Unit)
[APP][Pro] Home Assistant - Community App
Possible to trace events?
Home overview dashboard
[APP][Pro] Tuya Cloud - This app allows you to connect Homey to the Tuya cloud
[APP][Pro] Home Assistant - Community App
Flow timer - lampen in de zelfde kleur aan
Roller Shutter Counter
TADO smart AC Control - status indicator
Device Capabilities - Alles rund um die DC App
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
Please let me group and hide devices
Change "Power usage when on" with flow
Device Capabilities - Alles rund um die DC App
Flow wordt soms niet uitgevoerd
Berekening op basis waarde 2 integraties: kwh input output warmtepomp voor cop
Group devices
[APP][Pro] SESSY Thuisbatterij (NL)
Floorheating display in homey
[APP][Pro] Dashboards
How to control multiple dimmers with only one dimmer
Virtual (toggle) switch - where can I find these or set it up?
Flow maken Daikin en Aqara humidity sensor
[APP][Pro] Dashboards
Does the homey team have grouping in development?
Using 10^() in Logics calculation and Homeyscript results in different values
Homey Pro - Which Values are the ones to enable Energy Tab Visualization
Possibility to get source of triggered event on Button (like in the timeline)?
Controlling devices at Google Home from Homey?
Trådfri plug in Hue brigde - Missing in homey
In which flow did I use that flow card? How to find?
Homey Pro as universal remote surface
Homey or Hue ignores commands
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
New ZOOZ App and ZEN17 Universal relay
[APP] Tuya - Connect any Tuya device with Homey (by Tuya Inc. / Athom)
[TUTORIAL][PRO] Home Assistant integreren met Homey Pro en v.v
[APP][Pro] Tuya Cloud - This app allows you to connect Homey to the Tuya cloud
[APP][Pro] Tuya Cloud - This app allows you to connect Homey to the Tuya cloud
Prevent Toggle
Linking Homey to Google Home doesn't work
Alternative zu Power by the Hour für BKW gesucht
[APP][Pro] < group > (3.2.4 - Stable)
Lichtfarbe bzw. Weißspektrum Zigbee-Leuchtmittel
[APP][Pro] Better Logic Library - Just some better logic, variable and library management
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
Programming a virtual dimmer
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
How to group devices?
Somfy RTS schermen groeperen
[APP][Pro] Device Capabilities - Enhance the capabilities of devices
Waarde Updaten van Virtueel Apparaat (Thermometer/Luchtvochtigheid)
Waarde Updaten van Virtueel Apparaat (Thermometer/Luchtvochtigheid)
Rechnen mit Homey Pro (2023)
<group> is randomly switching on and off my lights
Have door sensor as zone activity for two zones?
[APP][Pro] Tuya Cloud - This app allows you to connect Homey to the Tuya cloud
Anfrage bezüglich Flow-Zähler für Bewässerungssystem
Garage Door Status
[APP][Pro] Beacon - Detect your presence with BLE beacons
Weergeven grafieken per dag etc
Google Nest - Ansteuerung (Javascript)
[Feature request] Allow variables for power consumption setting of devices that have no power measurement
Groups Plugin not working anymore, how create light groups now
Groups Plugin not working anymore, how create light groups now
Device Capabilities - Alles rund um die DC App
Virtual device problem - value from solar battery not updating
Making of a VD
[Tutorial][Pro] How to integrate Hoymiles Microinverters via OpenDTU and MQTT
Question: monitoring real time absorption without p1 (Italy)
Flows And Devices
Virtual POWER meter and other devices for flow testing
Hue dail tap switch lampen springen aan/uit
How can I display Tasmota data?
A dashboard made by Homey (Athom) might be (not far, far away, but:) on it’s way!
Homey Climate als Gerät/ Flowcard nutzen
Or in standard flow
[APP][Pro] MapMyLocation
[APP][Pro] FTP Client - Control FTP Servers through a directory-based UI in the Homey App or Web App
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
[APP][Pro] Virtual Devices - Virtual Devices to simulate 1 or more real devices
IKEA Gu10 slow response?
Twee waardes optellen en laten zien
[APP][Pro] FTP Client - Control FTP Servers through a directory-based UI in the Homey App or Web App
[APP][Pro] Device Capabilities - Enhance the capabilities of devices
Appairage new Sonoff Zigbee
Gerät schalten in der App sperren
Which interface to do what?
Is there a way to insert dummy items?
Homeydash.com, a Homey dashboard
[Tutorial] powerfox/poweropti mit Homey Pro nutzen
[TUTORIAL][PRO] How to integrate Home Assistant with Homey Pro and v.v
[TUTORIAL][PRO] Home Assistant integreren met Homey Pro en v.v
Dim all lights in a zone in an advanced flow
[APP][Pro] Advanced Triggers - Trigger and action cards with eventname for Advanced Flows
[APP][Pro] Erweitertes virtuelles Gerät (Device Capabilities App) mit eindeutiger Textstatus-Anzeige
Digitale kamer thermostaat
Delay in variable?
[APP][Pro] Device Capabilities - Enhance the capabilities of devices
App zur Steuerung
[APP][Pro] Device Capabilities - Enhance the capabilities of devices
How to change colors of all lights in a zone
[APP][Pro] Device Capabilities - Enhance the capabilities of devices
Homey keynote - 12 October 2022
[Howto] set a value to a virtual device
The new Homey Pro — Ask Me Anything
Tado 0,1gr stappen?
[Request] Widget showing value with color
[APP][Pro] Device Capabilities - Enhance the capabilities of devices

How to request a custom picker?

Goto the topic for it: Request custom picker for Advanced Virtual Devices from the Device Capabilities App - Homey Community Forum

1 Like

[Reserved 2]

Wiki

Hi Arie, I closed my private and business Paypal accounts for good reason. But still I would like to contribute. Do you have another way to support you? I am in NL so a pm with an IBAN does miracles for this case :wink:

Many Thanks Roger for your gracious gift!

1 Like

Homey’s random mood status indicator for mobile app

Inspired by this idea by Arie, I extended it a bit, and it became

You could f.i. use this as “who feeds the cat” indicator, by replacing the moods with names, and run the flow every x hours.
.

- This is the device setting, I used the tag option This is needed to be able to display the moods (text / string value) as Status indicator:

Screenshot (click me)

- In App config, I copied the 'random' function from Arie:

Screenshot

- Code for copy/paste:

function (arr) { 
return arr[Math.floor(Math.random () * Math.floor(arr.length))] 
}

- Flow:

Screenshot

- The tag is from "Textfield 1" and can be found with the devicename in Logics:

Screenshot

- Device tile:


.

.

.

OK, here's the cat thing:

- Flow:

Screenshot

- Device tile:


.

2 Likes

Show the time on a device tile (afaik this was not possible before).

- Flow

Screenshot (click me)

- The [time] tag can be found with 'Date & time'

Screenshot

.

  • Device tile

  • Web app:

Check ook deze, met datum en zonder voorloop nul:

https://community.homey.app/t/app-pro-advanced-virtual-device-device-capabilities-app-with-unique-text-status-indicator/68198/31?u=peter_kawa

3 Likes

- Dummy power consuming device -

When you want the used power of a hardwired boiler, ac unit or whatever, to be present in Homey

  1. First, create a Logics numeric variable (this way you can adjust the value quite easy); Enter 0 as value.

  2. Add a Device Capabilities virtual device, (optional: and pick an appropriate device icon)

  1. Create a simple flow (it’s only needed to set the value)

  1. Change the variable value to, say, 1800:

  2. The device tile now should look like this:

  3. When you like the power value to appear in Energy tab, use this (hardcoded) field

I am a diabetic and have built a min/max temperature display especially for my insulin. It helps me a lot because insulin is not allowed to leave a certain temperature range. But the whole thing works with any temperature.
Here is the example of the outside temperature:

The min/max values are provided by a variable. When the temperature changes, a flow with greater/smaller than compares the current temperature with the number stored in the variable. If the value is greater or less than the variable value, the respective variable is updated.
The variables are reset to 0 at 0:00 in order to always have the current value of the day.

Screenshot_20220905-164638_Homey

Insulin:

2 Likes

Monitor (an) app(s) memory usage

This app now can check any app/system/weather/logic insights,
so with this example flow we can check a memory value, and send alerts,
and optionally disable of restart an app which is memory hungry

The [Number] tag is a local variable

Optional:
you can add an Advanced virtual device, to display the used memory value.

Device settings

Device tile:

2 Likes

Actually, @Peter_Kawa , perhaps do it like this, at least, when the power_usage could be dynamic (could it be off for instance?)

This will make sure that you really have a measure_power that is detected by Homey:

Now you can dynamicly set the power usage value just through the Flowcards:
image

2 Likes

That’s what I was looking for Arie! But I didn’t know how😬

1 Like

Now it's possible to change Device Name as well!

This can be achieved by installing the H.O.O.P. app v1.4.5
That’s it, the flow card to set the device name is now available.

  • With Advanced flow:
  • Standard Flow

Practical example, a thermostat device which also shows the room temperature

The default thermostat device, only shows the target temperature:

But now, with use of the updated H.O.O.P. app, we can show the room temperature as well, by alternating the device name for the temperature tag.

This can be done with the original device!

Peek 2022-09-08 00-12
(right click and open in new tab for big screen view)

.

- Similar example for window coverings position -

Peek 2022-09-08 01-09
(right click and open in new tab for big screen view)

2 Likes

Also an option: Show the percentage in the Device Tile.
image

But, you can still set the Dark/Light of the Tile based on Open or Closed, and have the button react to it.

image

True, but then you’ll have to add a new AVdevice and make it control (a) curtain(s) as well ?

1 Like

Indeed, just in some case can it been usefull, for instance, when you have a living room device showing all curtains.
Just wanted to let you know you could use percentages als in the units :wink:

1 Like

So, using “Show as: sensor”, makes it display 0.45 automatically as 45?

  • EDIT Just tested: No it doesn’t

B/c I still use this to convert it to %

.

Thanks, so it’s nice to have a choice now:

  1. H.O.O.P. to display a value quickly on a tile
  2. Device Capabilities: Create a virtual device which does and shows everything (if possible) you want.

I created a Homey memory and average load monitor as well:

.
Last night I was fiddling a bit too much, and Homey got unreachable. That means, too busy to care for the wifi connection

Looking in Insights, Homey’s memory was over 400MB, and system load over 10.
Well, when that’s the case, Homey is allowed to be restarted automatically!

1 Like