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

Creating a completely new HomeyScript (see Tutorial: Migrating deprecated scripts - HomeyScript), you will get this error:

TypeError: updateDcApp1.apiPost is not a function

And trying to runFlowCardAction() instead often causes the HomeyScript App to crasch:

await Homey.flow.runFlowCardAction({
  id: 'homey:device:93914c9a-bd07-4161-9142-eced4aec6a72:virtualdevice_set_number',
  args: {
    field: {
      id: 'number4',
      name: 'Elförbrukning Pelle (kWh)',
    },
    number: 4,
    mode: 'nothing'
  },
});

@Peter_Kalrsson,
(cc Arie)

1st of all, you are now using a brand new Homeyscript test version, Peter.
Just install the live HS app version if you want things “back to normal”.
Not sure if you should inform Arie already about this issue at this point.

You probably should be able to pinpoint the issue by reading the tut from Jeroen (Athom) and contact him about your findings and/or for support here, thx:

1st of all, no Peter, I am NOT using a test version. This version is live - for all. Thanks.

I have read the tutorials for sure, so let’s put some fact on the table here:

  1. Your existing HomeyScripts will use the old version of the API.
  2. When you create a brand new HomeyScript, the new homey-api will be used.

“apiPost” will no longer work, and there is no work-around mentioned in the migration info.

To the rest of you - I finally found a solution using runFlowCardAction(). The problem was that I tried to read and update the same Device Capabilities fields in the same script. This crashed the HomeyScript app. Solution? I put all the read and write calls in separate async functions - then it worked.

1 Like

@Arie_J_Godschalk , i got a Device that always returns the “manufacturer of the Device” with the:

image

card. It think it is not a "manufacturer issue ", because i got several devices from that manufacturer and the other devices returns if i changed it from Web-app and so on, so i think it i is Device-issue from that manufacturer. But, what should i write as the issue (capability issue) to the manufacturer? To pinpoint what the issue is.

Regards
Marius

Anyone know why I get this blank screen when I try to edit a device? I have a bunch of them but since today I am getting this screen when you click ‘connect’ when creating a new one (repairing an existing one doesnt help as well). I tried rebooting the homey but that didn’t help

Please be a bit more specific about your used environment. Type, versions and tell us a bit more about the device you tried to edit.

It turned out to be a browser problem… for some reason it doesn’t load in safari anymore but it does in chrome.

Hi @Arie_J_Godschalk,
(cc @Marius_Stensrod)

Arie, do you have an idea why we can’t use a var/tag in this trigger card?
Screenshot from 2024-05-19 00-45-52

I’m aware it’s a limitation of Homey firmware at the moment, but I don’t get why it wouldn’t read a variable’s value, when that value is the same as a manually entered value.
Maybe you once discussed this with Athom already?

It would be very nice when we can trigger flows by a timestamp for example:
Screenshot from 2024-05-19 00-46-55

Or,
can we use a Better Logic expression somehow?

Cheers and enjoy the Easter weekend,
/Peet

I’m also having problems with the app. I am now using the latest test version (2.15.4) but have also tried the latest stable version.

When creating a device everything works fine, but as soon as I want to edit a field via the repair function everything is empty.

Have tried Firefox, Safari and Chrome.

On Homey Pro 2023

cd85f250-b6fc-4a58-8944-2c20bfc169e8

Just in case, have you tried to delete cache, cookies from those browsers and you did re-auntenticate?

Yes I did. I also tried using the mobile app, an incognito tab and even on a device that has never been logged in in homey.

Yeah, I’ve experienced similar issues. But not enough or too annoying to report it.
Homey Pro 2019
DC v2.14.9

It sometimes was solved by restarting the app, sometimes is was resolved by time. Meaning, when I edited an AVD some days later, it worked fine…

Is there a way to stop roller blinds @Arie_J_Godschalk ?

This depends on the functions of the roller blinds, not on the Device Capabilities app and/or an Advanced Virtual Device. So if the roller blinds doesn’t have a function to stop, then it will also not work with an AVD.

They have the function.

And what is then your question? What is your goal?

I already have a dimming level and I would like to add the stop function to the Device Capabilities tile. Haven’t found anything suitable yet.

Im unsure if i fully understand the usecase/question.
But, you can add a Button. And use the flowcard from that button to stop the blinds?!

1 Like

Because i only get the token-reference, not it’s value, when i listen for a trigger.
Currently, everytime you save/change a flow containing this trigger, the app gets a notification that the use of that trigger has changed.
Then the app reinitializes the “watching” of ALL the flows containing that trigger.
(Ofc the app does it a bit smart and checks which triggeres have changed).

But if the app would get the real value, that would mean the notification and reinitialization would happen EVERYTIME a token-value changes.
In many cases, this would generate massive amounts of updating the watchers, i think resources would increase like crazy.

Personally i would want that!
What i would like i guess, is that a app (using the homey-api like DC) could watch for changes of a token.
Than, as developer, i could create a less resource-needed script to archive the same thing.
But unfortunately, even with the homey-api, you cannot listen for changes of tokens.

2 Likes

Im sorry, i not fully sure what you mean.
Could you share a screenshot of the Homey App Device Log tab?
(Goto the device and then the last tab)