How to Ping to an IPv4 adres in Homey script

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?

You should probably look at the Net Scan app.

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.

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

1 Like

…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;