Ping

Questions and comments specific to a particular plugin should go here.
miljbee
Experienced User
Posts: 146
Joined: Fri Mar 27, 2009 1:29 pm
Location: Orléans, France

Re: Ping

Post by miljbee » Mon Aug 08, 2011 8:16 am

Hello,

It has been a long time since I have used this plugin. But if I remember well, The One Ping Action does only one ping at the moment it is executed and doesn't store the result. You can get the result from eg.result right after you run this action.
If you want to use GetHostStatus, you will have to "Add Host" before. Then when you run GetHostStatus, a python dictionnary is built with all the properties of the hosts that you monitor (the ones you have added with "Add Host"). This python dictionnary is then stored in eg.result. If you want to view the result in the console, add a "print eg.result" right after you ran "GetHostStatus".
miljbee
TCP Events : A Better Network Event Sender/Receiver Plugin.
The Network Event Sender/Receiver in C#
Get events in EG from Google Calendar.

User avatar
GBWebmaster
Experienced User
Posts: 115
Joined: Wed Sep 24, 2008 5:34 am

Re: Ping

Post by GBWebmaster » Thu Aug 11, 2011 2:52 pm

Hello,
can you say me, how I get a eventresult (Host_sleeps - Host_sleepsnot) without the action "Add Host"?

Thank you very much.

GBWebmaster
Für den, der nie das Rudel anführt,
wird sich die Aussicht nicht ändern.

Sem;colon
Experienced User
Posts: 609
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Ping

Post by Sem;colon » Sun Aug 04, 2013 9:35 pm

Hello,

this plugin slows down my configuration a lot if a host is not active - it blocks the whole Eventghost completely for about 3 Seconds every time a ping doesn't reply. (unfortunately without generating additional CPU load)

It seems like the whole Eventghost has to wait for some reason, changing the delay time doesn't help.

For me, this issue makes the plugin unusable!

EDIT: I'm using EG 0.4.1.r1610 running as admin on Win8 x64

miljbee
Experienced User
Posts: 146
Joined: Fri Mar 27, 2009 1:29 pm
Location: Orléans, France

Re: Ping

Post by miljbee » Thu Aug 08, 2013 2:31 pm

yes, this problem has already been reported, you can try the first release of the plugin.

Sorry, but I won't fix it, I don't use it anymore.

Regards
miljbee
TCP Events : A Better Network Event Sender/Receiver Plugin.
The Network Event Sender/Receiver in C#
Get events in EG from Google Calendar.

Sem;colon
Experienced User
Posts: 609
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Ping

Post by Sem;colon » Sun Aug 11, 2013 9:05 am

miljbee wrote:yes, this problem has already been reported, you can try the first release of the plugin.

Sorry, but I won't fix it, I don't use it anymore.
That's a shame, I liked that plugin...
The first version works but has the known performances issues since it opens ping.exe every time a ping is send out, also the precess watcher will fill up your log with events you probably don't want to see(Process.Created.PING Process.Created.cmd and so on).

Since I want to keep on using this plugin, I had no choice but to modify it.
This new version (0.0.3) is more like version 0.0.1 but uses the "-t" option from ping.exe - so if you add a host, the PING process is created only once and runs until it is removed.

Since the "-t" option has no possibility to define a delay between pings, I removed this option for this - in fact that will cause problems when updating from an old version of Ping to this one.
If you used one of the previous versions, please remove all actions and the old plugin from your config before adding this one!
Attachments
__init__.py
(13.76 KiB) Downloaded 325 times

miljbee
Experienced User
Posts: 146
Joined: Fri Mar 27, 2009 1:29 pm
Location: Orléans, France

Re: Ping

Post by miljbee » Mon Aug 12, 2013 9:20 am

Thank you for your efforts, I am sure others will appreciate.
miljbee
TCP Events : A Better Network Event Sender/Receiver Plugin.
The Network Event Sender/Receiver in C#
Get events in EG from Google Calendar.

Pastis
Posts: 19
Joined: Mon May 16, 2011 3:03 pm

Re: Ping

Post by Pastis » Sun Oct 27, 2013 4:17 pm

yes thank you very much... its such a useful script !

shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Ping

Post by shaggy79 » Tue Jul 15, 2014 1:00 am

I know this is a old thread but I'm hoping sum one can help :?:
please don't laugh :oops: ........ but what do I do with the _init_.py file :?: :oops:

karlik
Posts: 10
Joined: Mon Jul 14, 2014 1:40 pm

Re: Ping

Post by karlik » Tue Jul 15, 2014 10:25 am

