piBeacon: presence monitoring plugin discussions

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

Re: piBeacon: presence monitoring plugin discussions

Post by kw123 »

There a literally beacons driving by your house ( in cars ) and the pi is picking them up.
Now the error message is a problem. I am out of town until Tuesday next week. But will try to check remotely.


Sent from my iPhone using Tapatalk
ac4lt
Posts: 74
Joined: Sun Sep 20, 2015 9:03 am

Re: piBeacon: presence monitoring plugin discussions

Post by ac4lt »

Thanks for the reply! There's no rush at my end as first beacon hasn't arrived yet. If there is anything you need from me let me know.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: presence monitoring plugin discussions

Post by kw123 »

Question to Matt and or Jay.

in Line '1316' has error=''key address not found in dict''
how can a device of a plugin not have the key "address" i.e.:

Code: Select all

for dev in indigo.devices.iter("com.karlwachs.piBeacon"): 
  props= dev.pluginProps   
  if props["address"] == piMACSend:  ##< throws an error
created by:

Code: Select all

                    indigo.device.create(
                        protocol=indigo.kProtocol.Plugin,
                        address=piMACSend,
                        name="Pi-"+piMACSend,
                        description="Pi-"+piNReceived,
                        pluginId="com.karlwachs.piBeacon",
                        deviceTypeId="rPI",
                        folder=self.piFolderId)
any advice welcome!

Karl
User avatar
berkinet
Posts: 3441
Joined: Tue Nov 18, 2008 2:08 pm
Location: Berkeley, CA, USA & Mougins, France

Re: piBeacon: presence monitoring plugin discussions

Post by berkinet »

kw123 wrote:The iphone does not send ibeacon signals ...

Actually... There are apps that can function as a beacon. Whether it is useful to leave these functions running is questionable. Battery usage could easily be an issue.
In any case, here are a couple of apps that may be worth exploring. I am sure there are more
  • Locate from Radius Networks
  • Estimote from Estimote
Also, here is an article on How to Configure your iPhone as an iBeacon Transmitter (requires Xcode).
User avatar
berkinet
Posts: 3441
Joined: Tue Nov 18, 2008 2:08 pm
Location: Berkeley, CA, USA & Mougins, France

Re: piBeacon: presence monitoring plugin discussions

Post by berkinet »

I wrote:...Also, here is an article on How to Configure your iPhone as an iBeacon Transmitter (requires Xcode).

It works, with one small change. In GemTotSDK.xcodeproj/project.pbxproj I had to change
  • PRODUCT_BUNDLE_IDENTIFIER = com.gemtot.iBeacon
to something else. I chose
  • PRODUCT_BUNDLE_IDENTIFIER = com.berkinet.iBeacon
There were a few error messages but Xcode was able to fix everything on its own.

I now have GemTotforiOS on my phone.

BTW, the project is also available from: https://github.com/gemtot/iBeacon
It is not clear if they plan on updating this for iOS 9, but it seems to run just fine.

CAVEAT: I have not tried this with anything. YMMV significantly.

And, vielen Dank Karl for your work on this and a plethora of other great contributions.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: presence monitoring plugin discussions

Post by kw123 »

That's pretty cool! Will try it when I am not back home.

Just one question regarding viruses - I never compiled / developed anything for the iPhone : is this kosher ? I am somewhat suspicious about programs / drivers from China and Russia etc. is this the complete source code or are there any pre compiled program snippets ?



Sent from my iPhone using Tapatalk
User avatar
haavarda
Posts: 702
Joined: Sat Aug 18, 2012 4:40 am
Location: Norway

Re: piBeacon: presence monitoring plugin discussions

Post by haavarda »

That would indeed be very interesting! But I share Karl's skepticism.
Håvard
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: presence monitoring plugin discussions

Post by kw123 »

Just to clarify. I am a glass is half empty guy. Did not want to put it down. I will definitely try it. I always wanted to get into iPhone programming may this is a good starting point.


Sent from my iPhone using Tapatalk
ac4lt
Posts: 74
Joined: Sun Sep 20, 2015 9:03 am

Re: piBeacon: presence monitoring plugin discussions

Post by ac4lt »

Karl,

I woke up this morning to this popping up in the log this morning. It wasn't happening when I went to bed last night.

Code: Select all

  piBeacon Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 979, in runConcurrentThread
  File "plugin.py", line 966, in initCuncurrentThread
<type 'exceptions.KeyError'>: key address not found in dict
For now I've disabled the plugin. Re-enabling it puts it back in the same state so I've left it disabled for now. Is there a way to nuke the existing plugin configuration and start over from scratch? I can try that unless you'd like me to leave it in this state to help you debug.
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: presence monitoring plugin discussions

Post by kw123 »

To reset it:
Disable plugin
Delete folder ~/documents/pibeacon
Delete pibeacon devices created
That should do it.
But yes I would like to understand why this problem occurs in the first place.
Could you give me a day? I want to add some debug statements around that line of code.


Sent from my iPhone using Tapatalk
ac4lt
Posts: 74
Joined: Sun Sep 20, 2015 9:03 am

Re: piBeacon: presence monitoring plugin discussions

Post by ac4lt »

No problem at all. There is not rush at my end. I'm happy to help you investigate what's happening.
User avatar
haavarda
Posts: 702
Joined: Sat Aug 18, 2012 4:40 am
Location: Norway

Re: piBeacon: presence monitoring plugin discussions

Post by haavarda »

Is there anyone that have experienced if it is possible to use a pebble or a Fitbit as beacon? These are detectable ble devices so...?
Håvard
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: presence monitoring plugin discussions

Post by kw123 »

ac4lt:
could you try this version. the only addition is a debug statement: https://www.dropbox.com/s/f87qjkextaxnx ... 2.zip?dl=1 (debug will be removed in a formal release)
and post the log file output
Thanks for your help.
Karl
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: presence monitoring plugin discussions

Post by kw123 »

berkinet:
Just one question regarding viruses - I never compiled / developed anything for the iPhone : is this kosher ? I am somewhat suspicious about programs / drivers from China and Russia etc. is this the complete source code or are there any pre compiled program snippets ?
looking at the posted swift code: it seems as if there is no attached library with compile code. looks like it is all open source code..

Karl
ac4lt
Posts: 74
Joined: Sun Sep 20, 2015 9:03 am

Re: piBeacon: presence monitoring plugin discussions

Post by ac4lt »

Karl,

I grabbed your updated plugin but all I'm getting is this (same as it was when I woke up this morning):

Code: Select all

  piBeacon Error                  Error in plugin execution runConcurrentThread:

Traceback (most recent call last):
  File "plugin.py", line 979, in runConcurrentThread
  File "plugin.py", line 966, in initCuncurrentThread
<type 'exceptions.KeyError'>: key address not found in dict

  piBeacon Error                  plugin runConcurrentThread function returned or failed (will attempt again in 10 seconds)
Post Reply

Return to “piBeacon”