calberrt Posted November 1, 2014 Posted November 1, 2014 Hi Everyone, I'm wondering what would be the best way to write a program that integrates the geofencing technology in Mobilinc to turns on exterior lights when I arrive home. I have a program that automatically turns lights on and off depending on the time of day and want the new program to act as a trigger when I arrive later than expected. Where I'm stuck is being able to trigger the program when I arrive home and not have it triggering at other points of the day. I know that the trigger would have to be when the state of the variable changes (ie. enter home region area according to geofencing) but am unsure of how to write a program that would accomplish this goal Any help would be greatly appreciated. Thanks
elvisimprsntr Posted November 1, 2014 Posted November 1, 2014 (edited) Here are some examples:- Initializing the geofence variable INIT value prevents an ISY or a phone reboot from triggering the program when you are at home.- The programs called in the THEN section are disabled to prevent them from triggering independently.- I also changed the MLHD setting to disable geofence actions when the iPhone is screen locked. Wouldn't want someone who stole/found my phone to enter my home.Arrive If $iPhone_5_Limetree is 1 Then $iPhone_5_Limetree Init To 1 Set Scene 'Exterior' On Set Scene 'Home' On Run Program 'Home - Disarm' (If) Run Program 'Home - Open Garage' (If) Else - No Actions - (To add one, press 'Action') Leave If $iPhone_5_Limetree is 0 Then $iPhone_5_Limetree Init To 0 Run Program 'Home - Arm' (If) Else - No Actions - (To add one, press 'Action') Edited November 1, 2014 by elvisimprsntr
elvisimprsntr Posted November 1, 2014 Posted November 1, 2014 (edited) You could have inferred which, but for clarity iOS Edited November 1, 2014 by elvisimprsntr
oberkc Posted November 1, 2014 Posted November 1, 2014 I thought this most likely, but some refer to "geofencing" more generically.
Bob P. Posted November 2, 2014 Posted November 2, 2014 oberkc, I think elvis was referring to the variable name "iPhone_5_Limetree".
oberkc Posted November 2, 2014 Posted November 2, 2014 Yes. That does seem more obvious now. That is embarassing.
Recommended Posts