shaggy79 wrote:I know this is a old thread but I'm hoping sum one can help :?:
please don't laugh :oops: ........ but what do I do with the _init_.py file :?: :oops:
Hi shaggy79,
replace it in the ping plugin folder. you find it in c:>program files>eventghost>plugins>ping.

Dont forget to follow the instructions of a previous post before you paste and replace the init file.

shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Ping

Post by shaggy79 » Tue Jul 15, 2014 1:15 pm

karlik wrote: Hi shaggy79,
replace it in the ping plugin folder. you find it in c:>program files>eventghost>plugins>ping.

Dont forget to follow the instructions of a previous post before you paste and replace the init file.

Hi & thank you for the reply Karlik,

I eventually found where to put it :oops: .
Still cant get it to do what I want though :?:
It gets very confusing :?: lol
Am new to all this EG & stuff :P

How can I make it so it knows when I Get home and plays a sound (for now)
And play a different sound when I leave ?
Cheers Paul.

Sem;colon
Experienced User
Posts: 609
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Ping

Post by Sem;colon » Tue Jul 15, 2014 4:30 pm

Hello Paul,

if you execute the action "Add Host" you can define a an IP address or host name that should be pinged as well as the event that should appear if the host becomes available or unavailable.

You then have to execute that "Add Host" action to start the pinging process.

Now, if the host with the given IP (or name) becomes active an event is generated, the same happens whern the host becomes inactive (different event of corse).

You can use these events to trigger a macros with play sounds.

shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Ping

Post by shaggy79 » Thu Jul 17, 2014 4:06 am

Sem;colon wrote:Hello Paul,

if you execute the action "Add Host" you can define a an IP address or host name that should be pinged as well as the event that should appear if the host becomes available or unavailable.

You then have to execute that "Add Host" action to start the pinging process.

Now, if the host with the given IP (or name) becomes active an event is generated, the same happens whern the host becomes inactive (different event of corse).

You can use these events to trigger a macros with play sounds.
Hi Sem;colon
Thanks for the reply :)
I've tried what you said (I think :oops: ).
But it just seems to randomly play sounds now :x
weather I'm at home or not :?: :?:
Sorry to be a pain :oops:
Any ideas What I've done wrong :?:
Cheers Paul.

Sem;colon
Experienced User
Posts: 609
Joined: Sat Feb 18, 2012 10:51 am
Location: Germany

Re: Ping

Post by Sem;colon » Thu Jul 17, 2014 4:57 pm

Hello Paul,

well, in most cases this happens because the smartphone you are using for that doesn't respond to ping requests (or other network request) if it is in standby in order to provide longer battery operation times.
In my opinion you could realize this requirement much better with an app on you mobile that generates events if your WLAN network is detected or by using geofencing.

I think on android you can use terRemote or AutoRemote in combination with Tasker to do that - how ever, this will be a bit more tricky then just pinging.
You could also take a look at the Nmap plugin, but I guess you will get similar results as with pinging.

shaggy79
Experienced User
Posts: 129
Joined: Sun Jul 13, 2014 4:57 pm

Re: Ping

Post by shaggy79 » Thu Jul 17, 2014 9:57 pm

I think I get what you mean, I have an iPhone 5s when my phone is locked it gives me the
Dead response as soon as I unlock my phone it gives me the alive response.
I'm gutted really wanted this to work.
So when I leave my house the cameras start recording (on motion detect) and when I return home they stop.
Is there any alternatives for the iPhone 5s ? Or a way to make it send a signal evry so often to my router?

I've just had a quick look and I can get EG app for iphone
Could this be used to send a signal to my router?

Cheers again,
Paul.

krambriw
Plugin Developer
Posts: 2570
Joined: Sat Jun 30, 2007 2:51 pm
Location: Stockholm, Sweden
Contact:

Re: Ping

Post by krambriw » Fri Jul 18, 2014 5:43 am

What you really should look for is an app that is supporting geofencing. As example, look at OwnTrack.

In addition you will need a message broker, the MQTT. If you invest in a cheap Raspberry Pi you can install the MQTT broker here. You can then use my MQTT Client plugin to receive events when they are happening. No need for pinging, no need for polling...

I will try to make a test setup in this way myself.

PS If you have another Linux box or you prefere a Windows version running in your Windows box, you can of course run the MQTT broker there as long as you make it reachable. For security reasons, I would keep the brooker separated and use ssl certificates.

So far I have found only a german article how to secure the connection via certificates. Please check here:

https://www.hagen-bauer.de/2014/05/inst ... ry-pi.html

Post Reply