# Add Homey Scripts section to forum?

**URL:** <https://community.homey.app/t/add-homey-scripts-section-to-forum/82575>\
**Category:** Off-Topic\
**Created:** [June 18, 2023, 2:34pm UTC](https://community.homey.app/t/add-homey-scripts-section-to-forum/82575 "2023-06-18T14:34:29Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maven](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/maven/32/110403_2.png) [@Maven](https://community.homey.app/u/Maven)\
**Post date:** [June 18, 2023, 2:34pm UTC](https://community.homey.app/t/add-homey-scripts-section-to-forum/82575/1 "2023-06-18T14:34:29Z")

</div>

Just wanted to pitch for a dedicated “Homey Scripts” section on the forum. This would not necessarily be a “help” or “developer” section like already available, but a dedicated section where users can share working / ready-to-go scripts.

I believe this can help to showcase and optimise scripts and spark many new creative ideas (that might turn in to apps).

---

<div class="post-metadata">

**Author:** ![JPe4619](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/jpe4619/32/9017_2.png) [@JPe4619](https://community.homey.app/u/JPe4619)\
**Post date:** [June 18, 2023, 4:08pm UTC](https://community.homey.app/t/add-homey-scripts-section-to-forum/82575/2 "2023-06-18T16:08:52Z")

</div>

In the meantime you can have a look at:

> [@\[Homey Pro\] overview script](https://community.homey.app/t/homey-pro-overview-script/77459):
>
> Homey Pro overview script Always wanted an overview of your current Homey? Because you are in the process of migrating to another Homey Pro, or just for the fun of it. Well that is what this very HomeyScript script is for. Feel free to share your results in this thread, as I do like to see every ones Homey too! (no sensitive data is shown) I’ve tried to make this overview script somewhat user friendly to use. The only thing you need is an Homey Pro (any version, besides Homey (Cloud)) and t…

> [@A (Homey) Script to find Any Items (Devices, Zones, Apps, Variables) in any flow](https://community.homey.app/t/a-homey-script-to-find-any-items-devices-zones-apps-variables-in-any-flow/69904):
>
> Here is a script that you can use to find any Variables, Devices, Zones or Apps in any Flow or Advanced Flow. This will be included into the [Device Capabilities App](https://homey.app/nl-nl/app/nl.qluster-it.DeviceCapabilities/Device-Capabilities/) and explanations for the flowcards will be placed on [[APP][Pro] Device Capabilities - Enhance the capabilities of devices - Apps - Homey Community Forum](https://community.homey.app/t/app-pro-device-capabilities-enhance-the-capabilities-of-devices/43287). This topic can be used for the below script. You can use it in many ways, see the top of the script for examples. The Find Objects in Flows Script /// -- The Find Objects in Flo…

---

<div class="post-metadata">

**Author:** ![Maven](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/maven/32/110403_2.png) [@Maven](https://community.homey.app/u/Maven)\
**Post date:** [June 18, 2023, 4:35pm UTC](https://community.homey.app/t/add-homey-scripts-section-to-forum/82575/3 "2023-06-18T16:35:14Z")

</div>

Thank you for sharing (consolidating). Already becoming my favorite post 😉

---

<div class="post-metadata">

**Author:** ![Caseda](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/caseda/32/138695_2.png) [@Caseda](https://community.homey.app/u/Caseda)\
**Post date:** [June 18, 2023, 4:40pm UTC](https://community.homey.app/t/add-homey-scripts-section-to-forum/82575/4 "2023-06-18T16:40:15Z")

</div>

as for further reference, this has been asked before and kind of _declined_ because we have tags:

> [@We need a "Homeyscript" category in the Community Forum](https://community.homey.app/t/59871):
>
> We need a whole section dedicated to Homeyscript - there’s one for “Flow”, but I miss one for Homeyscript.

---

<div class="post-metadata">

**Author:** ![Maven](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/maven/32/110403_2.png) [@Maven](https://community.homey.app/u/Maven)\
**Post date:** [June 18, 2023, 4:43pm UTC](https://community.homey.app/t/add-homey-scripts-section-to-forum/82575/5 "2023-06-18T16:43:56Z")

</div>

Thank you for pointing this out. Did not find that post myself. Sad to hear though, requested by multiple users but no considered because of a “feature” on the forum. A feature doesn’t make a good content section that thrives by itself.

---

<div class="post-metadata">

**Author:** ![Maven](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/maven/32/110403_2.png) [@Maven](https://community.homey.app/u/Maven)\
**Post date:** [June 18, 2023, 4:46pm UTC](https://community.homey.app/t/add-homey-scripts-section-to-forum/82575/6 "2023-06-18T16:46:04Z")

</div>

Small script i use in flows to send push messages to all users easily based on groups. Need to refine it a bit though.

```auto
/* 
  Group Push Notifications
  Accepts a homey user group (owners, managers, guests) as input to send push messages to all group members.
*/ 

const obj = JSON.parse(args[0]);
const role = obj.role;
const msg = obj.msg;

/* Run checks */
if (typeof args[0] !== 'string') {
  throw new Error('This script must be run from a Flow!');
}
if (typeof role !== 'string') {
  throw new Error('A role selector required as first argument!');
}
else if (typeof msg !== 'string') {
  throw new Error('A push message is required as second argument!');
}

/* Get Users */
const users = await Homey.users.getUsers();

const pushList = Object.values(users).filter(user => user.role === role);

/* Send Push Notification(s) */
for (const user of pushList) {
  console.log(user);
  const response = await Homey.flow.runFlowCardAction({
    uri: 'homey:manager:mobile',
    id: 'homey:manager:mobile:push_text',
    args: {
      user: {
        athomId: `${user.athomId}`
      },
      text: obj.msg
    },
  });
}
  
return(true);

```
