Author Topic: Ping Sensor  (Read 155951 times)

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 886
  • Karma: +18/-16
    • Worthington Engineering, Inc.
Re: Ping Sensor
« Reply #600 on: May 08, 2017, 09:23:03 pm »
Don, I too had used iphone locator, but it also suffers when the iPhone goes to sleep unless you've figured out how to keep Wifi awake rather than wake on Lan that the current IOS seems to have adopted? I noticed that when I ping my phone I get a number of "Request timed out." msgs, when I turn on my RPI3 app I can see how often or not often WiFi returns a ping reply can you confirm? Mike

I have not had that experience.  Here is my distance data for a week.  Its location is being captured by Vera.
Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline MNB

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +4/-9
Re: Ping Sensor
« Reply #601 on: May 09, 2017, 09:11:47 am »
Don, thanxs for the comeback. Nice graph pray tell how did you create it and how is distance captured? Looking at your graph it shows that your phone (s) are not awake all of the time there is a large time periods where there is no reporting it looks like during the day your on your phone for instance on May 3 you were on your phone early morning sometime around ~6:00 your phone went to sleep and then woke up and went back asleep around 23:00 and didn't awake until the following morning around 7:00am. What scale is the distance? Mike
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 886
  • Karma: +18/-16
    • Worthington Engineering, Inc.
Re: Ping Sensor
« Reply #602 on: May 09, 2017, 07:03:55 pm »
I use datamine2 and the distance is miles. Very slick plug-in. Distance is captured from the iPhone Locator plug-in.

Attached is a day's data.  As you can see, the phones are reported as 0ish miles over night. iPhone locator pings both phones every 5 minutes and I do get e-mails and my gets VeraMate alerts all night so I think it works very well over night.

My wife left the house around 7 am, me around 7:15. It shows me coming home for lunch for an hour and back to work until 5:30, and my wife returning at 6.

I am pretty sure iPhone Locator is reporting distance accurately, especially since I have not had any Home/Away issues both overnight and when we are away.

Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline MNB

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +4/-9
Re: Ping Sensor
« Reply #603 on: May 10, 2017, 04:21:56 pm »
Don, thanxs for update, I just installed DataMine2 and it seems to work great, it is a little more adjustable than DataYours. without the Y axis label it wasn't clear that it was distance. I will reinstall iPhone Locator and confirm your findings. I had been ping every minute whereas iPhone seems to ping every 5 minutes. Out of curiosity I assume your using the latest version of iPhones? Thanxs for sharing your results as it provides a baseline of what your achieving. Mike
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 886
  • Karma: +18/-16
    • Worthington Engineering, Inc.
Re: Ping Sensor
« Reply #604 on: May 10, 2017, 05:49:16 pm »
We both have an iPhone 6 with the latest iOS.
Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline MNB

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +4/-9
Re: Ping Sensor
« Reply #605 on: May 10, 2017, 06:44:29 pm »
Thanxs Don... quick DataMine 2 questions; I seem to be getting two Y-Axis values in my graphs, pray tell how does one turn one of them off and secondly is there a way to control the scale values e.g. having whole numbers vs fraction of minutes? Mike
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 886
  • Karma: +18/-16
    • Worthington Engineering, Inc.
Re: Ping Sensor
« Reply #606 on: May 10, 2017, 09:54:38 pm »
The 2 scales have something to do with the data, especially when you have divergent data.  For instance, if you track wind speed and temperature, you will see both scales.  I am not sure how to address it - I just keep playing until I a useful graph.

I am not sure you can control scale, but you can set a multiple of the data. So if one is in tenths of a unit, and the other is 10's of a unit, you can scale either the first up by 10, or the second down by 1/10th.

