NetworkMonitor

Discussion and support for individual OSA plugins
Post Reply
Message
Author
Stefan
Posts: 28
Joined: Sun Jan 17, 2016 8:25 am
Location: Sweden

NetworkMonitor

#1 Post by Stefan » Thu Jun 28, 2018 9:27 pm

Good morning all.

Is it possible to get a field in OSA to change the timeout on the ping function ?

For the moment in Ver4.8 it is timing out all my network devices all the time as you can se in this chart. (and 192.168.0.73 is a phone and this are very slow to answer)
http://aulie.se:1880/ui/#/0
Br
Stefan

User avatar
kherron
Posts: 646
Joined: Mon Dec 05, 2011 10:44 am
Location: Jacksonville, Fl.
Contact:

Re: NetworkMonitor

#2 Post by kherron » Fri Jun 29, 2018 12:44 pm

Hey Stefan,

It's GREAT to see your still here! :D

I'm trying to wrap my head around your question, and want to make sure I am on the same page.

You are wanting to set a 'Time Out" property for a particular device, so it will only attempt to ping for a certain amount of time before giving up?

Stefan
Posts: 28
Joined: Sun Jan 17, 2016 8:25 am
Location: Sweden

Re: NetworkMonitor

#3 Post by Stefan » Fri Jun 29, 2018 12:51 pm

Yes, correct.

It seems that the phones are slow to response in time for the default time that C# have, 200ms.
If you look at my chart in the bottom of the link on the first post, you will see the response time for phones and ESP8266 devices.

And I'm using the networkmonitor to decide if we are home or away in OSA.

Stefan
Posts: 28
Joined: Sun Jan 17, 2016 8:25 am
Location: Sweden

Re: NetworkMonitor

#4 Post by Stefan » Fri Jun 29, 2018 12:54 pm

my phone is 192.168.0.70, so that goes up to 1200ms sometimes and OSA put my network device off.

And I'm thinking to have a general timeout in the network service, so that will aplly for all devices

User avatar
kherron
Posts: 646
Joined: Mon Dec 05, 2011 10:44 am
Location: Jacksonville, Fl.
Contact:

Re: NetworkMonitor

#5 Post by kherron » Fri Jun 29, 2018 1:30 pm

OK,

Based on the current Network Monitor plugin code, there is NO "Timeout" specified on the "Ping.Send(address)" function.
So, it appears that OSA is using the Windows default of 4 seconds or 4000 miliseconds.
Also, there is no way to control how long it takes a device to respond. Once the ping is sent, that's it. all we can do is wait.......
Setting this to a lower number could result in OSA showing devices OFFLINE when they are actually just taking a long time to respond.
However, setting this to a higher number could allow your slow devices to respond in time.

This can be added in as an option fairly easily.
By adding a new property to each "Network Device" called Ping timeout.
We make the plugin, tell the "Ping.Send(address)" to use "Ping.Send(address, timeout)".
We could also make setting the property to zero (0) could be made to disable the timeout and use the default.

Post Reply