piBeacon: presence monitoring plugin discussions

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

piBeacon: presence monitoring plugin discussions

Post by kw123 »

Yes. It should be. It is testing the gpio pins every 0.1 seconds but only for those that are enabled. If none is enabled the load should be roughly the same. May be a bit higher but not a lot.
I tried the event feature for the gpio pins on the rpis but that is not stable.
I have not seen any impact on the ibeacon response time.
Ps how did you measure the load?


Sent from my iPhone using Tapatalk
WouterK
Posts: 167
Joined: Wed Aug 19, 2015 3:07 am

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Hi,

I am not using the extra functionality, only the pibeacon one.
The previous numbers were from "top"
These are the numbers now from uptime : 14:32:58 up 7:05, 1 user, load average: 1.14, 0.93, 0.86

As for reaction time I haven't noticed anything difference, but I am still testing with only one iBeacon :?
It seems though that the Pi is busy.

Is it possible to make it an option to make use of the GPIO functionality?

Wouter
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 »

If none is enabled the sensor part should not be active. But I will double check.


Sent from my iPhone using Tapatalk
WouterK
Posts: 167
Joined: Wed Aug 19, 2015 3:07 am

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Hi,

Do not know if it will help but it seems that there are several (5) python processes running every 20sec or so.

Wouter
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 got up and tested my rPis (with > 12 iBeacons):

with no sensor enabled it uses 2-5% depending on how many iBeacons are around( 5% when I put all 12+ of them next to one rPI)

with all GPIO input pins enabled: 3-6%

with the D18B20 onewire it uses 5-30% CPU

with DTH22 it uses 5 - 30%

with i2c temp/pressure BMP280 is uses 5-30%


the temp sensors measure every ~20 seconds. I could reduce that to 1/minutes .. temperatures do not change that often..


I do not see any impact from the GPIO input pins


but again, I do not see any impact on the iBeacon response time.

there are the following processes active:

1. the starter program (callbeacon.py) that controls all others. It wakes up every 30 seconds and test if everything is in order
2. the iBeacon program (beaconloop.py) polls the BLUEZ system continuously
3. the sensor.py (only starts when you have ANY sensor or ANY GPIO input pin enabled) sleeps for 0.1 or 20 seconds depending on GPIO settings
4. for DHT.py and D18B20.py each has a program that checks the sensors every 15-20 seconds (only if enabled)
5. for GPIO output receiveGPIOcommands.py listens to incoming requests to change a GPIO output pin. that essentially sleeps all the time

the w1_bus_master sub-process uses most of the sensor cpu time when sensors are polled.

I do not think that these numbers are an issue for the rPIs

Karl
WouterK
Posts: 167
Joined: Wed Aug 19, 2015 3:07 am

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Hi,

Thanks for the explanation. I also saw that the w1_bus_master sub-process is one of the processes that takes much of the processor time.
I also haven't noticed any impact on the response time of the rPi, but it seems it is more busy even though it is not using any sensors or GPIO.

The only thing I noticed that when having a ssh session the cursor is not reacting from time to time, that's all :D

Wouter
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 »

And thanks for your input. If you see any problems let me know.


Sent from my iPhone using Tapatalk
polycron
Posts: 100
Joined: Sun Jan 08, 2006 10:22 am

Re: piBeacon: presence monitoring plugin discussions

Post by polycron »

Karl,

I had an issue the other day where one of my beacons was moved to the ignore list and the device was deleted from Indigo. I had to reset a number of my triggers. I've since reset the time of no messages to 2 days. I was wondering if there was a way to flag a beacon as permanent so it would ignore this. I'd like to set the time back down to 1 day or even lower but am afraid if I am gone for the weekend it will delete my permanent beacon again.

Jeff
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 »

Jeff,

yes: you must rename the beacon within ONE hour after its is created.

If it goes down for > 1 hour and it still has the same name it will be deleted.

reason: I have ~ 25 new iBeacons walking / driving by my house every day. Without that I would need to do much more maintenance (i am at 500 ignored beacons right now)

so just rename your beacons (and rPis) to something meaning full like b-Blue-xy or b-moms beacon or b-fiat-carkeys (*) beacon ..

all of mine look like: b-use-beacontype (b for beacon)


hope that helps


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

piBeacon: presence monitoring plugin discussions

Post by kw123 »

Actually it's not forgotten but put onto the ignore list

So when you start with the system you will switch on an ibeacon and should see a device created immediately. Then it should be good practice to give it a meaningful name not just keep the cryptic name beacon-macnumber

It is good to identify YOUR ibeacons compared to the noise of outside stuff


Sent from my iPhone using Tapatalk
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 »

correction: I am now at 1857 ignored iBeacons (after 50 days) that walked or drove by my house... with # of iBeacon messages received between 1 and 90,000 each (must be my neighbor)

.. thats why I really want to have the automatic ignore feature.. and you will get a warning message in the log file that a beacon is moved to the ignore list and that you should rename them if you want to keep it.



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 »

A new version 1.10.1 http://forums.indigodomo.com/viewtopic. ... 87&t=15152 has been posted
Sensors configuration "how to" have been updated http://forums.indigodomo.com/viewtopic. ... 87&t=15563
SSD download - install "how to" have been updatedhttp://forums.indigodomo.com/viewtopic. ... 87&t=15482

The whole topic with all threads is under :http://forums.indigodomo.com/viewforum.php?f=187

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 »

I have to many temp sensor... does anyone need a Onewire waterproof D18B20(-55°C to +125°C), have 2 spares (I have in total 13 temp sensors.. that is plenty)
if you donate something to e.g. the refugees in Europe or the charity of your choice I will send you (sorry only in the USA) 2 sensors prewired with connector, resistor .. ready for the piBeacon

Karl
Attachments
Screen Shot 2016-02-14 at 11.10.19 PM.png
Screen Shot 2016-02-14 at 11.10.19 PM.png (99.8 KiB) Viewed 3251 times
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 »

How long does this take? I don't see any devices yet. Will piBeacon create a folder for all the devices?
Edmond
1 minute if it everything is good.
have you setup the rip with ip # etc in the menu as well as the mac ip number etc in config?

if yes:
1.do ping ip# of rip.
if ok:
ssh pi@ip# enter yes and password

do
ps -ef | grep python
ls
post both

Karl
dnomode
Posts: 363
Joined: Sat Apr 12, 2008 11:48 pm
Location: North Georgia

Re: piBeacon: presence monitoring plugin discussions

Post by dnomode »

Hello Karl,

I did set them up. Here is what I got.

Thanks for your help
Edmond

Code: Select all

pi@raspberrypi:~ $ ps -ef | grep python
root       564     1  0 04:52 ?        00:00:00 sudo python /home/pi/callbeacon.py
root       618   564  0 04:52 ?        00:00:00 python /home/pi/callbeacon.py
root       620     1  0 04:52 ?        00:00:06 /usr/bin/python /home/pi/beaconloop.py
pi       18723 18710  0 06:35 pts/0    00:00:00 grep --color=auto python
pi@raspberrypi:~ $ ls 
alive                   callbeacon.py  interface.py  Pictures
beaconloop.py           call-log       interfaces    Public
beaconsExistingHistory  Desktop        logfile       python_games
bluez                   Documents      Music         Templates
bluez-5.37              Downloads      parameters    Videos
bluez-5.37.tar          errlog         pi            wpa_supplicant.conf
pi@raspberrypi:~ $ 
Image
Image
Post Reply

Return to “piBeacon”