# \[APP\]\[Pro\] Dashboard Studio - A completely free-form dashboard designer

**URL:** <https://community.homey.app/t/app-pro-dashboard-studio-a-completely-free-form-dashboard-designer/151169>\
**Category:** Apps\
**Tags:** dashboard, homey-pro\
**Created:** [February 15, 2026, 7:45pm UTC](https://community.homey.app/t/app-pro-dashboard-studio-a-completely-free-form-dashboard-designer/151169 "2026-02-15T19:45:30Z")\
**Posts on this page:** 1\
**Showing post:** 138

<div class="post-metadata">

**Author:** ![Amersfoort](https://avatars.discourse-cdn.com/v4/letter/a/94ad74/32.png) [@Amersfoort](https://community.homey.app/u/Amersfoort)\
**Post date:** [February 28, 2026, 3:21pm UTC](https://community.homey.app/t/app-pro-dashboard-studio-a-completely-free-form-dashboard-designer/151169/138 "2026-02-28T15:21:08Z")

</div>

Homey script functionality taking into account changing IDs after Homey restart:

- if TV is off and Sonos on: show album art
- else show Ring doorbell image

Use return value as a parameter to send this value to Dashboard Studio, and use this in a Dashboard Studio image.

Google Gemini is very useful for programming Homey scripts.

```auto
// 1. Configuratie (id in Homey Developer Tools/Devices, vervang id door eigen waarden)
const SONOS_ID = 'b29a89d8-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
const TV_ID = '3ee1a967-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
const RING_ID = '9a6ccaf1-xxxx-xxxx-xxxx-xxxxxxxxxxxx';
const BASE_URL = "https://[Your Homey id].homey.athom-prod-euwest1-001.homeypro.net/api/image/"; //pad in Homey Developer Tools/Images

// 2. Haal specifiek de benodigde apparaten op
const sonos = await Homey.devices.getDevice({ id: SONOS_ID });
const tv = await Homey.devices.getDevice({ id: TV_ID });
const ring = await Homey.devices.getDevice({ id: RING_ID });

// 3. Validatie
if (!sonos || !tv || !ring) {
    console.error("Configuratie fout: Sonos, TV of Ring niet gevonden.");
    return null;
}

// 4. Status bepalen Sonos en TV (true of false)
const isSonosPlaying = sonos.capabilitiesObj?.speaker_playing?.value ?? false;
const isTvOn = tv.capabilitiesObj?.onoff?.value ?? false;

// 5. Logica voor selectie (TV uit EN Sonos aan -> Album art, anders Ring)
const useSonos = !isTvOn && isSonosPlaying;

const imageId = useSonos 
    ? (sonos.images[0]?.imageObj?.id) 
    : (ring.images[0]?.imageObj?.id);

if (!imageId) {
    console.error("Geen afbeelding ID gevonden op het geselecteerde apparaat.");
    return null;
}

// 6. Genereer URL (cache voorkomen)
const cacheBuster = Math.floor(Math.random() * 10000) + 1;
const finalUrl = BASE_URL + imageId + "?rand=" + cacheBuster;

console.log("Gegenereerde URL: " + finalUrl);

// 7. Return resultaat
return finalUrl;

```

---

_[View the full topic](https://community.homey.app/t/app-pro-dashboard-studio-a-completely-free-form-dashboard-designer/151169)._
