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 »

1. yes the plugin updates the parameter file (and pgms, ignore lists etc) once an hour
2. you could try : loopMaxCallBLE=30 in the parameter file (or in plugin/pibeacon/config set "# of loops before rPi will send data" to 30 from 900)

that might fix the alive file not being updated. It spends too much time collecting data before the files gets refreshed with a new timestamp.

But I will think about how to avoid this situation.

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 »

found a bug!!
if t - timeAtLoopStart > sendAfterSeconds: break # send curl msgs after collecting for xx seconds
should be
if t1 - timeAtLoopStart > sendAfterSeconds: break # send curl msgs after collecting for xx seconds

it is not checking the time, but only the number of messages collected!!


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 »

WouterK:

posted v 1.5.4. should be fixed.

But you could change "# of loops before rPi will send data" to 30 from 900 for a faster response if you have few BLE devices .


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

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Hi,

Great! Downloaded the new version and installed it.
I adjusted the # of loops to 30. Send the config and restarted both rPi's.
Get both rPi's to see the iBeacon and then let one rPi not see any iBeacons.

On the rPi without any ibeacons the alive file stops getting updated and this rPi reboots after 6 min. (sorry)

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 push the new files again to the rips then do another reboot:

menu/pibeacon/"send config or restart" select configure and restart

then check if

Code: Select all

        for ii in range(loopMaxCallBLE):
            t=time.time()
            if reason >1: break
            if t - timeAtLoopStart  > sendAfterSeconds: break # send curl msgs after collecting for xx seconds
is in the file beacon loop.py

also check if the alive file is not updated..


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 »

if this does not result in anything I guess I need to put one of my rips into a metal box and try to not receive any BLE signals.
yassi
Posts: 498
Joined: Sun Sep 06, 2015 7:14 am
Location: Germany

Re: piBeacon: presence monitoring plugin discussions

Post by yassi »

Karl,

I have this error after starting the new plugin (1.5.4) - see attachment.
Something is missing.

yassi

N.B. And in the meantime another error too (the pi is online).Will send you tomorrow an email.
Attachments
Bildschirmfoto 2016-01-28 um 20.01.24.png
Bildschirmfoto 2016-01-28 um 20.01.24.png (38.73 KiB) Viewed 4844 times
Bildschirmfoto 2016-01-28 um 19.32.57.png
Bildschirmfoto 2016-01-28 um 19.32.57.png (18.16 KiB) Viewed 4896 times
Last edited by yassi on Thu Jan 28, 2016 1:03 pm, edited 1 time in total.
WouterK
Posts: 167
Joined: Wed Aug 19, 2015 3:07 am

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Hi,

I attached a part of the py-script and as far as I can see it has the modification.
After booting the rPi, which does not see any iBeacons, the alive file is not updated. I am sorry but after 6 mins it reboots.

If there is anything else I can do,let me know.

Wouter
Attachments
code.txt
(638 Bytes) Downloaded 176 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 »

ok =you have the updated .py file.

I am trying to not receive any BLE signals. but can only reduce to ~ 1/second..

switched off everything and put the rip into a metal pot sealed with aluminum foil. still receives BLE signals
WouterK
Posts: 167
Joined: Wed Aug 19, 2015 3:07 am

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

:o

Can't you put it outside :D The one igiving me the trouble is in the garage which is detached from the house.

Is it necessary to reboot? What I noticed is after many reboots I had to reinstall the image on the sdcard. For some reason it did not boot anymore after the many reboots.
Can it be an option?

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 »

Sure I could disable the boot. But a soft boot should not do anything. It will run into troubles if the ssd is bad.

Outside is not an option. I have cars drink by and in the back there a ble emitters in some garages across the alley way.


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 »

If you want to switch off the reboot change the reboot option in config to never
Then the beacon loop will not reboot on its own. only when it things it hangs.


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 »

If I understand it correctly the rPi is rebooted based on the timestamp of the alive file?
In my case the ping pinged without problems until the reboot.
But the alive file is not updated even if there is communication with the host but as a result of not seeing any beacons.

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 »

reasons to reboot:

1. in config there is a parameter: reboot after xx hours .. default is 1 day

2. reboot if alive file is not updated after xx minutes
3. reboot if ping does not work


alive is updated everytime after loop when delta time > 1 minute
loop is max xx seconds or nn loop count.


# 1 you can set to never in config

# 2 and 3 I am working on.

have put the rpi into a metal box and it is still receiving BLE signals!!


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

Re: piBeacon: presence monitoring plugin discussions

Post by WouterK »

Great reception or strong signal!
Most of the time you want it this way.........

Sorry I cannot help stopping the ble signals.

Wouter
Post Reply

Return to “piBeacon”