[LOCKED] iFindstuff Alpha Testing Topic

Chameleon
Posts: 611
Joined: Sat Oct 04, 2014 9:50 am

[LOCKED] iFindstuff Alpha Testing Topic

Post by Chameleon »

Hiya

Well it's been a few weeks in the making and a great deal of frustration but finally I think we're ready for an Alpha test in the wild. I've completed a lot of testing with the devices that I have but I know from experience that we're going to find a few bugs and things that I've forgotten.

This topic is for Alpha feedback on the iFindStuff plugin. Any issues please post up a copy of the log errors and I'll try and release a new version to resolve them. It'll be on a best endeavours basis but I do try to answer queries as soon as I can.

Thanks for your support


Mike
artpics
Posts: 232
Joined: Tue Feb 24, 2009 11:48 pm
Location: Calabasas CA
Contact:

Re: iFindstuff Alpha Testing Topic

Post by artpics »

plugin been working great for 2 days just upgraded to the latest now i get this

Code: Select all

  Starting plugin "iFindStuff 0.2.11" (pid 82013)
  Started plugin "iFindStuff 0.2.11"
  iFindStuff Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 1117, in runConcurrentThread
  File "plugin.py", line 917, in iGeoLocation
<type 'exceptions.TypeError'>: object of type 'float' has no len()

  iFindStuff Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)


then downgraded back to the previous version no errors
Chameleon
Posts: 611
Joined: Sat Oct 04, 2014 9:50 am

Re: iFindstuff Alpha Testing Topic

Post by Chameleon »

artpics wrote:plugin been working great for 2 days just upgraded to the latest now i get this

Code: Select all

  Starting plugin "iFindStuff 0.2.11" (pid 82013)
  Started plugin "iFindStuff 0.2.11"
  iFindStuff Error                Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 1117, in runConcurrentThread
  File "plugin.py", line 917, in iGeoLocation
<type 'exceptions.TypeError'>: object of type 'float' has no len()

  iFindStuff Error                plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)



then downgraded back to the previous version no errors
Thanks art. I'm doing a stabilise weekend to tighten up on these small errors before adding new features. I'll upload a new version later today.

Mike
artpics
Posts: 232
Joined: Tue Feb 24, 2009 11:48 pm
Location: Calabasas CA
Contact:

Re: iFindstuff Alpha Testing Topic

Post by artpics »

Problem fixed with latest update. :D

Upgrading plugin "iFindStuff" to newer version 0.2.12 (previous version moved to trash)
Loading plugin "iFindStuff 0.2.12"
Starting plugin "iFindStuff 0.2.12" (pid 95580)
Started plugin "iFindStuff 0.2.12"
artpics
Posts: 232
Joined: Tue Feb 24, 2009 11:48 pm
Location: Calabasas CA
Contact:

Re: iFindstuff Alpha Testing Topic

Post by artpics »

no error messages in the log.

Reloading plugin "iFindStuff 0.3.00"
Stopping plugin "iFindStuff 0.3.00" (pid 20229)
Stopped plugin "iFindStuff 0.3.00"
Starting plugin "iFindStuff 0.3.00" (pid 24707)
Started plugin "iFindStuff 0.3.00"


but phone does not update distance, reports wrong battery level seems the only thing that gets reported correctly is the updated time.
Chameleon
Posts: 611
Joined: Sat Oct 04, 2014 9:50 am

Re: iFindstuff Alpha Testing Topic

Post by Chameleon »

Art

Good shout. Actually I had to up load a fix as 0.3.01. You need to download that. One of my debug statements stopped the proper update.

Things move far in alpha world lol

M :)
Chameleon
Posts: 611
Joined: Sat Oct 04, 2014 9:50 am

Re: iFindstuff Alpha Testing Topic

Post by Chameleon »

Impressed that you spotted it before I had the upload in place... 0.3.00 was only online for 10 Mins before 0.3.01 :D

Thanks for your patience

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

Re: iFindstuff Alpha Testing Topic

Post by haavarda »

Hi Mike.
Just to make sure. When I change the variable that controls the update timer from 60 to 1. Will it the start to update every 1 minute right away?
Or will it wait 60 minutes and then start with 1 minute frequency? I was having some slow response when I tested, and just wanted to make sure.

