Jump to content
C4 Forums | Control4

FollowMe Find My iPhone Geofence Driver


phileaton

Recommended Posts

Version 0.9.7 is out with fixes for the bugs mentioned above. Read more about it on the Synapse Home Automation Blog.

Cool. Nice job Phil. Update worked flawlessly.

 

For version .98 could you add back in a view of what the current polling is set to? Helps testing events and such. Since my logic switches the polling a lot, I'd like to see what its at when I'm in composer.

 

Thanks and Merry Christmas

 

Schrady

Link to comment
Share on other sites


  • Replies 338
  • Created
  • Last Reply

 

 

 

Cool. Nice job Phil. Update worked flawlessly.

 

For version .98 could you add back in a view of what the current polling is set to? Helps testing events and such. Since my logic switches the polling a lot, I'd like to see what its at when I'm in composer.

 

Thanks and Merry Christmas

 

Schrady

It does show your update interval if you are not using smart polling. If you are using smart polling then it hides the update interval field and whatever you are setting for the update interval is not being used. It calculates an update interval automatically after each refresh from Apple. If you are setting update intervals through programming logic you should disable smart polling so it doesn't override your settings. 

 

Link to comment
Share on other sites

 

 

 

 

Cool. Nice job Phil. Update worked flawlessly.

 

For version .98 could you add back in a view of what the current polling is set to? Helps testing events and such. Since my logic switches the polling a lot, I'd like to see what its at when I'm in composer.

 

Thanks and Merry Christmas

 

Schrady

It does show your update interval if you are not using smart polling. If you are using smart polling then it hides the update interval field and whatever you are setting for the update interval is not being used. It calculates an update interval automatically after each refresh from Apple. If you are setting update intervals throughout programming logic you should disable smart polling so it doesn't override your settings. 

 

 

Ok, cool. Will try that.

Thanks

Link to comment
Share on other sites

Phil

 

Could you post some details on the distance to Polling interval logic used by your smart polling

 

I set up an email that fires every time the distance to home changed reporting the distance to home and update interval variables

 

Yesterday I had my communicator set with defaults so 180 for frequency at location and 60 for maximum. I only travelled 1.7 km away from home yesterday but the interval did not change from 180. trigger distance was set at 0.1km

 

This morning I updated to 0.9.7 (updater works great- well done) changed,the maximum frequency to 30 and the trigger distance to 0.3 (frequency while at location still 180) and went for a drive

 

The first email I got was at 0.1km and the interval changed to 30. I should still be at home as i was inside trigger distance so shouldn't the frequency remain at 180 until I leave home.

My device leave home script fired at 0.4km which is correct.

I then drove 4.4 kms away and the polling interval did not change from 30 for the duration of my journey

On returning home my arrive at home script ran correctly but the frequency did not change back to 180, remained at 30 seconds.

 

So it appears to me that the smart polling is not working, but I cant explain (other than 0.9.6 behaves differently to 0.9.7) why yesterday the frequency remained set at the "while at location" frequency of 180 but today as soon as my iphone moved the frequency changed to 30 seconds and did not change. In fact it may have changed to 30 seconds when I set the change from 60 seconds in composer as I did not check that.

Link to comment
Share on other sites

Phil

 

Could you post some details on the distance to Polling interval logic used by your smart polling

 

I set up an email that fires every time the distance to home changed reporting the distance to home and update interval variables

 

Yesterday I had my communicator set with defaults so 180 for frequency at location and 60 for maximum. I only travelled 1.7 km away from home yesterday but the interval did not change from 180. trigger distance was set at 0.1km

 

This morning I updated to 0.9.7 (updater works great- well done) changed,the maximum frequency to 30 and the trigger distance to 0.3 (frequency while at location still 180) and went for a drive

 

The first email I got was at 0.1km and the interval changed to 30. I should still be at home as i was inside trigger distance so shouldn't the frequency remain at 180 until I leave home.

My device leave home script fired at 0.4km which is correct.

I then drove 4.4 kms away and the polling interval did not change from 30 for the duration of my journey

On returning home my arrive at home script ran correctly but the frequency did not change back to 180, remained at 30 seconds.

 

So it appears to me that the smart polling is not working, but I cant explain (other than 0.9.6 behaves differently to 0.9.7) why yesterday the frequency remained set at the "while at location" frequency of 180 but today as soon as my iphone moved the frequency changed to 30 seconds and did not change. In fact it may have changed to 30 seconds when I set the change from 60 seconds in composer as I did not check that.

