Distance based updates as opposed to time based?

View previous topic View next topic Go down

Distance based updates as opposed to time based?

Post by Admin on Thu Jun 06, 2013 7:48 am

Ok so I thought I might give some insight as to why I did things the way I did as well as explain what I plan to do next.

So when I decided to write the app I did it because I didn't want google collecting information on where I was, and Btraced seemed to be nice but was not specific to Homeseer. Also opening a web page to show maps of the location of the kids, myself, wife, etc is just plain cool. I tried to do it all at first, but then I found Snevl. Steve's work is awesome. And frankly I was to lazy to even begin writing what he has done. He was kind enough to work with me on getting my app working with Snevl.

Anyways, I went the timed based route for a couple reasons.
On IOS it is much more battery conscious to turn the radio on then update then turn off. With the other 2 apps used with Snevl the GPS runs all the time. This is beacuase they use movement or distance to detect when to update. Now just because it doesn't update because you have not moved say, 100 meters does not mean it isn't still checking the gps. To do this the gps has be checked constantly and then distance calculated to make a decision as to update the server or not. For this to happen you increase the battery drain. And for me the big thing I did not like was that if I am sitting at my desk at work for 8 hours straight then the updated time device code in HS never gets updated. I really like the fact the that even though the device hasn't moved the last updated time still gets updated.

IOS also does not allow you to turn on the radio only when you want to and then turn it off. Androind is the same. What I mean by this is that there are time limits. If you open an app, then put it into the background it will continue to run for approx. 10 to 15 mins. And the biggest thing of all, only GPS, VOIP, and music apps are even allowed to run in the background. To overcome the background time limit I need to build a timer that restarts that time out clock every so often. I am not special it's what they all do. Google actually has the biggest plus off most GPS apps. With the exception of anything from Apple. Google latitude, once started allows you to reboot your phone and automatically starts sending updates. Few apps are allowed to do this. I just have never done it before, but am looking into it.

So here is what I plan and we will see if it works out.
I am going to try to create a hybrid of time based and distance based. Basically give you the ability to say update on distances greater than "x". The timer will still be used in a way that it will keep the app alive and should pass through the Apple app store rules.
Doing this will result in a couple things.
1. Battery life will go down
2. Device code for last time updated will not update until you have moved a distance
3. It will not work well at all on devices without GPS radios. Meaning ipod, different versions of ipads, etc.

So if this is all cool. I will take a wack at it.
avatar
Admin
Admin

Posts : 68
Join date : 2013-06-05

View user profile http://dageek.forumotion.com

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by x10joe on Thu Jun 06, 2013 7:55 am

Looking forward to testing it Smile

x10joe

Posts : 24
Join date : 2013-06-05
Age : 58
Location : Springfield, IL

View user profile

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Gogs on Thu Jun 06, 2013 7:59 am

Personally using time updates as oposed to distance travelled suits me with one exception.

It is nice to update your location at a point of turn.
avatar
Gogs

Posts : 27
Join date : 2013-06-05

View user profile

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by jbbtex on Thu Jun 06, 2013 8:05 am

Sounds good.

jbbtex

Posts : 11
Join date : 2013-06-05

View user profile

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Admin on Thu Jun 06, 2013 8:12 am

Gogs wrote:Personally using time updates as oposed to distance travelled suits me with one exception.

It is nice to update your location at a point of turn.

Yeah I want this too. Right now its a little hard cuz for some reason IOS won't give the heading correctly. But I will add it to the list.
avatar
Admin
Admin

Posts : 68
Join date : 2013-06-05

View user profile http://dageek.forumotion.com

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Admin on Thu Jun 06, 2013 10:07 am

Quick question.

What is an average distance that you would like updates to happen at?

In the end it will be configurable, but a need round about of what everyone is thinking so I can test the accuracy.
avatar
Admin
Admin

Posts : 68
Join date : 2013-06-05

View user profile http://dageek.forumotion.com

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Jayman13 on Thu Jun 06, 2013 10:25 am

I would love to have distance based calculations but like btraced as you said the battery drain is definitely there. What would be nice is if GPS could be configured to be turned on all the time that the phone is plugged in and getting charged. Is that possible? That way, when someone is driving for instance, a lot of us have our phones plugged in and would be very useful. I'm thinking distances configurable from 300 ft to miles in my preference as far as the average distance to do updates.

Jayman13

Posts : 51
Join date : 2013-06-05

View user profile

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Admin on Thu Jun 06, 2013 10:34 am