I just keep playing with it (that's what she said).
Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline MNB

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +4/-9
Re: Ping Sensor
« Reply #607 on: May 11, 2017, 10:04:03 am »
Don, thanxs for input and humor!  :P The reason I've belabored this is as you can see from my graph ping seems to be the least reliable means of determining one's presence with Bluetooth (BT) being second followed with iPhone locator App being the most (before you ask no I did not leave home whilst doing this). My question is how/what is the iPhone locator app achieving this (which I believe is a question asked in the iphone locator app) feat? Mike

Update: I copied this post to the iPhone Locator thread as this discussion morphed from Ping to iPhone Locator apps.
« Last Edit: May 11, 2017, 12:16:25 pm by MNB »
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 886
  • Karma: +18/-16
    • Worthington Engineering, Inc.
Re: Ping Sensor
« Reply #608 on: May 11, 2017, 04:18:39 pm »
From what I understand, and amg0 can correct me, when iPhone Locator pings the phone, it is using iCloud which reports to Vera your GPS coordinates.  Based upon the latitude and longitude you entered as home, Locator calculates your distance and that is what Datamine is capturing. If Locator is set to 5 minutes (like me), I get 5 minute distance datapoints.  For instance, today, I had to run to the office to get something, got coffee, then I went to a class. At lunch, I went to a drive through, drove around a little, and returned to the class. After class, I ran to the post office, then went home.  So you can see last night, all night, iCloud was not 100% accurate on my phone's location but close enough not to trigger me being gone.

I am not sure what Locator keeps under distance when iCloud cannot find the phone. Perhaps distance is recorded as 0. Maybe it does nothing and the distance value is not changed.

(by the way, I did not copy my response to the Locator page because this discussion is as much about the ping sensor and blue tooth as it is about Locator).
 
Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline MNB

  • Hero Member
  • *****
  • Posts: 692
  • Karma: +4/-9
Re: Ping Sensor
« Reply #609 on: May 12, 2017, 10:56:42 am »
Hey Don, thanxs for the explanation I started also graph my iPhone Locator distance to monitor. I have notice that even when the phone is sitting in the same place that there are minor variation in distance (rotation-wobble of the earth  ;D anomalies) probably from how the signals are picked up via xmission towers. iCloud must be doing something different in the background when the iPhone goes to sleep as seen whilst using ping vs Iphone Locator plugins.
Edge-1.7.2607, VRI06-1LX Dimr (6), VS05-1LX Sw (4), GE ZW3002 Dimr (1), HA01C Outlet (12), HA02C Sw (6), HA04C Sw (4), GE Sw (2), HA05 Sw (3), MiniMote Contr (5), HSM200/100 Sensor (2), ZW100A Sensor (8), Nest thermostat (1) & Protect Fire/CO (6) Kwikset Locks (3), F18918W (1) & IP3M-9 (6) Cam's

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 886
  • Karma: +18/-16
    • Worthington Engineering, Inc.
Re: Ping Sensor
« Reply #610 on: May 12, 2017, 06:45:53 pm »
Yes, I noticed wobbles also. You can also use the map in Locator to watch the phone and sometimes, you will see the location dot move a few feet for a while, and move back. Given the GPS signals are 23k miles in the sky, and weather can affect these signals, I am not surprised we have wobble.  I still think this is amazing technology.

Here is a screenshot of my Locator. It shows my phone is outside my neightbor Susie's condo.  Just before this, my phone was shown in my garage.  My home pin is in the living room.
« Last Edit: May 12, 2017, 06:52:45 pm by Don Phillips »
Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline twiseva

  • Sr. Newbie
  • *
  • Posts: 21
  • Karma: +0/-0
Re: Ping Sensor
« Reply #611 on: May 17, 2017, 07:21:53 pm »
So to those interested, upgrading to a VeraPLUS now has the ping sensor working fine. So I am assuming something in the underlying hardware as I am assuming the firmware/code is the same. Possibly more memory or something like that? I'll keep an eye on it and see if it goes bad after a longer period of time but looks good now for multiple days -- previously went bad after say 10 pings or so.

Offline Shorty

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +1/-0
Re: Ping Sensor
« Reply #612 on: October 01, 2017, 12:30:57 pm »
I am running UI7 on a vera3 and have the ping sensor installed.

2 Questions.

1.  I am trying to set the poll period and device timeout.  Poll period accepts the value without issue however when I attempt to enter the device timeout, it multiplies the value I enter with the poll period.  For example if I want it to poll every 60 seconds and time out at 5, I enter 60 then TAB the 5 TAB and the 5 automagically turns into 300. 

Likewise 60/1 becomes 60/60 etc.  The only value for device timeout that sticks is 0 (mathematically makes sense).  I tried to go with it and try a decimal (ie 60/0.1) but it ignores the decimal and treats it as a whole number and behaves the same (60/.01 returns 60/60).
Anyone else experiencing this or am I just lucky?

2.  Is there anyway to limit or autodelete the logs?  After 1 day it has accumulated 1500+ records.  I'm concerned this will grow large and cause problems if I don't manually delete the logs.  The logs are very useful as I am using the plugin to check for internet connectivity at a remote location but I don't want to clog things up.  Perhaps the amount of data used for logs is negligible...?

Offline Shorty

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +1/-0
Re: Ping Sensor
« Reply #613 on: October 05, 2017, 01:24:56 pm »
I have noticed something else odd....

When I attempt to change the poll period under the settings tab it does not stick.  I click "save and reload" then hit back and click save on that screen but when I go back it reverts to 15 seconds.  I can get it to stick by changing it under the variables tab.  Is there a way to change the timeout period under the variables tab?  I don't see anything listed but perhaps it can be added?

Also I am manually deleting the log records for fear they may accumulate and bog vera down.  Is there a way to change the amount of records viewed to a higher number?  The highest option is 50 and I have 15000 records accumulated.  Just getting this up to 100 would help greatly.

Any help would be appreciated.
« Last Edit: October 05, 2017, 01:28:02 pm by Shorty »

Offline Shorty

  • Jr. Member
  • **
  • Posts: 93
  • Karma: +1/-0
Re: Ping Sensor
« Reply #614 on: October 05, 2017, 02:03:06 pm »
I found this in the J_PingSensor_UI7.js file (approximately half way down)

function PingSensorSettings(deviceID) {
      try {
         init();
         
         var period  = api.getDeviceState(deviceID,  pingsensor_svs, 'Period');
         var address  = api.getDeviceState(deviceID,  pingsensor_svs, 'Address');
         var timeout  = api.getDeviceState(deviceID,  pingsensor_svs, 'AllowedFailure')*period;

To this novice it appears it is setting timeout variable as AllowedFailure multiplied by period.  So this is causing the multiplication.  Is there a reason for this?  I don't want to change it and cause problems.