Great questions. As far as how Smart polling actually works, this is kind of a lengthy topic. I have made a blog post on the Synapse Home Automation website that explains this in detail. I don’t want to bore people on the forums if they don’t care to read about it. 

 

In regards to your programming not firing, the reason the update interval didn’t change during your test is because the driver isn’t updating the variable in order for it to be read by your programming logic. I originally exposed this variable so users could programmatically set an update interval based on distance to a location, whether or not the device was at a location, time of day, or whatever else they wanted to use in order to reduce battery drain. At that time, there was never really any need to read the update interval, because the user always set it and knew the value. Looking back, I probably should have made this and the other read only items like password a command instead of a variable.

 

I thought it was a pain to create these detailed programing routines to changes the update interval throughout the day so I created the Smart Polling feature. However, I never thought users would have any need to read the update interval, so the driver essentially uses the update interval as a read only variable that is only used when Smart Polling is turned off.

 

Making the update interval readable is a trivial task in terms of programing that I would be happy to do if people think it would be useful. However, other than just for interest I don’t know how useful it will be. Also, with Smart Polling enabled the update interval gets changed essentially every time the driver gets new location data from Apple. I would be interested to hear from someone with more knowledge about the inner workings of the system how resource intensive the process of calling C4:SetVariable() is. I don’t want to waste resources on the controller unnecessarily. With that being said, you can see what the calculated update interval is after each update if you enable debugging in the communicator and look in the Lua tab. I often do this while my wife is driving or pull over to the side of the road and remote in to my system to make sure its working.

 

As an aside, I find that LogMeIn Free running on my PC with the LogMeIn app on my iPad or iPhone are a great way of getting full remote access to my computer while away. I bought the paid version of the iOS app a couple years ago because it’s such a great tool, but back then it was only $30. Now at $130 I would just stick with the free app. 

Link to comment
Share on other sites

Phil

Thanks for you detailed explanation on Smart Polling

 

I don't think you need to make the smart polling frequency readable in normal use but for debugging it might be handy. I didn't realise smart polling was not device specific.

 

Yesterday I created my own (no so) smart polling which is attached and seemed to work well.

