Using 2 Variables to Update Another Variable

Posted on
Fri Oct 24, 2014 11:36 am
rm2014 offline
Posts: 28
Joined: Sep 14, 2014

Using 2 Variables to Update Another Variable

I am using Fingscan to track two smartphones on the network, its working like a charm, but what I am trying to do is when the two phone variable values are set to "away" - I have a global "allaway" variable that also updates so I can use that as a trigger for various actions.

How do I get it so that when two variables are in a certain state - it updates my "allaway" variable?

What I have done at the moment is to create two triggers - one to look for a change in state for one of the variables, and then a condition that says both variables need to be set as "away", and then vice versa on the other variable. Is that the best way to do it?

Thanks

Posted on
Fri Oct 24, 2014 3:26 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Using 2 Variables to Update Another Variable

You could just use fingscan in ONE event to do it. Use 2 devices in ONE event in config, that should do it.


Sent from my iPhone using Tapatalk
Last edited by kw123 on Fri Oct 24, 2014 4:10 pm, edited 1 time in total.

Posted on
Fri Oct 24, 2014 4:09 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Using 2 Variables to Update Another Variable

Or if you want to use variables:

assume you have N variables you want to be ON/Home to set variable ALL-ON

1. create VARIABLE ALL-ON (or ALL-HOME) set to 0
2. for each of the N variables set up 2 triggers: one for change to ON and one for change to OFF
action: increment / decrement variable ALL-ON by 1

if variable ALL-ON equals N then all variables are ON/AWAY, if it is equal 0 all are OFF/home
that variable will tell you how many variables are ON.
This works for any number of variables.

Karl

Posted on
Sat Oct 25, 2014 8:05 am
rm2014 offline
Posts: 28
Joined: Sep 14, 2014

Re: Using 2 Variables to Update Another Variable

I ended up using the second of your two options - many thanks for the suggestion.

For your first suggestion, how would I use fingscan in one event?

Ross

Posted on
Sat Oct 25, 2014 8:41 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Using 2 Variables to Update Another Variable

in fingscan configuration you add 2 devices into 1 event

= when you open fingscan configuration, you see EVET selection, pick event 1; then add phone 1 and phone 2.; then confirm and save

then in triggers you select fingscan / event # 1 / home or away depending on what you want to trigger on.

Karl
Attachments
Screen Shot 2014-10-25 at 4.43.31 PM.png
Screen Shot 2014-10-25 at 4.43.31 PM.png (78.22 KiB) Viewed 4704 times

Posted on
Sat Oct 25, 2014 10:49 am
rm2014 offline
Posts: 28
Joined: Sep 14, 2014

Re: Using 2 Variables to Update Another Variable

Is that option under Plugins>Fingscan>Configure?

Posted on
Sat Oct 25, 2014 10:58 am
rm2014 offline
Posts: 28
Joined: Sep 14, 2014

Re: Using 2 Variables to Update Another Variable

I think I found out what the problem was - I was using fingscan version 3. something from here:
http://www.indigodomo.com/library/251/

I upgraded and see what you are talking about!

Posted on
Sat Oct 25, 2014 3:23 pm
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Using 2 Variables to Update Another Variable

see the new thread http://forums.indigodomo.com/viewtopic.php?f=134&t=12787 for downloading the latest FINGSCAN version


Karl

Posted on
Sat Oct 25, 2014 8:53 pm
rm2014 offline
Posts: 28
Joined: Sep 14, 2014

Re: Using 2 Variables to Update Another Variable

That's great! Thanks for that, its all working much easier now and with fewer triggers :lol:

Another quick question you might be able to help - I have a home trigger, but every time the phones drop off and then come back on, it goes off. I know I can delay the trigger home (like I do with away), but is there a way to trigger once, but then wait and see if it has triggered in the last 15 mins say and not trigger again? I am getting multiple home triggers at the moment and I do not want a delay for the initial one.

Ross

Posted on
Sun Oct 26, 2014 2:50 am
kw123 offline
User avatar
Posts: 8333
Joined: May 12, 2013
Location: Dallas, TX

Re: Using 2 Variables to Update Another Variable

Set the away trigger to 15 minutes That should do it. If you would have the Asus router it would be able to get better info. The phones go to a power save mode where they do not answer pings but they are still associated with the router. Try out 15 minutes and see if your phone works ok. The delay also depends on if the phone is being charged or runs on battery.


Sent from my iPhone using Tapatalk

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 1 guest