# \[APP\]\[Pro\] HomeyScript

**URL:** <https://community.homey.app/t/app-pro-homeyscript/854>\
**Category:** Apps\
**Tags:** app, homey-pro\
**Created:** [August 30, 2018, 7:34am UTC](https://community.homey.app/t/app-pro-homeyscript/854 "2018-08-30T07:34:20Z")\
**Posts on this page:** 1\
**Showing post:** 28

<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:** [May 19, 2019, 11:43am UTC](https://community.homey.app/t/app-pro-homeyscript/854/28 "2019-05-19T11:43:50Z")

</div>

> [@gagga](#):
>
> How do I get the id if I only know the name of the variable?

let devices = await Homey.devices.getDevices();  
\_.forEach(devices, device =\> {  
console.log(device.name, ’ ',device.id);  
});

---

_[View the full topic](https://community.homey.app/t/app-pro-homeyscript/854)._