( after more testing it didn't work so well so I have deleted the screen shot so as not to confuse readers. Working on new script)

 

One thing that I noticed yesterday when you enter a decimal into "if Distance to home actions" whilst the script displays say 0.8 the entry box reverts to whole numbers, in this case 1 (screen shot attached).

 

I believe that the script is also evaluating as whole numbers. So if my script says "if distance from home <=4 then set interval = 400

 

When evaluating a distance of 4.2 which should fail this statement it would actually parse it and set the interval at 400. But it didn't seem consistent and perhaps there is some rounding going on with the decimals before evaluation

 

I have abandoned <= in favour of < in my latest mod to see if that evaluates correctly

 

 

 

 

post-129700-0-00016500-1388102682_thumb.

Link to comment
Share on other sites

Phil,

 

I think I have uncovered a bug.

 

Entering in coordinates into locations causes events to occur. I entered in coordinates for Location 1 which caused and arrive home event.

 

Entering coordinates in Location 2  (any co-ordinates - the one in the screen shot are for Cameroon) triggers a leave work event

post-129700-0-64795200-1388104487_thumb.

Deleting those co-ordinates form location 2 triggers and arrive home event.

post-129700-0-68205500-1388104499_thumb.

 

I replicated this several times so hopefully you can find that one easily

Link to comment
Share on other sites

Yes. This happens when you update coordinates in the driver properties window itself. It has to do with the way the driver iterates through each set of coordinates and determines whether or not  you are at each location. I will see if there is a better way I can handle this. 

Link to comment
Share on other sites

Yes. This happens when you update coordinates in the driver properties window itself. It has to do with the way the driver iterates through each set of coordinates and determines whether or not  you are at each location. I will see if there is a better way I can handle this. 

It is logical that entering new co-ordinates to a location would cause a re-evaluation of the iphone's location but still only valid events should be triggered.

Link to comment
Share on other sites

  • 2 weeks later...

I posted a new version with big changes including the ability to set polling for each device individually and also to push messages to a device. Details are on the blog at Synapse Home Automation. In short, I am not pushing it through auto update at least for the time being because it has so many changes to the programming logic. You can download the new version by going to your purchase history and clicking the download link.

Link to comment
Share on other sites

I posted a new version with big changes including the ability to set polling for each device individually and also to push messages to a device. Details are on the blog at Synapse Home Automation. In short, I am not pushing it through auto update at least for the time being because it has so many changes to the programming logic. You can download the new version by going to your purchase history and clicking the download link.

 

Very excited to test out the new functionality!!!  Have you considered a C4 app to integrate with this?  A simple start to show the locations of the devices being monitored.  I think that would be very cool.  Not sure of the possibility/what would be invoved, but I'd love to see a google map on my TV with pin drops of the devices.  Don't want to start a privacy debate but just some thoughts.

Link to comment
Share on other sites

I found a problem with the XML in the new version so I have to apologize to anyone who has already downloaded the new version. I would also like to thank Eric Scales for pointing out the error. For some reason, Driver Editor exported the update Lua code, but used an older version of the XML for my driver. The older version didn't have the correct device specific commands to enable the messaging feature. To make matters worse, when I installed the new version on my test controller it wasn't updating properly, and I was still seeing the commands as if everything were ok. There is definitely something buggy with updating drivers in Composer Pro lately. 

 

Anyhow, a new version is up on the site already. Its version 0.9.8.1. The only changes are to correct the XML and change the version number. Make sure you see 0.9.8.1 in the version field after you update or install or you know something is wrong. 

 

Once again, sorry to anyone who already downloaded and installed the driver. 

Link to comment
Share on other sites

I found a problem with the XML in the new version so I have to apologize to anyone who has already downloaded the new version. I would also like to thank Eric Scales for pointing out the error. For some reason, Driver Editor exported the update Lua code, but used an older version of the XML for my driver. The older version didn't have the correct device specific commands to enable the messaging feature. To make matters worse, when I installed the new version on my test controller it wasn't updating properly, and I was still seeing the commands as if everything were ok. There is definitely something buggy with updating drivers in Composer Pro lately. 

 

Anyhow, a new version is up on the site already. Its version 0.9.8.1. The only changes are to correct the XML and change the version number. Make sure you see 0.9.8.1 in the version field after you update or install or you know something is wrong. 

 

Once again, sorry to anyone who already downloaded and installed the driver. 

 

Just tried it out and works great!  I love the "Send Message" functionality as a complement to push notifications (for urgent items like the alarm triggering, etc.).

Link to comment
Share on other sites

Hey Phil,

 

What happened to update interval while at location in the properties? I just upgraded and its gone. Did a clean install and deleted drivers from folder and project. Reprogramming everything to make sure I'm good on new version.

Link to comment
Share on other sites

The polling options are in the device driver instead of the communicator now. The new version is polling devices individually instead of the whole account each time it connects to iCloud. If its not showing up in the device driver verify that the version is showing 0.9.8.1. If not, it didm't load properly.

Link to comment
Share on other sites

I took down the beta from the site and posted a free trial and a paid version. The beta keys will work for a couple months. I also plan to send a coupon to the testers in the next couple days. Thanks for all the help everybody. If you find any other little bugs let me know. I pushed out the 1.0 version via auto update but it will only download if you are on 0.9.8 or later. Otherwise you can download from the site under your order history.

Link to comment
Share on other sites

The polling options are in the device driver instead of the communicator now. The new version is polling devices individually instead of the whole account each time it connects to iCloud. If its not showing up in the device driver verify that the version is showing 0.9.8.1. If not, it didm't load properly.

So its now under the driver when you expand it in programming? It was in the properties under system design. Youre saying it not under properties in system design, right?

Link to comment
Share on other sites

In system properties for each device you are monitoring. You can also configure in programming for each device as well.

I just updated to 1.0 and looked. Its not in system properties anymore. There is one I can programictally set, but I can;t set a default like

" When at any location" set polling to 600"

 

I think that should be added back into base properties so theres a default and we diont haver to rely on an event firing to set it.

 

Thanks

Link to comment
Share on other sites

What am I missing 

Trying to set email notification of arrival of one phone at destination to another phone.

 

Both setups work great in every other aspect of programming.

I am missing the obvious I guess.

 

I even read the instructions (embarrassed today )

 

Old age is crap

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.


×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.