The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => IPhone Locator => Topic started by: Kmitchel on December 31, 2014, 12:25:33 pm

Title: Virtual Switch PLEG and iPhone Locator
Post by: Kmitchel on December 31, 2014, 12:25:33 pm
I've now spent HOURS trying to figure out how to get this to work, please help a noob.

I'm on UI5.  I installed the PLEG app, I've installed the iPhone located and configured (I think this is correct because it has a green light and correctly shows the phone location), I've installed Virtual switches.

My virtual switch named "Kmitchel Home"
I created a new PLEG

Input -

Trigger (I named my trigger "tVenicePresent")= Device = (*)Venice ("Venice" is the name of my iPhone), Event Type = A device is present or away, Which Mode = Device is present
Schedule = None = I want my virtual switch to turn on regardless of the day/time
Device Properties = None

Conditions -

One condition (cKmitchelHome) = tVenicePresent

Action -

I just have the Virtual Switch I created set to "on"

I save and the virtual switch still does not turn on.  What am I missing?  I've searched the forums, YouTube and downloaded and searched the PLEG guide but still can't get this simple scenario to work.

Thanks in advance.






   
Title: Re: Virtual Switch PLEG and iPhone Locator
Post by: amg0 on December 31, 2014, 12:55:08 pm
I've now spent HOURS trying to figure out how to get this to work, please help a noob.

I'm on UI5.  I installed the PLEG app, I've installed the iPhone located and configured (I think this is correct because it has a green light and correctly shows the phone location), I've installed Virtual switches.

My virtual switch named "Kmitchel Home"
I created a new PLEG

Input -

Trigger (I named my trigger "tVenicePresent")= Device = (*)Venice ("Venice" is the name of my iPhone), Event Type = A device is present or away, Which Mode = Device is present
Schedule = None = I want my virtual switch to turn on regardless of the day/time
Device Properties = None

Conditions -

One condition (cKmitchelHome) = tVenicePresent

Action -

I just have the Virtual Switch I created set to "on"

I save and the virtual switch still does not turn on.  What am I missing?  I've searched the forums, YouTube and downloaded and searched the PLEG guide but still can't get this simple scenario to work.

Thanks in advance.


which version of IPhone plugin are you using ?
I do not know PLEG well, but to my knowledge it only evaluates expressions like triggers when something changes. so for instance, try to click on the iPhone device to force it "Away" ( it should turn red ) then click refresh ( it should turn it back green ),  PLEG should see the change then
Title: Re: Virtual Switch PLEG and iPhone Locator
Post by: Kmitchel on December 31, 2014, 12:57:14 pm
I'm using v. 1.93 of the iphone Detector Plugin.

That actually helps a lot.  If it will only "trigger" when it senses a change, that would explain why it doesn't trigger.

Thanks!
Title: Re: Virtual Switch PLEG and iPhone Locator
Post by: amg0 on January 06, 2015, 04:38:27 am
I'm using v. 1.93 of the iphone Detector Plugin.

That actually helps a lot.  If it will only "trigger" when it senses a change, that would explain why it doesn't trigger.

Thanks!
Glad it helped