List apps and devices?

Is there any app or script that shows/lists all installed apps and devices that uses them?
I.e.

Sonoff:

 - Button1, SNZB-01P

 - Temp Carport, SNZB-02P

IKEA Home Smart:

 - Hallway, TRADFRI bulb E14 WS globe 470lm


Or is this info easily visible/available already somewhere?

Have you seen the app store pages of those apps? They list the supported devices.

In the mobile app: More→Apps

Yepp, that I’m aware of.

I’m looking for a way to do a complete listing of all apps and connected devices.

Sry for stupid question but could You please elaborate that a bit…

When you select an app in that page, you can see which devices are connected. You can also use the web app:

In here, you can select the list view in the top left corner. In the list view, you can view all devices and the app they use.

TY! :+1:

That’s really good enough for me!

I was interested in the opposite… How to get a list of Apps that are “not used” (but consuming memory)… Asking help to Gemini, here is something that works for me.

/**

 * Universal script to list unused apps.

 * This version uses a broad inclusion check to avoid false positives.

 */



const apps = await Homey.apps.getApps();

const devices = await Homey.devices.getDevices();



const unusedApps = Object.values(apps).filter(app => {

    // We check if ANY device points to this app's ID

    const isUsed = Object.values(devices).some(device => {

        if (!device) return false;



        const uri = device.driverUri || "";

        const driverId = device.driverId || "";



        // Check if the app ID is mentioned in the URI or the Driver ID

        return uri.includes(app.id) || driverId.includes(app.id);

    });



    // We only keep apps that are NOT used

    return !isUsed;

});



// Formatting the output

const results = unusedApps.map(app => `- ${app.name} [v${app.version}] (${app.id})`);



console.log("--- Analysis of Installed Apps ---");

if (results.length > 0) {

    console.log(`Found ${results.length} app(s) with no devices configured:`);

    console.log(results.join('\n'));

} else {

    console.log("All installed apps are currently used by at least one device.");

}



return results.length > 0;

I did ask now to get a script that list all Apps and their devices… It gives me the very same list as the Homey web page “Devices” in “List” mode…

/**

 * Script to list ALL devices, including those without an explicit app ("-" in the page "devices".

 */




const apps = await Homey.apps.getApps();

const devices = await Homey.devices.getDevices();

const zones = await Homey.zones.getZones();




const zoneMap = {};

Object.values(zones).forEach(z => zoneMap[z.id] = z.name);




const appDeviceMap = {};

const orphanDevices = [];




// Init map

Object.values(apps).forEach(app => {

    appDeviceMap[app.id] = { name: app.name, version: app.version, devices: [] };

});




Object.values(devices).forEach(device => {

    if (!device) return;

    const uri = device.driverUri || "";

    const driverId = device.driverId || "";

    const zoneName = zoneMap[device.zone] || "Unknown Zone";

    const deviceLabel = `${device.name} [${zoneName}]`;




    const parentApp = Object.values(apps).find(app => 

        uri.includes(app.id) || driverId.includes(app.id)

    );




    if (parentApp) {

        appDeviceMap[parentApp.id].devices.push(deviceLabel);

    } else {

        // Capture devices that don't match any installed app

        orphanDevices.push(deviceLabel);

    }

});




// Output

console.log("--- Apps and their associated Devices ---");

Object.keys(appDeviceMap).sort().forEach(appId => {

    const data = appDeviceMap[appId];

    if (data.devices.length > 0) {

        console.log(`\n📦 ${data.name} (${appId})`);

        data.devices.sort().forEach(d => console.log(`   âž” ${d}`));

    }

});




if (orphanDevices.length > 0) {

    console.log(`\n⚠️  Internal / Unlinked Devices (No App ID found)`);

    orphanDevices.sort().forEach(d => console.log(`   âž” ${d}`));

}




return true;

Not bad. Only you seem to define unused apps as having no devices. That might be a bit misleading as there are apps without devices like „Audit“, „Email sender“, …

@vletroye Not bad! There are apps that do not register any devices, but are instead only used in flows. Would be nice to check that as well :slight_smile:

@BasMilius @vletroye
Like 'SingKT" alr mentionrd: The Audit app for instance is a fantastic logging app, which, apart from not needing devices, even doesn’t need flows cards;
I don’t know how to consider an app like that as being unused.

No clue how many apps out there function likewise.

Indeed, the script is not good enough…

I have for example a virtual device named “Home Battery” created from the App “Virtual Devices” [v1.3.1] (com.arjankranenburg.virtual). But this App is reported as not used.

Looking at the Developers Tools ( Homey Developer Tools ), this device has a driver “homey:app:nl.qluster-it.DeviceCapabilities:virtualdevice”

So, the script cannot make the link :frowning:

And indeed, in the script listing all devices per App, I can see that the virtual device “Home Battery” belongs to “Device Capabilities”…

Device Capabilities (nl.qluster-it.DeviceCapabilities)
   âž” Home Battery

So, I don’t know how to make the link correctly.