# How to Ping to an IPv4 adres in Homey script

**URL:** <https://community.homey.app/t/how-to-ping-to-an-ipv4-adres-in-homey-script/106819>\
**Category:** Questions & Help\
**Tags:** homey-pro\
**Created:** [March 22, 2024, 4:17pm UTC](https://community.homey.app/t/how-to-ping-to-an-ipv4-adres-in-homey-script/106819 "2024-03-22T16:17:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mr-Explore](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mr-explore/32/124111_2.png) [@Mr-Explore](https://community.homey.app/u/Mr-Explore)\
**Post date:** [March 22, 2024, 4:17pm UTC](https://community.homey.app/t/how-to-ping-to-an-ipv4-adres-in-homey-script/106819/1 "2024-03-22T16:17:58Z")

</div>

Hello Everyone,

I want to make a script that simple pings a local ip adres in my netwerk one time to check if device is connected. I have already the unifi app that checks if de device is connected only for my flow is the app to slow with syncing. I need a fast response time that only will be trigger once from the flow. Has someone the ping command I can use?

---

<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:** [March 22, 2024, 4:25pm UTC](https://community.homey.app/t/how-to-ping-to-an-ipv4-adres-in-homey-script/106819/2 "2024-03-22T16:25:51Z")

</div>

You should probably look at the [Net Scan app](https://homey.app/a/com.netscan/).

---

<div class="post-metadata">

**Author:** ![Mr-Explore](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/mr-explore/32/124111_2.png) [@Mr-Explore](https://community.homey.app/u/Mr-Explore)\
**Post date:** [March 24, 2024, 4:50pm UTC](https://community.homey.app/t/how-to-ping-to-an-ipv4-adres-in-homey-script/106819/3 "2024-03-24T16:50:12Z")

</div>

Good suggestions only the thing is i want something that is realy fast and only works when i triggert it so it’s not taking any unnecessary resources.

---

<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:** [March 24, 2024, 5:47pm UTC](https://community.homey.app/t/how-to-ping-to-an-ipv4-adres-in-homey-script/106819/4 "2024-03-24T17:47:17Z")

</div>

It’s not possible to ping from Homeyscript, though.

---

<div class="post-metadata">

**Author:** ![Bernhard\_Oberfrank](https://sea1.discourse-cdn.com/flex025/user_avatar/community.homey.app/bernhard_oberfrank/32/79096_2.png) [@Bernhard\_Oberfrank](https://community.homey.app/u/Bernhard_Oberfrank)\
**Post date:** [September 29, 2024, 8:31pm UTC](https://community.homey.app/t/how-to-ping-to-an-ipv4-adres-in-homey-script/106819/5 "2024-09-29T20:31:25Z")

</div>

…for me this script works to check, if printer is online, but not for all devices

const url = http://…;  
try {  
const response = await fetch(url);  
blnBack = true  
} catch (error) {  
blnBack = false  
}  
return blnBack;
