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

The mono section of the guide already links to the same page I linked earlier (you just need to click through)… but will update with the new link and a note specific to this issue :slight_smile:

I guess you sorted it, if not happy to help!

hi all,
i need some advice i have host ping set up on my pc i was hope that when it was shutdown it go offline but i am seeing online do i have some thing set up wrong

Hi @beau76 glad you solved your first issue, for the second this software is designed to be left running on an always on machine or dedicated device… this is not designed to monitor the machine in which it is running…

can it all be run on smartthings what i am after i have a switch that when triggered it does a wake on lan i am look for a way to let it known pc is off

Only if you run the exe on another computer or on a device such as an Arduino / ESP8266…

It’s not meant to report the computer on which it’s running… it may be possible to update the code for this so when exited it puts everything offline… but I don’t have a lot of time free at the moment to work out how to add this in and an option to enable and disable it…

If you just need to send a WOL and current state is not important… you could use a momentary switch, in which case state is not relevant… and will send a WOL request with every press

1 Like

here what i have run in to use wol with alexa it only woks with on/off
switch so it set were on is wol but then i have to set it to off to work next time

Alexa shouldn’t care what the state is… if you tell it to turn on twice in a row it will send two commands as “on” even when already on…

that is what i tough but never get it to work that way

check the ST app under the device and recent activity, if you are seeing the event there then the event is being sent, I will double check tomorrow when I’m back home but events should be sent even on a double on command…

@Ryan780 no the purpose is just to host the application which can check for the presence of other devices, but that’s a good idea… I might look in to updating the code to support it…

I actually got that working. I wrote a sketch for an ESP 8266 board I had lying around that just connects to wifi, then used the bash script to ping for it. It’s pretty effective in initial testing.

Update V1.11: Added HeartBeat support!

Now in each device you can specify if ST does not get any status update from that device in X seconds then it will put the device offline, useful if you want to run the EXE on the device itself or want to run on an ESP8266 and use as a presence device!

To support this the EXE (V4.0) and the Arduino sketch (V2.0) have both been updated with options to enable HeartBeat (which will mean that every poll of state will be sent to ST not just when the state changes). The config.config file will need to be updated if updating the EXE as the format has also changes to support Hubitat.

Tagging people this change may interest, based on previous posts and requests to support this…
@Ryan780 @edlentz @beau76 @camedia @CurlyTailed_Buffalo @rontalley

2 Likes

This is awesome! That’s for your hard work.

1 Like

Great…but I just got my “Wifi Connect Only” sketch in Arduino finally working! LOL. I think it’s still useful though, because I’m actually running the ESP in my car off of the 5V USB plug which powers off when the car does, so I have to use a “man-in-the-middle” operator anyway to get everything to work correctly. I’ll def give it a try though.

@Ryan780 Sorry! :slight_smile:

I would be interested in how you did it though. I hadn’t thought about using it as a presence device in that way until you said… which is what prompted me to update it…

I have a Feather Huzzah ESP 8266 board that I have programmed to just connect to Wifi. I use the huzzah because it has two on board LEDs and an EN pin that when pulled low powers off the power regulator powering off the board. The sketch I wrote lights one LED when powered on and the other when connected to wifi. I then have the Host Pinger running on my Raspberry pi checking for the static IP of the huzzah and with WebCore I change the status of a Virtual Presence sensor only when certain conditions are met along with the Host Pinger changing status. I’m also wiring a toggle switch onto the EN pin so that I can switch off the board when I’m away for long periods (work trip, vacation, etc.) and know I won’t need it. It’s worked so far in testing. I can share the sketch when I get home.

1 Like

I can wait to give it a try I do have one question in the smart app is there a way on endpoint you cold have a copy option to copy code to clipboard

Do you mean the end point url? If so yes it’s possible would be a small code update, but you can just copy from live logging also

I got it in logging this time i have hartbeat on it shows pc online but switch keeps going on and off
what have i missed ?