# Device local IP

**URL:** <https://community.homey.app/t/device-local-ip/32099>\
**Category:** Apps\
**Tags:** app\
**Created:** [July 6, 2020, 12:16pm UTC](https://community.homey.app/t/device-local-ip/32099 "2020-07-06T12:16:51Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Marwan\_Magdy](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/marwan_magdy/32/17200_2.png) [@Marwan\_Magdy](https://community.homey.app/u/Marwan_Magdy)\
**Post date:** [July 6, 2020, 12:16pm UTC](https://community.homey.app/t/device-local-ip/32099/1 "2020-07-06T12:16:51Z")

</div>

Hello everybody,  
Will work on an app regarding Sonoff integration with Homey, I needed to get the device local IP address to communicate with it locally without internet connection. I faced a problem while obtaining an arp table.  
I have the device mac address obtained from its data

const Zeroconf = require(‘ewelink-api/src/classes/Zeroconf’);

```
async onInit() {
	this.log('MyDriver has been inited');
	const ip = await ManagerCloud.getLocalAddress();
	const table = await Zeroconf.getArpTable( ip );
	this.log(table)

```

this is the part related to getting the arptable.  
(node:8058) UnhandledPromiseRejectionWarning: Error: range must not be empty  
at arpDevices (/node\_modules/ewelink-api/node\_modules/arpping/index.js:62:40)  
at /node\_modules/ewelink-api/node\_modules/arpping/index.js:142:13  
at /node\_modules/ewelink-api/node\_modules/arpping/index.js:50:42  
at exithandler (child\_process.js:310:5)

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [July 6, 2020, 12:37pm UTC](https://community.homey.app/t/device-local-ip/32099/2 "2020-07-06T12:37:12Z")

</div>

`Zeroconf.getArpTable()` depends on the `arpping` package, [which uses the command line `ping` utility under the hood](https://github.com/haf-decent/arpping/blob/a47f49d2b2aeb7b398ee0960505b4606dab1b94d/index.js#L42).

The error you get is caused by `ping` not being available (or it couldn’t be executed for some reason).

---

<div class="post-metadata">

**Author:** ![DrFatalis](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@DrFatalis](https://community.homey.app/u/DrFatalis)\
**Post date:** [June 29, 2024, 1:25pm UTC](https://community.homey.app/t/device-local-ip/32099/3 "2024-06-29T13:25:54Z")

</div>

What would be the working alternative for homey ?

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [June 29, 2024, 1:34pm UTC](https://community.homey.app/t/device-local-ip/32099/4 "2024-06-29T13:34:20Z")

</div>

There isn’t one, but most devices nowadays use a discovery mechanism that Homey does support: [Discovery | Homey Apps SDK](https://apps.developer.homey.app/wireless/wi-fi/discovery)

---

<div class="post-metadata">

**Author:** ![DrFatalis](https://avatars.discourse-cdn.com/v4/letter/d/aca169/32.png) [@DrFatalis](https://community.homey.app/u/DrFatalis)\
**Post date:** [June 29, 2024, 1:39pm UTC](https://community.homey.app/t/device-local-ip/32099/5 "2024-06-29T13:39:10Z")

</div>

in my case, i know the MAC addresses of the devices i found. I want to get their IP from it and it seems that arp-lookup package is not working

---

<div class="post-metadata">

**Author:** ![robertklep](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/robertklep/32/160628_2.png) [@robertklep](https://community.homey.app/u/robertklep)\
**Post date:** [June 29, 2024, 1:44pm UTC](https://community.homey.app/t/device-local-ip/32099/6 "2024-06-29T13:44:20Z")

</div>

In that case, the answer is still the same: it’s not possible with Homey.
