Using Fing as a new way to detect smartphone presence

Plugins that users have built. NOTE: plugins that were developed for Indigo versions older than 2022.1 will have to be updated to work with Indigo 2022.1 (Python 3 - see this blog post for details). If the plugin listed here is not in the Plugin Store (which will show updated plugins) then you will need to ask on the appropriate thread below if it has been updated and where you get get the update.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Using Fing as a new way to detect smartphone presence

Post by kw123 »

it should be ready later today.
User avatar
haavarda
Posts: 702
Joined: Sat Aug 18, 2012 4:40 am
Location: Norway

Re: Using Fing as a new way to detect smartphone presence

Post by haavarda »

Looking forward to it!


Sent from my iPhone using Tapatalk
Håvard
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Using Fing as a new way to detect smartphone presence

Post by kw123 »

[urlhttps://www.dropbox.com/s/b86u4p7ednq4xz4/fingscan.indigoPlugin-4-0-1.zip[/url] v4-0-1

New:
- can set triggers in configuration menu for status away or back home
for
10 different scenarios (Event 1...10)
each with 5 different devices
each of the 5 devices has to be away for the Event- AWAY to trigger:
(a) on IP up or down with number of minutes required to be down before state is away
(b) add iDevice condition: # of miles away to be home or away
- home: idevice <xx miles OR IP up (==> if idevice still thinks its home its home), in case you switch off wifi)
- away: iDevice > yy miles AND IP down ( ==> its away only if IP down and distance > xx)
2 different miles values for away of home


the back home status is triggered ~ 1-2 seconds after phone connects to wifi. I am using it to open the front doors. Works 99% of the time.

Tried my best to make it user friendly
Have tested with 2 devices and idevice, but not idevice away as this would require starting, going away for some time and checking status coming back home ... That will take > 10 minutes per test cycle.


the attached screen shot show the 2 user screens (a) the config screen and (b) the trigger selection (after you select fingscan events)

left to be done:
- some more testing
- sorting the device list that is presented to the user.
- some performance tuning
- check if iDevice can increase frequency from 15/20 minutes to 5 minutes for update for distance
looking forward to your feedback.

Karl

ps you can also use this to trigger on regular IP devices not being up (there is an immediate time selection, if chosen AWAY-event will happen as soon as it goes down and gets recognized by FING (~ 1 minute))
Attachments
Screen Shot 2014-07-20 at 1.55.11 PM.png
Screen Shot 2014-07-20 at 1.55.11 PM.png (153.63 KiB) Viewed 4970 times
Screen Shot 2014-07-20 at 1.53.38 PM.png
Screen Shot 2014-07-20 at 1.53.38 PM.png (90.49 KiB) Viewed 4970 times
User avatar
haavarda
Posts: 702
Joined: Sat Aug 18, 2012 4:40 am
Location: Norway

Re: Using Fing as a new way to detect smartphone presence

Post by haavarda »

Hi Karl
I am getting a repeating error do you have any sugestions on what could cause this?

Code: Select all

22 Jul 2014 12:58:13
  Enabling plugin "fingscan 4.01"
  Starting plugin "fingscan 4.01" (pid 15708)
  Started plugin "fingscan 4.01"
  fingscan                        FINGSCAN initializing  ... will take more than one minute .v 4.01..
  fingscan                        FING initializing
  fingscan                        FING initialized ..  created new data 

22 Jul 2014 12:59:13
  fingscan Error                  --> while loop break <-- error in logic or variables mixed up  ... stopping ...  quitNOW was:yes
  Reloading plugin "fingscan 4.01"
  Stopping plugin "fingscan 4.01" (pid 15708)
  fingscan                        stopConcurrentThread called 2
  fingscan                        stopConcurrentThread called 3
  fingscan                        shutdown called
  Stopped plugin "fingscan 4.01"
  Starting plugin "fingscan 4.01" (pid 15777)
  Started plugin "fingscan 4.01"
  fingscan                        FINGSCAN initializing  ... will take more than one minute .v 4.01..
  fingscan                        FING initializing
  fingscan                        FING initialized ..  created new data 

22 Jul 2014 13:00:22
  fingscan Error                  --> while loop break <-- error in logic or variables mixed up  ... stopping ...  quitNOW was:yes
  Reloading plugin "fingscan 4.01"
  Stopping plugin "fingscan 4.01" (pid 15777)
  fingscan                        stopConcurrentThread called 2
  fingscan                        stopConcurrentThread called 3
  fingscan                        shutdown called
  Stopped plugin "fingscan 4.01"
  Starting plugin "fingscan 4.01" (pid 15845)
  Started plugin "fingscan 4.01"
  fingscan                        FINGSCAN initializing  ... will take more than one minute .v 4.01..
  fingscan                        FING initializing
  fingscan                        FING initialized ..  created new data 
Håvard
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Using Fing as a new way to detect smartphone presence

Post by kw123 »

this is in the old code. no change there. which version where you using before?

I have a new one ready today. but that would not fix that error message.

it states that your ipDevice variable are somehow wrong ... the program can not make sense out f them

