# Report any open doors/windows

**URL:** <https://community.homey.app/t/report-any-open-doors-windows/77972>\
**Category:** Flows\
**Tags:** flow\
**Created:** [March 18, 2023, 11:56am UTC](https://community.homey.app/t/report-any-open-doors-windows/77972 "2023-03-18T11:56:06Z")\
**Posts on this page:** 8\
**Page:** 2

<div class="post-metadata">

**Author:** ![DaneedeKruyff](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daneedekruyff/32/964_2.png) [@DaneedeKruyff](https://community.homey.app/u/DaneedeKruyff)\
**Post date:** [April 2, 2023, 1:16pm UTC](https://community.homey.app/t/report-any-open-doors-windows/77972/21 "2023-04-02T13:16:43Z")

</div>

I do understand and respect your standpoint on apps that require full access to Homey to do what they do. To add to that, the code of Heimdall is open source and I invite everybody with second thoughts to review the code at [GitHub - daneedk/com.uc.heimdall: Heimdall for Homey](https://github.com/daneedk/com.uc.heimdall)

---

<div class="post-metadata">

**Author:** ![horakmar](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/horakmar/32/33849_2.png) [@horakmar](https://community.homey.app/u/horakmar)\
**Post date:** [August 11, 2023, 11:47am UTC](https://community.homey.app/t/report-any-open-doors-windows/77972/22 "2023-08-11T11:47:23Z")

</div>

Hello everyone, I wrote a script for get zonename by device.zone.

Script:

> //get zone name  
> async function getZoneName(zoneId) {  
> var result = “unknown”;  
> let allZones = await Homey.zones.getZones();
> 
> ```
> for (let zone in allZones) {
> if ( allZones[zone].id == zoneId ) {
> result = allZones[zone].name;
> }
> };
> return result;
> }
> 
> ```

And you can call it:

> return getZoneName(device.zone);

or part of string

> … + await getZoneName(device.zone) + …

---

<div class="post-metadata">

**Author:** ![DaneedeKruyff](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/daneedekruyff/32/964_2.png) [@DaneedeKruyff](https://community.homey.app/u/DaneedeKruyff)\
**Post date:** [August 11, 2023, 12:46pm UTC](https://community.homey.app/t/report-any-open-doors-windows/77972/23 "2023-08-11T12:46:16Z")

</div>

Now where have I seen that before… 🤔😉

---

<div class="post-metadata">

**Author:** ![Willie\_Plompen](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/willie_plompen/32/8291_2.png) [@Willie\_Plompen](https://community.homey.app/u/Willie_Plompen)\
**Post date:** [August 12, 2023, 9:02pm UTC](https://community.homey.app/t/report-any-open-doors-windows/77972/24 "2023-08-12T21:02:36Z")

</div>

Thank you for the nice script. Could you also write it without ‘(undefined)’ behind each sensor? This way, I can have a notification triggered through a speaker

---

<div class="post-metadata">

**Author:** ![Steffen\_Kugelmann](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steffen_kugelmann/32/79941_2.png) [@Steffen\_Kugelmann](https://community.homey.app/u/Steffen_Kugelmann)\
**Post date:** [August 24, 2024, 6:14pm UTC](https://community.homey.app/t/report-any-open-doors-windows/77972/25 "2024-08-24T18:14:27Z")

</div>

> [@Jacques\_Derks](#):
>
> Har lige skabt flowet. Fungerer perfekt. Tak for tippet og manuskriptet.

Hi peter  
thanks for the script, i just found it here, but im kinda new to homey and the script are working very well, just want to know how i can ge the output from it into a push message to a user i pick, hope you can help thanks

---

<div class="post-metadata">

**Author:** ![Peter\_Kawa](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/peter_kawa/32/173848_2.png) [@Peter\_Kawa](https://community.homey.app/u/Peter_Kawa)\
**Post date:** [August 24, 2024, 11:16pm UTC](https://community.homey.app/t/report-any-open-doors-windows/77972/26 "2024-08-24T23:16:57Z")

</div>

Thank @RonnyW 😉

You can use the used Homeyscript tag/variable for those cases;  
It’s created/updated in this line of the script:

```auto
// Create / update HomeyScript variabele
await tag("door_windowText", windowText);

```

Just select it to add it to any messaging card:

 ![Screenshot from 2024-08-25 01-14-52](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/f/6/f6c813d983849a70cd9d65957be5c94bd0759ecd.png)

For advanced flow  
You can use the adv. flowcard THEN "Run code and return Text-tag¨, when you change  
this

```auto
return (true);

```

into this

```auto
return (windowText);

```

Like:

> ![Screenshot from 2024-08-25 01-24-23](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/1/e/1e8066d8a1ae805ea4a8c898536e321be6fc295d.png)

The available output tag “Result”, can be used in a messaging card

 ![Screenshot from 2024-08-25 01-22-27](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/0/70cadbe8150981da05a3ff126dd7fd2bb87476db.png)

---

<div class="post-metadata">

**Author:** ![Steffen\_Kugelmann](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/steffen_kugelmann/32/79941_2.png) [@Steffen\_Kugelmann](https://community.homey.app/u/Steffen_Kugelmann)\
**Post date:** [August 25, 2024, 8:08am UTC](https://community.homey.app/t/report-any-open-doors-windows/77972/27 "2024-08-25T08:08:25Z")

</div>

Thank you so much! appreciate you help very much!

---

<div class="post-metadata">

**Author:** ![Dirk\_C](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/dirk_c/32/81875_2.png) [@Dirk\_C](https://community.homey.app/u/Dirk_C)\
**Post date:** [February 1, 2026, 11:12am UTC](https://community.homey.app/t/report-any-open-doors-windows/77972/28 "2026-02-01T11:12:23Z")

</div>

I was searching for this application as well but then tried something very easy that works for me, just use variables to calculate the open doors, windows, gates…

 ![14555](https://us1.discourse-cdn.com/flex025/uploads/athom/original/3X/7/d/7d642f3952acbe0b760ce6eeaf7881a2a3e284ae.jpeg)

See picture :

[Previous page](https://community.homey.app/t/report-any-open-doors-windows/77972.md?page=1)
