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

Okay all,

I just finished puthing all Device Settings labels and stuff in translations and added the device settings translations for Dutch.

This is in the new Test version.

I’m gonna finish putting everything in translation files for the rest of the app (flows mainly) so German can be “easily” added.

  1. Not sure how many Homeys use the mobile app (I like fiddling on my phone), but this message falls off :wink:

Maybe ‘To start’ and then ‘goto Device Settings’ fits better?

  1. (just nice to have) about the custom icons,
    Is it possible to rename them, or enter a name during adding an icon?
    I don’t know which # belongs to which icon and now I use a screenshot to check :upside_down_face:

  2. About Status Indicator,
    When I enter all fields for the Status indicator and save it,

is it possible to automatically set the tile’s Status Indicator to the new status?
Now it stays on ‘None’ and has to be selected afterwards :grimacing:

  1. About device reload after status update for mobile app,
    Is it possible, to combine the two cards ‘Set Unavailable’ and ‘Set Available’?
    So that it makes a device unavailable and available again after 1s or 2s in one go.
    I use these for every status card.

1 Like

Ill look into it, its on my to do list.

2 Likes

I added a few idea’s to my previous post🙃

1 Like

Hey,

  1. Allready on my todo list.
  2. Nope, i need fixed names in the pre-defined settings, i have no way of changing the possible values to an enum/select-list
  3. No, you need to set that yourself on the Mobile App (as far as i know you cannot even do this in Web App? If so, let me know and i’ll find a way hopefully)
  4. Ill add a optional argument for resetting for the Mobile App.
1 Like

In a comming update, you again need to go to device settings, change a name and press save.
The status capability has changed an ID in the background, to save Memory usage.
Also some buttons and yes/no fields.

Also, saving was a little bugged and made Status and Numbers partially rebuild after all saves, even without changes.

1 Like

Just some FYI performance analyses:
I just disabled the App and Device OnInit’s, and removed all (couple of hundredths) possible capabilities.
Installing DC (not debug mode) starts off with 16.2MB memory.

Then i placed the capabilities back and installed: 16.2-16.4MB Memory, not much difference.

I added 10 more custom icons to the capabilities: 16.3MB.
image

Now i added the 10 new custom icons to the settings for all fields, makes the app.json jump from 24574 to 26974 lines: 15.7MB.
(dont know why)

Lets try adding 10 more custom icons in the capabilities and settings: 15.43MB…
Funny, should we add millions? :wink:

Now we turn the App OnInit Back on: we jump to 22MB.

And now the Device OnInit (only have one devicetype (Virtual Device) and have 4 off them): 22.1MB.

So we can can conclude it is not the size of the app.json (capabilities and longs settings) that increases memory :slight_smile:

Great, i have currently added to a total of 40 custom icons!

The memory is probably used by the athom-api, but i will look into it more after translation is done.


After changing some virtual devices and there properties, memory goes from 22 to 21 to 21.6mb. Holding steady.


After loading all possible capabilities active in the memory, by selecting all options and icons, my memory goes up to 25MB.

Not to bad i.m.h.o., allthough i will look into the app oninit and the 6 MB it cost. But i do have watchers for the flowcards.

1 Like

In the next Test update, devices will be rebuild one time after update, if something is wrong with capabilities (i see some “develop” issues in the errorlogs).

Okay,

I finished translation for Dutch and also fixed a special folder and files so other people can easily translate another language.

My sourcecode is add QlusterIT / nl.qluster-it.devicecapabilities — Bitbucket

I created a .translation folder, which contains a few files, firstly “How to translate.txt” which contains:

"new":""

app.json, capabilities.js and settings.js


In the app.json, capabilities.js and settings.js, search for all “new”:“” including the four double quote’s.
Replace the new with the languagecode and place the value behind it.

Make sure that after you are done, there is no more “new” language tags

.json


In the en.json, replace all texts into the new text and change the name of the file to the languagecode.

readme.en.txt


In the readme.en.txt, replace all texts into the new text and change the name of the file to the languagecode.


