Selecting all devices during configuration

I am trying to develop a smart app that sends events to a monitoring site (https://www.constantgraph.com) for analysis - you can use it to plot graphs and “disaggregate” a single whole home energy monitor feed into the energy for the individual devices.

I have the basics of the app working and as part of the installation you have to chose which devices you want to be monitored during the PAGE phase of the CONFIGURATION lifecycle event (as described here: Configuration | SmartThings Developers).

{
                        "id": "powerDevices",
                        "name": "Which power devices?",
                        "description": "Tap to set",
                        "type": "DEVICE",
                        "required": false,
                        "multiple": true,
                        "capabilities": [ 'powerMeter' ],
                        "permissions": [ "r" ]
                      },

Is there a way to get the user to select all/any of their devices (rather than just powerMeters)? I have tried putting multiple capabilities into the array e.g. “capabilities” : [‘powerMeter’, ‘switch’] but this just gives me back devices that have both capabilities. I have tried using various combinations of “*” and comma separated lists but they either give me an error or no list of devices at all.

I also tried using “sensor” and “actuator” which are more generic but (at least on my set-up) the devices got filtered out.

I could have multiple settings sections - one for each device capability but as a UI that doesn’t work great as you could end up selected the same device multiple times.

I need to go through this step to be able to grab the device Id and use it in the subscription to the device events - unless someone knows a better way to get device events?

First time post on this forum (I’ve previously been working on the Vera/EZLO hub), so any help appreciated.

Having investigated a bit more, I think I have found my own answer…

In the INITIALIZE phase of the CONFIGURATION lifecycle you get to specify permissions. I had left it blank as per the example in the documentation. However by putting in the following…

"configurationData": {
                "initialize": {
                    "name": "ConstantGraph Web Hook App",
                    "description": "Sends usage data to ConstantGraph for analysis",
                    "id": "app",
                    "permissions": [ "r:devices:*" ],
                    "firstPageId": "1"
               }
}

I can query all of the devices using the /devices API call and retrieve the Ids for all of the devices rather than just the ones the user selected. As such I can delete the section where the user selects the devices to monitor. The problem now is that you can’t create more than 20 subscriptions but at least I have the data to work with.