GPS/Location rule not running

HeroS - www.domotica-blog.nl shared this problem 11 years ago
Solved

I got a rule thats reads my location and turns things on when i'm 5 km near my house and set a virtual when i'm 5 km away.


I made the attached rule but it doesn't run. Can u help me?


Have done some testing and it runs when a put the location in the when rule. Like this:


When >>location < 5 and time now time etc


But a don't want that because of the virtual switches.

Replies (7)

photo
1

how do you get your location?

Is it a http request to your phone or are you using a service like google latitude?

photo
1

I'm using latitude for position.


I got the rule runing now for test.

photo
1

sounds good.

I'm already using latitude.


How does your setup look like?

How do you get the position from latitude to you zipato box?

photo
1

Hi HeroS,


you are setting your virtual switch state inside a rule and using that same switch as event trigger which is not goof because you would have an infinite loop.

I don't understand what exactly you are trying to achieve but you should use your distance meter as event trigger just like in example you posted above.

photo
1

Hi Nenad,


I overlooked the loop and got it working now. Thank u.


But one more question...u are saying that you must not use a virtual switch as event trigger. I don't understand why not.


I have serveral rules that use a virtual as trigger and they work fine. For example see the attached rule.


Is this not right?


I'm using this rule as go to sleep rule to turn things off.

photo
1

Sorry for misunderstanding, I edited my previous post.

Off course you can use virtual switches as event triggers. In my last post I was referring just to your GPS/Location rule.

Leave a Comment
 
Attach a file