Homey Community Forum

Ping if PC is online

Hello everybody, i recently got my Homey, and got some devices along with it. Including a switchbot to turn on my Computer (i cannot use Wake on Lan unfortunately).

Now, i would like to use a flow for this that checks if the PC is on/online. Only when it is NOT it should send a request to the Switchbot to push the button. If the PC is online it should just cancel.

Is there an app that allows me to do this. I tried using the “Smart Presence” app but it did not seem to work for me. It would always show the PC as being offline, while i did set it to a fixed IP adress.

I hope someone can help me. Have a good weekend everyone :blush:

Strange, this is the app you need afaik.

Brilliant! +10

1 Like

I would pay around with Smart presence more. It should indeed be exactly what you need, but it does try to reach a specific port that is maybe now blocked by a firewall? Check the settings of the app and/or try to ask in the thread for the app.
You could also look at [APP] Desktop Device to see if that suits your needs, but it is meant for other things I believe, so it is pretty overweight if you don’t need what it was built for.

I am resurrecting an old app called NetScan and it is currently in the Homey Community Store https://store.homey.community/app/nl.terryhendrix.netscan
It is very lightweight and is designed for this pupose.

2 Likes

Thanks for your responses everybody :blush:

I will try your suggestions and be sure to let you know if it has worked!

In Smart Presence i tried a port that is always open on my PC, which is for the “Delivery Optimization”, it dit work but once i rebooted my PC it never registered as being online again.

Same goes for Netscan, even with it just using the IP of my computer, it registered once, and now it doesn’t come online again even though i tried multiple reboots.

I have set my PC up at a static IP adress, i also check this after every reboot.

An app like Fing (android) shows everything on your lan. It should discover your running pc
Maybe it can help.

Just to make sure:
Did you reserve the IP on your router?
B/c just entering an IP at the network settings of your pc could cause an IP address being used for two devices, and can have strange effects like your issue.
But maybe you alr knew🙃

So, i read in the instructions for Netscan that i could run a NMAP command to check which ports on my PC are open. While i couldn’t get it to work in Netscan due to constant app crashes, i did manage to get it working in Smart Presence (yay). Now it seems reliable and works like a charm.

For anyone seeing this in the future and wanting to know what i did:

I followed the steps here: GitHub - AdyRock/homey-netscan
to find out which ports on my PC are open. Somehow ports i manually open don’t show up here so i guess that was the issue.

1 Like

Glad it is solved now. That was what I was trying to point out to use Fing, but didn’t mention: it has a portscanner :wink:

Thank you for helping me out :smiley:

1 Like