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 »

I know it's a bug. Will post a fix today.


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 »

WouterK wrote:Hi,

- For some reason the one ibeacon gets in the ignorelist. After selecting it to be used it's active for some time but is placed in the ignorelist again.

- One Pi (in the garage) is rebooting it self after 5 min. Is this beacuse, if the plugin sees no ibeacon, it does not send anything and the pi is rebooted?

Using plugin version 1.5.2

Wouter
I'm seeing a similar thing with 1.5.2:

The beacons are rapidly moving to the ignore list. Worse, the devices are getting deleted taking any triggers along with them.
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 »

The move to the ignore list should be fixed with 1.5.3 (*)
One Pi (in the garage) is rebooting it self after 5 min. Is this beacuse, if the plugin sees no ibeacon, it does not send anything and the pi is rebooted?
The reboot only happens if the pi can not ping the mac.

Karl

(*) this was a test to see if anyone is using the plugin.. :oops:
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 not tested if a rPi is not seeing any beacons. I have too many.


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,

Thanks for the quick update! I just installed it. You must be glad to see that the plugin is being used. :lol:

The distance between the two rPi's is a bit far. Yesterday I had both rPi's in one room and both where stable without rebooting.
The one in the garage is not "seeing" the ibeacon so I thought that could be the cause of the reboots.

I will check the communication with the Mac and let you know.


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 ping the rPi from your MAC. If that works it should be ok. If it still reboots we need to understand why:

you could do in a terminal window
ssh pi@ipnumber enter password
then
cat parameters

if the IP number of the mac is wrong in that file, that would explain it, but it should have not changed by moving the rPi

you could change the debug level to 2 in the file (eiher in plugin config and send update to THAT pi only ) or
nano parameters
change debug from 0 to 2
and ctrl-o to save and ctrl-x to exit. then
sudo reboot

after boot do ssh again and do
tail logfile
tail errlog

check if there are any error message or the there is any traffic going on.

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

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Hi,

Ping is working fine until it reboots. That goes well.
So the next step is to do what you described below. As soon I have some results I will let you know.
It is raining cats and dogs over here so a trip to the garage ........

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

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Hi,

I did the test again with logging enabled and tailing the logfile and errlog. Both attached.
After booting the rPi I waited for the rPi to notice the iBeacon. After that I went away from the rPi. After about 6 mins the rPi reboots.
The error log is empty.

Wouter
Attachments
Logfile at 20.42.51.png
Logfile at 20.42.51.png (178.1 KiB) Viewed 4991 times
Ping at 20.43.18.png
Ping at 20.43.18.png (141.76 KiB) Viewed 4991 times
errlog at 20.43.11.png
errlog at 20.43.11.png (85.49 KiB) Viewed 4991 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 »

the log print out looks normal,

why does the ping stop( timeout...)? is this when the rPi reboots?

could you next time do:

ssh pi@ ..

ps -ef | grep beacon

sudo kill -9 thePID in the line with callbeacon(*)
sudo kill -9 thePID in the line with beaconloop

then
sudo python beaconloop.py &

let it run , check the terminal output.. it should not reboot!! the pgm call beacon.py initiates the boot.

do an ls -l once a while and check for the file "alive" if it changes timestamp
do a ping to your mac, check if that works

if your get Ping: icmp open socket: Operation not permitted your authorization is screwy
do and ls -l 'whois ping
and if that is not correct ( not = -rwsr-xr-x 1 root root 30856 2007-07-06 02:40 /bin/ping) do an
sudo chmod u+s `which ping` ( see: http://ubuntuforums.org/showthread.php?t=927709)

if it does not reboot:
1. ping does not work
2. beacon loop does not refresh the file alive

if it reboots, I have no clue why..


Karl


ps -ef | .. would give you something like this, use 2322 and 2332 in the kill lines

root 2188 1 0 14:47 ? 00:00:09 /usr/sbin/afpd -U uams_dhx2.so,uams_clrtxt.so -g nobody -c 50 -n pibeacon
avahi 2230 1 0 14:47 ? 00:00:00 avahi-daemon: running [pibeacon.local]
root 2322 1 0 14:47 ? 00:00:00 python /home/pi/callbeacon.py
root 2332 1 5 14:47 ? 00:01:04 /usr/bin/python /home/pi/beaconloop.py
pi 2550 2400 0 15:06 pts/0 00:00:00 grep --color=auto beacon

so here it would be:
sudo kill -9 2322
sudo kill -9 2332
WouterK
Posts: 167
Joined: Wed Aug 19, 2015 3:07 am

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Hi,

I did some testing. After the last device disconnects the file "alive" does not get updated anymore, the logging stops, no errors on the errlog.
During this period ping is running without errors.
If an bluetooth device is detected the file "alive" is updated again.

Hope this helps.

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 »

ok, that helps, will check the code..

must be that the BLUEZ call gets stuck waiting for any signal.

could you set debug to 4 and run the sudo python beacon loop.py again.

then check log file

thanks

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

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Hi,

Have it running now. Should I look for something specific?
The screen in which I started the loop is giving lots of info now. Do not see a difference in the logfile (but maybe I am not seeing it ;-)

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 »

could you post some of the lines you see on the screen.. you can kill the beaconloop.py

I will be out for 2 hours -- going swimming

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

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Will do. Have a nice swim.....

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

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Hi,

I attached a file with the logging.
With debug mode on level 4 the alive file was being updated so I am not sure the logging is what you wanted.
Does the parameter-file get updates by the plugin? After altering the debug mode it went back to zero several times


Wouter
Attachments
iBeacon.zip.txt
(1.68 KiB) Downloaded 172 times
Post Reply

Return to “piBeacon”