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

How, I definitely have no clue, I thought it was just adding set capability including enum values during pairing, but I’ve never looked to deep in that code, the code is still online on github including lots of the history perhaps you can find it in there.
As to why it was made impossible, I believe it was a change in one of the bigger SDK updates that just removed the functionality that was used to add it during pairing, probably a safety thing, don’t think Athom ever said any specific reason.

Hmm, I had just a rebuild of (re)pairing code in mind by adding the enum values and send that allong during (re)pairing and thus losing the ID of the capability (forgot about the extra hidden capability thing)
But if the enum values need to be pre-defined in the app.json that will make it a bit harder without having some generic values… Or just the few default picker capabilities.

And I guess there is no easy way to “overwrite” the i18n title part of the enum right? :thinking:

1 Like

That would be a next try, but its not like i can have full control over every instance of i18n.
I dont think i can hack it before or in the same instance as Homey uses it to build the device.

Btw: during paring, you can create a device (and give it an icon, never knew about adding more stuff here ;)).
But “repairing” is just an option for a UI per-device, instead of the App settings.

As far as i know, there is nothing special i can do in repairing to edit a device, that you not allready can in the app itself. Only in pairing is the createDevice a special function which allows for manipulation.
Afaik, you cannot alter device data, like an icon, after creation?! (I just give the devices a unique image and the option the overwrite that file, i dont change the device when altering a device icon).

Thanks!

1 Like

No worries mate, it’s still in test-till-you-drop phase, isn’t it?
Thanks for explaining, it is a bit to technical for me, but, now I understand the ‘hidden fields’ and the meaning of the ‘Create flow cards’ option a lot better.

Imho I think you should turn your last bullet list (motion alarm, numberfield, thermostat) into a tooltip in some kind of way, and call the option (“Create flow cards”) itself like "Enable zone/status/flow functionality’'? And a link to the forum topic at some places can’t hurt I think.
I mean, in common, many users don’t seem to know about the forum and support links at the bottom of the app pages @ homey.app

1 Like

Great, great, give me more tips :wink:

I’ll try and implement some more clearity today.
Fist a few small fixes left to the settingscreen, like:

  • The close button disappears in Mobile.
  • Class set to Other by default in Settings.
  • Device start text is wrong about goto device settings.
  • The save button doesn’t always respond when pushed.
  • Remove unneeded Pick Device during Creation of AVD.
  • Create Flow Cards can only be selected for the first of its type.
    If you allready have a button OnOff and you click on Create Flow Cards, it will (allready) append a surfix to the name. But in Settings it should also hide the field when not applicable.

I have some time today to try and finish this app up a bit, but i also want some family time (and they do too :wink: )

2 Likes

@Peter_Kawa Watch this!!! This could be real fun!!!

Hey @Peter_Kawa , check this out: Advanced Virtual Device - Share Your Device! - Apps - Homey Community Forum
image
and then

And you’re my first example :slight_smile: :
image

2 Likes

Now with device icon in the Share Your Device json!

Nice new feature!

I suggest (if possible) to make a note at the settings page of the device that device settings must now be done through the repair option. Now you only see the constant power usage, a hint to new users might help them.

Also, if there a way to trigger/open the repair option from the desktop/webapp? The repair options isn’t available there, so device setting can only be change from within the mobile app.

The close button on the repair screen is visible now, but it doesn’t close the screen, so I can only press the X, that triggers the “Weet je zeker dat je wilt stoppen” warning.

Other question, is there a way to add a device icon to older devices? My older devices doesn’t seem to have that option:

image

One would assume that repairing the device would add the missing settings to the device so you can change the icon for there devices also.

All minor issues, but if you ever get bored it would be great if you could fix there :wink:

1 Like

Yes! Thats why i did it this way:
image

image

Weird, missing on my end…

1 Like

Never mind, restarten the app and it’s there now:

image

1 Like

No, sorry, thats why its locked.
Best thing: copy your device ID, export the device with Share Your Device.
Then delete the device.
Then create new device and import the Share Your Device.
Then use the script on this forum (link somewhere above) to reset all your flows.

Done. No you can change that icon.

2 Likes

Very impressed, Arie! Thanks again!

1 Like

Thanks!

Done!

Richt click on the Device → Repair

Should work now, it is with my mobiles and devices i test with.

No, because the were selected custom icons (which you can still change) or the were default icons, which you cannot write to, and there is no way of altering the iconpath to a device. So the old evices have icons in locations i cannot write to.

Thanks!

And i will make it that custom icon to capabilities/fields can also be included :slight_smile:

1 Like

In Test now: The newest version with bugfixes and Settings clean up after setting values.
For instance: When you have a icon selected, and change show as to something that makes icon not possible, it will hide icon (allready functional) and will set the icon to empty (new implemented).
This will keep settings clean for Sharing!

2 Likes

Bummer, the old devices can’t be exported. I guess I just have to recreate them then.

1 Like

Why not?
The Icon of old devices cannot be exported, but, the rest can be exported. And there is a script here to fix flows.

I can press export all I want, but te list remains empty with one of my devices. Others (also older ones) do get the json export.

It’s a very simple device, only three buttons an a textfield, so I’ll recreate it and use the script to repair my flows.

1 Like