Håvard
Håvard
Chameleon
Posts: 611
Joined: Sat Oct 04, 2014 9:50 am

Re: iFindstuff Alpha Testing Topic

Post by Chameleon »

haavarda wrote:Hi Mike.
Just to make sure. When I change the variable that controls the update timer from 60 to 1. Will it the start to update every 1 minute right away?
Or will it wait 60 minutes and then start with 1 minute frequency? I was having some slow response when I tested, and just wanted to make sure.

Håvard
Havard

The timer is specified in seconds not mins! If you want 1 min you put 60 and hour would be 3600. I have mine set for 600.

Make sure you're using version 0.3.01 as this removed a bug that meant that it was only updating when debug was on.

In answer to the questions - at the moment the timer change will happen at the next refresh. I am looking at this to find a way to interrupt the plugin sleeping between updates and create more immediate responses..

If you're testing you can Reload the plugin from the menu (no need to disable it first). This will cause an immediate update based on the current configuration changes. That often how I switch debugging on by setting the flag in the configuration, saving the config and then reloading the plug to see the effects immediately.

Hope that helps

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

Re: iFindstuff Alpha Testing Topic

Post by kw123 »

replace
self.sleep(iTimer)

at the end of the main loop with:

Code: Select all

startSleep = time.time()
while True
	if self.stopSleep(startSleep): break
	self.sleep(2)
and add:

Code: Select all

def stopSleep(self,startSleep)
    try:  # if variable does not exist take default
    	totalSleep= float(indigo.variables["iFindStuffTimer"].value)
    except:
    	totalSleep= iTimer
    if time.time() - startSleep >  totalSleep:
    	return True
    return False	
then the variable iFindStuffTimer is checked every 2 seconds if it has changeed, but the total sleep time will still be iTimer
checking the variable every 2 seconds does not put any kind of significant load on the system

Karl
Chameleon
Posts: 611
Joined: Sat Oct 04, 2014 9:50 am

Re: iFindstuff Alpha Testing Topic

Post by Chameleon »

kw123 wrote:replace
self.sleep(iTimer)

at the end of the main loop with:

Code: Select all

startSleep = time.time()
while True
	if self.stopSleep(startSleep): break
	self.sleep(2)
and add:

Code: Select all

def stopSleep(self,startSleep)
    try:  # if variable does not exist take default
    	totalSleep= float(indigo.variables["iFindStuffTimer"].value)
    except:
    	totalSleep= iTimer
    if time.time() - startSleep >  totalSleep:
    	return True
    return False	
then the variable iFindStuffTimer is checked every 2 seconds if it has changeed, but the total sleep time will still be iTimer
checking the variable every 2 seconds does not put any kind of significant load on the system

Karl

Good hint - I'll use that. I've worked out how to allow users to set individual updates on individual devices. That coupled with your code is the starting point for dynamic API accessing.

Mike
freshwuzhere
Posts: 117
Joined: Thu Apr 05, 2012 2:52 pm

Re: iFindstuff Alpha Testing Topic

Post by freshwuzhere »

Hi Mike,

Code is looking good - I seem to be having an issue with the Geo Fences.

Running v 0.3.01 on Indigo 6.1.2.

I've made my 27 other devices inactive but left my wife's phone (who is in San Antonio), and mine in San Francisco - I've made a geofence around our San Francisco house - 1 mile - but both phones appear to be in the fence? The distance calculation appears correct. The reference mentioned alongside Geo Distance - is that meant to be the geofence radius?

Anyway - both locations seem to be true - despite one being 2387 miles away.

Also, the "Code failure while attempting to create/update devices - MT" looks a little wonky :D

