[OBSOLETE] Host Pinger (IP based Online State / Presence)

Thanks, I’ll take a look at this.

I haven’t done this for a long time. Last time I did what you said, with WHS, I believe it still required user to log in first for it to execute. It had to be started specifically as a service.

For later version of Windows you can use Task Scheduler, pretty straightforward and easy to setup. Mine works a treat.

For older version of Windows look for Scheduled Task.

You can also setup as a service if you prefer, a little more complicated but Google is your friend.

1 Like

Hi there,

Did everything according to instructions.
changed the ide url to https://graph-na02-useast1.api.smartthings.com
and i am confident that i have the right access token and appid

I am getting an error: 500 Internal server error
Any help on this?

Hi @GGexe

Unfortunately a 500 error is a generic something went wrong error while trying to communicate with the ST cloud…

I’ve pushed out an update to the smartApp that will give you all of the info you just need to paste in to the config.config file… I would suggest starting with a new config.config file, then logging in to live logging opening the app and pressing Done to get it to spit out the below, that will then rule out any incorrect tokens or copy paste issues:

  <!ENTITY accessToken "XXXXXX FROM SMARTTHINGS XXXXXXXXX">
  <!ENTITY appId "XXXXXX FROM SMARTTHINGS XXXXXXXXX">
  <!ENTITY ide "https://graph-eu01-euwest1.api.smartthings.com">

If then that still doesn’t work, I would check that there is a firewall exception in place for host pinger in case it can’t talk to the ST cloud? Temporarily disabling your firewall on the computer is an easy way to check if this is the issue.

If you are still having issues, then you can try PMing the config file and I’ll take a look, WARNING: if you leave in the access token I will be able to trigger events to your host pinger app (but that will allow me to test it) you can change your access token and app ID by uninstalling the app and re-installing of needed, but I should flag the security risk here :slight_smile:

1 Like

Hi thanks for the reply

great addition for troubleshooting.
However im still having the same issue.
while live logging, i saw that the ide was a little different, i guess thats a port number?
I dont have any firewall

!ENTITY ide ‘https://graph-na02-useast1.api.smartthings.com:443

Heres a summary of my live logging:
5:39:27 PM: error java.lang.ClassCastException
5:39:27 PM: debug Host Pinger >> Event Recieved: online google.com
5:39:13 PM: error java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer @ line 161
5:39:13 PM: debug Host Pinger >> Event Recieved: online google.com

@GGexe, looks like the issue is not your config file… I think it was a bug in the logging of the last event…

I’ve pushed another fix, if you update to 1.6 and let me know how you get on… I would suggest going in to events received in the SmartApp and pressing done, this will then turn on the last event logging…

V1.6 - Fixed bug in last event logging

1 Like

Bam! it works flawlessly now, smooth as hell! THanks!

1 Like

I must be doing something won’t but I can’t figure out what it is - I’m not seeing any information being logged in the events received section of the app and the app isn’t recognizing/reporting that the server has been turned off. However, it does correctly report when it is online.

Has anyone else run into this issue?

@Anthony_Pluth firstly go to the logging screen and then press done, let me know if that fixes your logging problem…

Can you please confirm where you are running the exe? Are you running this on the same server you are turning off? if the answer to that question is yes then it’s not designed to work in that way, the exe is should live on a server that is always on and then monitor other devices…

It might however be possible to change how the exe works, if the above is the issue…

Bingo! That’s the issue - I’m running the exe on the same computer that’s being turned off/on.

Is it possible to make this return the ping value? I’m looking to change the color of a light if the ping gets above 100, and to another color if the ping is above 200

It’s certainly possible to pass the value in to smartthings… this would require an update to the exe and ST code … it’s not something I have a lot of time to play with currently. Do you have any coding experience?

Minimal, but I think I can figure it out! I will keep you posted!

Let me know how you get on or if you get stuck on anything specific… I’ll see what I can do to help!

My previous knowledge was VB and my first experience of altering Groovy code or C++ code was updating this exe, this originated from Plex2SmartThings written by someone else, but a bit of trial and error helped me learn both! It’s a good way to learn!

Need a little assistance. I not sure what the issue is, I am not getting any logs in the IDE when I flip the switch and all I get in the consol is below.

@jasonrwise77 Could you PM me your config.config please, I suspect the issue is there

I’ve had a look at the config file, that looks fine… Can you ping the IP of the device in the command prompt? I think the app is working as expected but might not be able to see the device or the device is not pingable?

Yes, I can ping the device without issues. I just don’t under stand why it is not working. Do I need to enter an open port somewhere?

Did I install the correct version, I saw there were several?