could you send me a screenshot or an export (save ip variables to file) of your variables (may be email [email protected] if you don't like to post them)

Karl
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Using Fing as a new way to detect smartphone presence

Post by kw123 »

https://www.dropbox.com/s/ae5ijok07sf47 ... -4-0-3.zip -4-0-3

haavarda: this code should give you more information on where it thinks the data is wrong.

Also much imported trigger management, clearer structure.

have tested it several times now while driving 0.5 miles 5 miles away from home - checking triggers with wifi on/off ...

Also if you do not have "find my iDevices" installed it will not present the iDevice options.


Karl
User avatar
haavarda
Posts: 702
Joined: Sat Aug 18, 2012 4:40 am
Location: Norway

Re: Using Fing as a new way to detect smartphone presence

Post by haavarda »

kw123 wrote:https://www.dropbox.com/s/ae5ijok07sf47 ... -4-0-3.zip -4-0-3

haavarda: this code should give you more information on where it thinks the data is wrong.

Also much imported trigger management, clearer structure.

have tested it several times now while driving 0.5 miles 5 miles away from home - checking triggers with wifi on/off ...

Also if you do not have "find my iDevices" installed it will not present the iDevice options.


Karl
I did some testing and I am not seeing the error now. Will test it over some time and see if it happens again. I deleted all IP devices at some point. That might have something to do with it?
The updated version looks very tidy. Specially since I am not using find idevices...

thanks for your work on it!

Håvard
Håvard
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Using Fing as a new way to detect smartphone presence

Post by kw123 »

If you have an iPhone or iPad "find my iDevcies" is really good!!

thanks for testing, let me know if there are any problems.


Karl
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Using Fing as a new way to detect smartphone presence

Post by kw123 »

https://www.dropbox.com/s/clw6ju7cf69vx ... -4-0-4.zipv4-0-4

fixes:
away trigger was triggering FAR to often

attached a diagram that should explain when HOME and when AWAY triggers

the wait time is set in the config menu. a normal iPhone can be down for 15-25 minutes depending on power etc before it reconnects through wifi.

if you overlay the distance information from iDevice you get:
HOME: if iDevice distance < than set limit in config even if FING status is "DOWN", this will reduce the up/down cycles of an iPhone at home as the location information is still HOME
AWAY : if iDevice distance > than set limit in config even if FING status is (still) "UP" or still waiting the AWAY "wait time" ,
for example: if you leave home, the "wait time" is set to 30 minutes, AWAY will trigger e.g. if you are 1mile away (if distance limit is set to 1 mile)

A good suggestion is to set the HOME distance to 0.1 miles and the away distance to 0.5 mile. This will keep HOME alway on when you are at home and will trigger away as soon as you are more than 0.5 miles away or e.g. 30 minutes for the AWAY wait time.

When you come back home (my) iPhone connects within 1-3 seconds to wifi and the HOME trigger fires within 1-2 seconds after that. That means by the time I get to the door it is already unlocked Also if you enter the iDevice HOME radius (within 2 minutes in my setting) HOME triggers.

Karl
Attachments
Screen Shot 2014-07-23 at 1.08.48 AM.png
Screen Shot 2014-07-23 at 1.08.48 AM.png (24.42 KiB) Viewed 4880 times
User avatar
haavarda
Posts: 702
Joined: Sat Aug 18, 2012 4:40 am
Location: Norway

Re: Using Fing as a new way to detect smartphone presence

Post by haavarda »

Thank you for the update! I was about to post the same findings with the away timer :)

Håvard


Sent from my iPhone using Tapatalk
Håvard
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Using Fing as a new way to detect smartphone presence

Post by kw123 »

https://www.dropbox.com/s/eozk22xet0crl ... n4-5-1.zip V 5-5-1

added wait time for new HOME trigger, see attached schema to explain. It looks complicated but actually is not

the wait times are need to suppress triggers every 5 minutes or so when the phone decide to go to sleep or wake up again

This should be it, don't know of any other functionality one could get out of this.

Karl
Attachments
Screen Shot 2014-07-23 at 7.02.33 PM.png
Screen Shot 2014-07-23 at 7.02.33 PM.png (53.62 KiB) Viewed 4855 times
User avatar
haavarda
Posts: 702
Joined: Sat Aug 18, 2012 4:40 am
Location: Norway

Re: Using Fing as a new way to detect smartphone presence

Post by haavarda »

So far everything is working very good with this plugin. One small thing I have noticed. If you see the attached image, there is some mixup with the names, or sorting of the list.

besides from that it is working great!


Håvard
Attachments
Screen Shot 2014-07-27 at 12.37.59.png
Screen Shot 2014-07-27 at 12.37.59.png (73.22 KiB) Viewed 4821 times
Håvard
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Using Fing as a new way to detect smartphone presence

Post by kw123 »

will fix when I am back home tomorrow night, just a typoooo in the name field.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: Using Fing as a new way to detect smartphone presence

Post by kw123 »

https://www.dropbox.com/s/0k1v4xl4ngydt ... n4-5-2.zip v 4-5-2

fixed typos in in event selection menu


Karl
Dewster35
Posts: 1033
Joined: Tue Jul 06, 2010 6:29 pm
Location: Petoskey, MI

Re: Using Fing as a new way to detect smartphone presence

Post by Dewster35 »

Thank you for the awesome plugin Karl! Very responsive and now I can start thinking about getting a new 802.11 AC router as my extreme is on it's last legs!
Post Reply

Return to “User Plugins”