iFindStuff Geo Details on check: De Haro Home True
iFindStuff Point 1 37.756254,-122.400469 Point 2 29.5266244887,-98.4843215627
iFindStuff Distance Calculated in m (True, 2387.6496924840799)
iFindStuff Geo distance and reference? 2387.64969248 30000.0
iFindStuff Direction of Home = East by south
iFindStuff GeoFence De Haro Home is active
iFindStuff Device iPhone 6 Plus Apple Device:21 is inactive so ignored
iFindStuff Geo Details on check: De Haro Home True
iFindStuff Point 1 37.756254,-122.400469 Point 2 37.7560868673,-122.400565641
iFindStuff Distance Calculated in m (True, 0.020440672560814856)
iFindStuff Geo distance and reference? 0.0204406725608 30000.0
iFindStuff Direction of Home = South-southwest
iFindStuff GeoFence De Haro Home is active
iFindStuff Code failure while attempting to create/update devices - MT
Chameleon
Posts: 611
Joined: Sat Oct 04, 2014 9:50 am

Re: iFindstuff Alpha Testing Topic

Post by Chameleon »

freshwuzhere wrote:Hi Mike,

Code is looking good - I seem to be having an issue with the Geo Fences.

Running v 0.3.01 on Indigo 6.1.2.

I've made my 27 other devices inactive but left my wife's phone (who is in San Antonio), and mine in San Francisco - I've made a geofence around our San Francisco house - 1 mile - but both phones appear to be in the fence? The distance calculation appears correct. The reference mentioned alongside Geo Distance - is that meant to be the geofence radius?

Anyway - both locations seem to be true - despite one being 2387 miles away.

Also, the "Code failure while attempting to create/update devices - MT" looks a little wonky :D

iFindStuff Geo Details on check: De Haro Home True
iFindStuff Point 1 37.756254,-122.400469 Point 2 29.5266244887,-98.4843215627
iFindStuff Distance Calculated in m (True, 2387.6496924840799)
iFindStuff Geo distance and reference? 2387.64969248 30000.0
iFindStuff Direction of Home = East by south
iFindStuff GeoFence De Haro Home is active
iFindStuff Device iPhone 6 Plus Apple Device:21 is inactive so ignored
iFindStuff Geo Details on check: De Haro Home True
iFindStuff Point 1 37.756254,-122.400469 Point 2 37.7560868673,-122.400565641
iFindStuff Distance Calculated in m (True, 0.020440672560814856)
iFindStuff Geo distance and reference? 0.0204406725608 30000.0
iFindStuff Direction of Home = South-southwest
iFindStuff GeoFence De Haro Home is active
iFindStuff Code failure while attempting to create/update devices - MT

The calculation looks good. I need to see the current states against the two phones and the Geofences impacted.

A phone is calculated to be 'near' simply by being the nearest given GeoFence. e.g. if I had a GeoFence in New York with a range of 1km and inactived all of my GeoFences in the UK then iFindStuff would report me as being 'Near' New York. However, I would not be in GeoRance (e.g. No of Devices in Range of New York would only be 1).
  • First you shpuld check on the GeoFences to see how many devices are a) Near, b) In Range and c) In Nest Range. In range is the state displayed in the GeoFence Column.
    (you can see the states on any device by extending the lower half of the display to reveal them by dragging the top of the grey box upwards into the while device list area)

    Second - Check each device and see what the deviceNearstGeoName is and if the deviceInGeoRange for that device is true

    Third - Create a GeoFence in the location where your wife is with a small range. - The results should see her Near the New GeoFence but not in range. Now extend the Range until it includes where your wife's phone. Now it should say it's in range and the Nearest GeoFence is the one you created.
If you want an immediate calculation then 'Reload; the plugin after each change and it will recalculate the details automatically within 30 seconds.

Let me see how it's going.

Mike
freshwuzhere
Posts: 117
Joined: Thu Apr 05, 2012 2:52 pm

Re: iFindstuff Alpha Testing Topic

Post by freshwuzhere »

Here are some screenshots - I zipped them as I think there is a lot of phone information that may not be wise to publish.
Let me know if you want more info - it definitely appears that code thinks both phones are in the geofence - if I'm understanding correctly.
artpics
Posts: 232
Joined: Tue Feb 24, 2009 11:48 pm
Location: Calabasas CA
Contact:

Re: iFindstuff Alpha Testing Topic

Post by artpics »

i am still seeing deviceinNestRange as true no matter where i go even when i enter a new geofence.

i also do not get my trigger working (email/message) when i leave my homeGeofence.

i have set up 2 schedules to change the timer no need to check every 5 mins when i am asleep :)
Locked

Return to “iFindStuff”