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

Hi !
Thanks for this app which seems very powerful. I’m facing a very basic issue :

I’m looking to use AVD to create a virtual device to regroup every light in my kitchen and display this device on Apple Home with HomeKit. I’m using Homey as a brain but I prefer Apple Home way of organizing the UI, I’m also using Alexa as a voice assistant which mean I should use some restricted type of device because some of them are not recognized by Alexa.

Lights with on/off button are theoretically ok in Alexa and HomeKit. Before trying to regroup all my lights into one virtual device, I was trying to create an AVD with light type and see if it works in HomeKit.

My main issue is the following :
When I create AVD with light type, it shows on Homey and HomeKit. But when I’m hitting the switch button on Apple Home > it turn on on Apple Home and nothing happen on Homey. Same thing when I’m turning it on on homey > nothing happen on Apple Home / HomeKit.

Am I missing something ?

Device class : Light
Buttons with on/off button tab.

Show me the device settings?

I think I get it. This value was missing
Capture d’écran 2023-05-26 à 13.35.11
Was trying to have a fast result to test, I think I’ll need to go deeper in the architecture of your addon because there is so much possibility. Thanks !

Yes, that checkbox is very important if you want other apps (or services) te recognise the fields as “real” fields yeah!

1 Like

I created two AVDs, restarted the Device Capabilities app and now both devices are showing device unavailable.

This on a HP2023 with rc110

Repairing has no effect on the devices.

@OH2TH Are you using reflect?
Send me a diagnostic?

Yes reflecting power from Shelly 3em on one device. Was hoping to reflect all three phases and sum it up to one value.







Aah, got it running. It was the other device that I was setting up for reflecting another device for alarm_xxx states, however the target devices app is broken due to the ble issues, so I have deleted the device.

So when any reflected device is missing, all AVDs become unavailable, even they aren’t reflecting the missing device?

Which version of DC have you installed, because this should have been solved in the latest version.

It is 2.11.11

Yeah, it’s resolved in the current test version. 2.13.9

1 Like

Hi Arie,

This issue is back:

I’ve updated the Bitbucket issue.

No hurries of course :crazy_face:

1 Like

It’s in TEST now:
When creating or editing an AVD, the icon you selected is shown and the dropdown of custom icons now contain the icons.

image

9 Likes

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'});

In test now.

1 Like

Hi @Arie_J_Godschalk - thanks for all your work :slight_smile:

Question - the Petition - did you get any response from Athom? I guess we’re still stuck with a zero or dash in front of the Device Tile?

Thanks!

Actually, @Emile did response once, that they might make text capabilities selectable as Status Indicator, resolving this issue in a very nice way.

Thanks @Arie_J_Godschalk - that would be AWESOME! The only thing I really “lack” at the moment.

1 Like

Just getting started with AVD and impressed with the possibilities (thanks!) but can’t seem to use the API to set the AVD value.

I’m trying the Device Capabilities card, specifically ‘Execute Expression’ and with the following code:

await dcApp.apiPost('setvalue', {device:'9961bb2f-8bd5-48db-97c1-30bb900297a4', field:'locked', value:true});

where ‘locked’ is the name of a yes/no field, and I get an “Invalid Token: text” error. I’ve also tried setting value to 0 or 1 without success. I’m (obviously) new to coding with Homey and could use some pointers here. Sorry if this is a rudimentary question, I’ve been searching and hacking for the past couple hours and not making progress so I thought I’d reach out for help. Thanks.

Hi WSU,

I guess you should run it as code in a HomeyScript flowcard, which is not explicitly mentioned.

It works here when I use the device name

let dcApp = await Homey.apps.getApp({id:'nl.qluster-it.DeviceCapabilities'});
// API call to set the value of AVD fields
await dcApp.apiPost('setvalue', {
  device:'1_Spotjes Keuken AVD', field:'button1', value:false
});

(The button gets set to Off or On position, but the actual lights is not turned off or on)

Peek 2023-07-06 01-03

Hey,

Why dont you just use the device card to set the value if you are working in a flow?

Each AVD has flowcards to set values. And each AVD also has an Set value to Expression, but that card should just return the value, like a (calculated) true or false in this instance.

The API calls are mostly for use in HomeyScript, other apps, or remote (outside of Homey) setting of values.