Hopefully, someone can assist in German translation?

Added some more icons and beter view when creating a device:


image
image

The allready custom uploaded icons can now also be selected when creating a device.

1 Like

I changed the settings dropdown for icon to show categories aswell:
image
image

2 Likes

Many thanks Arie, it now works as I wanted :ok_hand:

@Peter_Kawa thanks for the hint about setting the device unavailable / available, works like a charm for updating the status text :+1:

Some point of improvements; disable insights by default! When setting up a device, and testing withing the ID’s change, and every time a new capability is added to insights:
image
Multiple input capabilities due to tinkering with the settings of the device. Better let the user enable insights manually when the configuration of a device is final.

And, it would be nice to change the device icon after creating it. Please keep pushing to find a way :upside_down_face:

And last, further memory optimisation; the app is consuming still a lot (although acceptable amount) of memory. I don’t know if adding more default icons has much impact on it, but it can be a possitive impact.

Looking forward to see what more I can do with this app, and what you will come up with next :stuck_out_tongue_closed_eyes:

1 Like

@Le_Cactus , @DirkG , @Gruijter , @Joka , @Mike1233 , @HuisCHovens

YES! This can now be done!!!
Pick a custom icon as, for instance, custom_2. You can pick it without setting a icon first in settings, but it makes it harder to pick:

Now this will be it’s icon:
image

Now goto settings and change the custom_2 icon.

Now restart the Device Capabilities App!

Tada, icon is changed :slight_smile:
image

Have fun boys and girls!

4 Likes

But, this means i will propably make another “big” change:
Remove all “default” icons from settings and capability definitions.

Because i have currently 48 default, and 40 custom.
And the more you add, the slower the App install/restart/update takes (the app.json is allready 1.1MB in size, HOOP is nothing compaired to it).

So i don’t wanna add more icons, because what everyone likes is somuch differend sometimes.

So my idea: In settings (and thus definitions) start off with just 20 custom device icons, and 40 custom capability icons. Both can be picked for devices or capabilities, but i think since you cannot change which iconname a device uses, it would be nice to have two separate list, just like icons now are grouped together.

Then, in settings, you get the option to upload each icon, like now, or pick one from the list of defaults (that we can then make very very very large!, every icon someone wants can be included).

When starting the App up, it can check if custom icons are set or not yet, and if not, it can put default icons into those empty custom spots, so people are not required to first begin in settings with icons, but get a pre-defined list of icons when first creating a device.

What are your thoughts on it, all?

1 Like

Why not make all the default icons into “pre-defined custom icons”, then people have a set of icons they can use, as some don’t want the Hassel to change icons, but also still give people the opportunity to change the icon, even afterwards.

1 Like

Hey Caseda, that is kind of what i meant with “When starting the App up, it can check if custom icons are set or not yet, and if not, it can put default icons into those empty custom spots, so people are not required to first begin in settings with icons, but get a pre-defined list of icons when first creating a device.”

Only, i cannot rename the items in the settingslist.
So instead of creating only (for example) 60 custom icons, al named custom_1, custom_2, etc, i could group it together into categories:

  • Devices (20)
  • Capabilities (20)
  • Other (20)

This way it might help people to remember which name is which icon.

And yes, i want them all pre-filled with default icons, so the don’t need to go into App Settings before creating there first device.
But if the ever want to change there device icon, then need to pick a custom icon.

1 Like

Hi @Arie_J_Godschalk, I can do the translation.

1 Like

Great!

I will be making some changes to settings and pairing texts(about the new way of dealing with icons) all in the singe locales file.

I use BitBucket, and there is the folder and file which describes whats need to be done:
QlusterIT / nl.qluster-it.devicecapabilities / .translation / How to translate.txt — Bitbucket

QlusterIT / nl.qluster-it.devicecapabilities — Bitbucket

We can also use mail or something if you would like?

Give me a Go and i will start with the translation. But it could take a few days.
If I have any questions I will send you a pm.

1 Like