Jayman13 wrote:I would love to have distance based calculations but like btraced as you said the battery drain is definitely there. What would be nice is if GPS could be configured to be turned on all the time that the phone is plugged in and getting charged. Is that possible? That way, when someone is driving for instance, a lot of us have our phones plugged in and would be very useful. I'm thinking distances configurable from 300 ft to miles in my preference as far as the average distance to do updates.

Yes the pluggin in is possible.

In theory I could say when plugged in do updates based on distance. Otherwise do it on the time schedule.
Would that work?

Not promising anything. I need to get distance updates working first.
avatar
Admin
Admin

Posts : 68
Join date : 2013-06-05

View user profile http://dageek.forumotion.com

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Gogs on Thu Jun 06, 2013 10:36 am

Admin wrote:Quick question.

What is an average distance that you would like updates to happen at?

In the end it will be configurable, but a need round about of what everyone is thinking so I can test the accuracy.
Difficult one, I would like to see it variable for each user to choose, but, certainly ½ a mile minimum.

That's a UK mile none of your American nonsense. lol!
avatar
Gogs

Posts : 27
Join date : 2013-06-05

View user profile

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Admin on Thu Jun 06, 2013 10:38 am

Yeah yeah. You guys and your metric crap. Screwing up all my tools!
avatar
Admin
Admin

Posts : 68
Join date : 2013-06-05

View user profile http://dageek.forumotion.com

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Admin on Thu Jun 06, 2013 11:35 am

Ok did a mini test with distance.
I set my distance for 100 meters. So any point over 100 meters from the last point sends an update. I can say that caused a few problems.
1. For starters if you have IP HAck blocking enabled in HS your ip will get blocked very quick as traveling 100 meters takes no time at all when you drive down the road.

2. Every time an update is sent to the server Snevl does a reverse geocode lookup through google. To low of a setting and you will get ip blocked by google for 24 hours. Google allows like 2500 lookups per day. Depending on your settings for distance and where your going that could be reached rather quickly. Thats kinda why I started working with time based. Even at 1 minute you would only hit 1440 lookups in a 24 hour period.

I think I can get it done. But I would want to limit the distance variable to a minimum. Which is lets say 350 meters. Even that I think is really low. Approx 804 meters is a half mile. Going down the highway you would be sending updates at approximately 30 seconds apart. On a side street updates would be every minute or so. Sitting still, would cause there to be no updates.

So I guess I am failing to see some of the usefulness. Set the thing for 1 minute updates. No matter where you are or what your doing every minute there will be an update. Thus side stepping HS IP Blocking or at least you don't have to re-configure those settings. I mean I get it that if your flying down the highway at 70 then come home and look at your map you will get almost every curve you took.

I am going to finish it out. Do a test with higher update distances. But it will be up to the user to configure HS not to do IP Blocking.

I know Btraced allows you to do distance. But understand Btraced is not designed specifically for snevl. It was adapted. And if Steve wants to weigh in, I believe it sends multiple updates at once, which does not effect the Ip blocking or reverse geocode. I didn't build the app to function like this. So to rework that would be square one move.

I am totally going to make it work best I can. But it will be up to the user to use it within reasonable parameters.

avatar
Admin
Admin

Posts : 68
Join date : 2013-06-05

View user profile http://dageek.forumotion.com

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Gogs on Thu Jun 06, 2013 11:54 am

Yes you are correct, Btraced will store postions and send them on mass if it has no internet or GPS connection.

I think, will try it tomorrow, 1 min updates would also remove the request for point of turn.

I'll watch how the battery copes.
avatar
Gogs

Posts : 27
Join date : 2013-06-05

View user profile

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Jayman13 on Thu Jun 06, 2013 12:30 pm

Admin wrote:
Jayman13 wrote:I would love to have distance based calculations but like btraced as you said the battery drain is definitely there. What would be nice is if GPS could be configured to be turned on all the time that the phone is plugged in and getting charged. Is that possible? That way, when someone is driving for instance, a lot of us have our phones plugged in and would be very useful. I'm thinking distances configurable from 300 ft to miles in my preference as far as the average distance to do updates.

Yes the pluggin in is possible.

In theory I could say when plugged in do updates based on distance. Otherwise do it on the time schedule.
Would that work?

Not promising anything. I need to get distance updates working first.

Yeah that would be ideal to have it running constantly when plugged in and then time based when not. It really in my opinion would be the best home automation solution!

Jayman13

Posts : 51
Join date : 2013-06-05

View user profile

Back to top Go down

Re: Distance based updates as opposed to time based?

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum