piBeacon: presence monitoring plugin discussions

Posted on
Thu Jun 15, 2017 1:20 pm
siclark offline
Posts: 1964
Joined: Jun 13, 2017
Location: UK

Re: piBeacon: presence monitoring plugin discussions

printing dev info for Simon Iphone BLE/1428643960 -------------------------------
props:
com.karlwachs.piBeacon : (dict)
BLEtimeout : 10 (string)
MSG : OK (string)
address : BC:54:36:1E:68:B2 (string)
beaconTxPower : 20 (string)
description : on rPi 0, 1, (string)
displayS : status (string)
expirationTime : 180 (string)
iPhoneRefreshDownSecs : 10 (string)
iPhoneRefreshUpSecs : 180 (string)
macAddress : BC:54:36:1E:68:B2 (string)
rPiEnable0 : true (bool)
rPiEnable1 : true (bool)
rPiEnable2 : false (bool)
rPiEnable3 : false (bool)
rPiEnable4 : false (bool)
rPiEnable5 : false (bool)
rPiEnable6 : false (bool)
rPiEnable7 : false (bool)
rPiEnable8 : false (bool)
rPiEnable9 : false (bool)
retryIfUP : true (string)
states:
States : (dict)
Pi_0_Distance : 4.5 (real)
Pi_0_Signal : -1 (integer)
Pi_0_Time : 2017-06-15 20:16:28 (string)
Pi_1_Distance : 0 (integer)
Pi_1_Signal : 0 (integer)
Pi_1_Time : (string)
Pi_2_Distance : 0 (integer)
Pi_2_Signal : 0 (integer)
Pi_2_Time : (string)
Pi_3_Distance : 0 (integer)
Pi_3_Signal : 0 (integer)
Pi_3_Time : (string)
Pi_4_Distance : 0 (integer)
Pi_4_Signal : 0 (integer)
Pi_4_Time : (string)
Pi_5_Distance : 0 (integer)
Pi_5_Signal : 0 (integer)
Pi_5_Time : (string)
Pi_6_Distance : 0 (integer)
Pi_6_Signal : 0 (integer)
Pi_6_Time : (string)
Pi_7_Distance : 0 (integer)
Pi_7_Signal : 0 (integer)
Pi_7_Time : (string)
Pi_8_Distance : 0 (integer)
Pi_8_Signal : 0 (integer)
Pi_8_Time : (string)
Pi_9_Distance : 0 (integer)
Pi_9_Signal : 0 (integer)
Pi_9_Time : (string)
PosX : 0 (integer)
PosY : 0 (integer)
PosZ : 0 (integer)
TxPowerReceived : 12 (real)
TxPowerSet : 20 (integer)
created : 2017-06-14 19:20:59 (string)
lastUp : 2017-06-15 20:16:28 (string)
status : up (string)
description: on rPi 0, 1,
address: BC:54:36:1E:68:B2
deviceTypeId: BLEconnect
enabled: True
model: BLE-connect
RPI info:
{
"enableRebootCheck": "restartLoop,-",
"enableSPIpinsAsGpio": "0",
"enableTXpinsAsGpio": "0",
"enableiBeacons": "1",
"input": {
"BLEconnect": {
"1428643960": "BC:54:36:1E:68:B2",
"1871373428": "A4:67:06:36:7C:92"
}
},
"ipNumberPi": "192.168.0.23",
"ipNumberPiSendTo": "192.168.0.23",
"output": {},
"passwordPi": "xxxxxxxxxx",
"piDevId": 1844683415,
"piMAC": "B8:27:EB:32:D2:3B",
"piNumberReceived": "0",
"piOnOff": "1",
"piUpToDate": [],
"rPiVersion": 0,
"sensorList": "BLEconnect*1871373428,BLEconnect*1428643960,",
"sensorRefreshSecs": "90.0",
"userIdPi": "pi"
}
RPI info:
{
"enableRebootCheck": "restartLoop",
"enableSPIpinsAsGpio": "0",
"enableTXpinsAsGpio": "0",
"enableiBeacons": "1",
"input": {
"BLEconnect": {
"1428643960": "BC:54:36:1E:68:B2",
"1871373428": "A4:67:06:36:7C:92"
}
},
"ipNumberPi": "",
"ipNumberPiSendTo": "",
"output": {},
"passwordPi": "raspberry",
"piDevId": 0,
"piMAC": "",
"piNumberReceived": "",
"piOnOff": "0",
"piUpToDate": [],
"rPiVersion": 0,
"sensorList": "BLEconnect*1871373428,BLEconnect*1428643960,",
"sensorRefreshSecs": "90.0",
"userIdPi": "pi"
}
RPI info:
{
"enableRebootCheck": "restartLoop",
"enableSPIpinsAsGpio": "0",
"enableTXpinsAsGpio": "0",
"enableiBeacons": "1",
"input": {
"BLEconnect": {
"1871373428": "A4:67:06:36:7C:92"
}
},
"ipNumberPi": "",
"ipNumberPiSendTo": "",
"output": {},
"passwordPi": "raspberry",
"piDevId": 0,
"piMAC": "",
"piNumberReceived": "",
"piOnOff": "0",
"piUpToDate": [],
"rPiVersion": 0,
"sensorList": "BLEconnect*1871373428,",
"sensorRefreshSecs": "90.0",
"userIdPi": "pi"
}
RPI info:
{
"enableRebootCheck": "restartLoop",
"enableSPIpinsAsGpio": "0",
"enableTXpinsAsGpio": "0",
"enableiBeacons": "1",
"input": {},
"ipNumberPi": "",
"ipNumberPiSendTo": "",
"output": {},
"passwordPi": "raspberry",
"piDevId": 0,
"piMAC": "",
"piNumberReceived": "",
"piOnOff": "0",
"piUpToDate": [],
"rPiVersion": 0,
"sensorList": "",
"sensorRefreshSecs": "90.0",
"userIdPi": "pi"
}
RPI info:
{
"enableRebootCheck": "restartLoop",
"enableSPIpinsAsGpio": "0",
"enableTXpinsAsGpio": "0",
"enableiBeacons": "1",
"input": {},
"ipNumberPi": "",
"ipNumberPiSendTo": "",
"output": {},
"passwordPi": "raspberry",
"piDevId": 0,
"piMAC": "",
"piNumberReceived": "",
"piOnOff": "0",
"piUpToDate": [],
"rPiVersion": 0,
"sensorList": "",
"sensorRefreshSecs": "90.0",
"userIdPi": "pi"
}
RPI info:
{
"enableRebootCheck": "restartLoop",
"enableSPIpinsAsGpio": "0",
"enableTXpinsAsGpio": "0",
"enableiBeacons": "1",
"input": {},
"ipNumberPi": "",
"ipNumberPiSendTo": "",
"output": {},
"passwordPi": "raspberry",
"piDevId": 0,
"piMAC": "",
"piNumberReceived": "",
"piOnOff": "0",
"piUpToDate": [],
"rPiVersion": 0,
"sensorList": "",
"sensorRefreshSecs": "90.0",
"userIdPi": "pi"
}
RPI info:
{
"enableRebootCheck": "restartLoop",
"enableSPIpinsAsGpio": "0",
"enableTXpinsAsGpio": "0",
"enableiBeacons": "1",
"input": {},
"ipNumberPi": "",
"ipNumberPiSendTo": "",
"output": {},
"passwordPi": "raspberry",
"piDevId": 0,
"piMAC": "",
"piNumberReceived": "",
"piOnOff": "0",
"piUpToDate": [],
"rPiVersion": 0,
"sensorList": "",
"sensorRefreshSecs": "90.0",
"userIdPi": "pi"
}
RPI info:
{
"enableRebootCheck": "restartLoop",
"enableSPIpinsAsGpio": "0",
"enableTXpinsAsGpio": "0",
"enableiBeacons": "1",
"input": {},
"ipNumberPi": "",
"ipNumberPiSendTo": "",
"output": {},
"passwordPi": "raspberry",
"piDevId": 0,
"piMAC": "",
"piNumberReceived": "",
"piOnOff": "0",
"piUpToDate": [],
"rPiVersion": 0,
"sensorList": "",
"sensorRefreshSecs": "90.0",
"userIdPi": "pi"
}
RPI info:
{
"enableRebootCheck": "restartLoop",
"enableSPIpinsAsGpio": "0",
"enableTXpinsAsGpio": "0",
"enableiBeacons": "1",
"input": {},
"ipNumberPi": "",
"ipNumberPiSendTo": "",
"output": {},
"passwordPi": "raspberry",
"piDevId": 0,
"piMAC": "",
"piNumberReceived": "",
"piOnOff": "0",
"piUpToDate": [],
"rPiVersion": 0,
"sensorList": "",
"sensorRefreshSecs": "90.0",
"userIdPi": "pi"
}
RPI info:
{
"enableRebootCheck": "restartLoop",
"enableSPIpinsAsGpio": "0",
"enableTXpinsAsGpio": "0",
"enableiBeacons": "1",
"input": {},
"ipNumberPi": "",
"ipNumberPiSendTo": "",
"output": {},
"passwordPi": "raspberry",
"piDevId": 0,
"piMAC": "",
"piNumberReceived": "",
"piOnOff": "0",
"piUpToDate": [],
"rPiVersion": 0,
"sensorList": "",
"sensorRefreshSecs": "90.0",
"userIdPi": "pi"
}

Posted on
Thu Jun 15, 2017 1:47 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

looks ok,
could you set in config:
BLEconnect debug to high
then
ssh pi@ipnumber password

type:
Code: Select all
tail -f /run/user/1000/pibeacon/BLEconnect.log


you should see something like:
Code: Select all

20170615-14:42:31 timeout -s SIGINT 3s hcitool cc 18:65:90:6A:B9:0D; hcitool rssi 18:65:90:6A:B9:0D; hcitool tpl 18:65:90:6A:B9:0D
20170615-14:42:31 18:65:90:6A:B9:0D  1. try ret: RSSI return value: 0
Current transmit power level: 3 --- err>>Can't create connection: Input/output error<<
20170615-14:42:31 msg: ['/usr/bin/curl', '-u', u'karlwachs:457654aA.mac', '--digest', '-X', 'PUT', '-d', 'value={"pi":"0","sensors":{"BLEconnect":{"65802248":{"18:65:90:6A:B9:0D":{"txPower":3,"signal":0}}}},"program":"BLEconnect","ipAddress":"192.168.1.20","ts":"1497555751=CDT"}', u'http://192.168.1.10:8176/variables/pi_IN_0']

20170615-14:41:36 timeout -s SIGINT 3s hcitool cc FC:E9:98:49:BB:E9; hcitool rssi FC:E9:98:49:BB:E9; hcitool tpl FC:E9:98:49:BB:E9
20170615-14:41:36 FC:E9:98:49:BB:E9  1. try ret:  --- err>>Read RSSI failed: Input/output error
HCI read transmit power level request failed: Input/output error<<
20170615-14:41:36 msg: ['/usr/bin/curl', '-u', u'karlwachs:457654aA.mac', '--digest', '-X', 'PUT', '-d', 'value={"pi":"0","sensors":{"BLEconnect":{"142616409":{"FC:E9:98:49:BB:E9":{"txPower":-999,"signal":-999}}}},"program":"BLEconnect","ipAddress":"192.168.1.20","ts":"1497555696=CDT"}', u'http://192.168.1.10:8176/variables/pi_IN_0']

20170615-14:41:38 timeout -s SIGINT 3s hcitool cc FC:E9:98:49:BB:E9; hcitool rssi FC:E9:98:49:BB:E9; hcitool tpl FC:E9:98:49:BB:E9
20170615-14:41:38 FC:E9:98:49:BB:E9  1. try ret:  --- err>>Can't create connection: Input/output error
Read RSSI failed: Input/output error
HCI read transmit power level request failed: Input/output error<<
20170615-14:41:46 timeout -s SIGINT 3s hcitool cc FC:E9:98:49:BB:E9; hcitool rssi FC:E9:98:49:BB:E9; hcitool tpl FC:E9:98:49:BB:E9
20170615-14:41:46 FC:E9:98:49:BB:E9  1. try ret:  --- err>>Can't create connection: Connection timed out
Read RSSI failed: Input/output error

I have 2 iphones on BLEconnect, one is up(18:65:90:6A:B9:0D) the other has BLE off (FC:E9:98:49:BB:E9).


then switch debug off again

and post the output


Karl

if you don't have "/run/user/1000/pibeacon/"
please upgrade to the most recent version

Posted on
Thu Jun 15, 2017 2:21 pm
siclark offline
Posts: 1964
Joined: Jun 13, 2017
Location: UK

Re: piBeacon: presence monitoring plugin discussions

here you go

pi@rPi3:/run/user/1000/pibeacon $ tail -f BLEconnect.log
20170615-04:13:13 starting BLEconnect program
20170615-07:59:05 requested a restart of BLE stack due to no signal for 907 seconds
20170615-08:34:49 requested a restart of BLE stack due to no signal for 905 seconds
20170615-08:52:20 requested a restart of BLE stack due to no signal for 1020 seconds
20170615-09:11:50 requested a restart of BLE stack due to no signal for 1140 seconds
20170615-13:56:48 requested a restart of BLE stack due to no signal for 908 seconds
20170615-21:18:58 msg: ['/usr/bin/curl', '-u', u'Simon:xxxxxx', '--digest', '-X', 'PUT', '-d', 'value={"pi":"0","sensors":{"BLEconnect":{"1871373428":{"A4:67:06:36:7C:92":{"txPower":12,"signal":-22}}}},"program":"BLEconnect","ipAddress":"192.168.0.23","ts":"1497557938=BST"}', u'http://192.168.0.138:8176/variables/pi_IN_0']

20170615-21:20:17 msg: ['/usr/bin/curl', '-u', u'Simon:xxxxxx', '--digest', '-X', 'PUT', '-d', 'value={"pi":"0","sensors":{"BLEconnect":{"1428643960":{"BC:54:36:1E:68:B2":{"txPower":12,"signal":-2}}}},"program":"BLEconnect","ipAddress":"192.168.0.23","ts":"1497558017=BST"}', u'http://192.168.0.138:8176/variables/pi_IN_0']

Posted on
Thu Jun 15, 2017 2:21 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

I particularly like the suggestion of using the power modules to remotely cycle power.

doing this on a regular basis is NOT a good idea . Every time you just cut off the power you might damage the SSD

Posted on
Thu Jun 15, 2017 2:23 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

20170615-21:18:58 msg: ['/usr/bin/curl', '-u', u'Simon:xxxxxx', '--digest', '-X', 'PUT', '-d', 'value={"pi":"0","sensors":{"BLEconnect":{"1871373428":{"A4:67:06:36:7C:92":{"txPower":12,"signal":-22}}}},"program":"BLEconnect","ipAddress":"192.168.0.23","ts":"1497557938=BST"}', u'http://192.168.0.138:8176/variables/pi_IN_0']

20170615-21:20:17 msg: ['/usr/bin/curl', '-u', u'Simon:xxxxxx', '--digest', '-X', 'PUT', '-d', 'value={"pi":"0","sensors":{"BLEconnect":{"1428643960":{"BC:54:36:1E:68:B2":{"txPower":12,"signal":-2}}}},"program":"BLEconnect","ipAddress":"192.168.0.23","ts":"1497558017=BST"}', u'http://192.168.0.138:8176/variables/pi_IN_0']


that means it gets a signal back from these 2 devices with these MAC#
A4:67:06:36:7C:92
BC:54:36:1E:68:B2

is BLE on the phone off right now?

Karl

Posted on
Thu Jun 15, 2017 2:35 pm
johnpolasek offline
Posts: 911
Joined: Aug 05, 2011
Location: Aggieland, Texas

Re: piBeacon: presence monitoring plugin discussions

kw123 wrote:
I particularly like the suggestion of using the power modules to remotely cycle power.

doing this on a regular basis is NOT a good idea . Every time you just cut off the power you might damage the SSD


I only do it when I start getting the "Update delayed. rPiX does not answer pings" messages in the log... Is there another option (other than dragging a screen and keyboard up into the attic)? And come to think about it, I haven't had to do it since I replaced all the SSDs with 32 gigs back in late April.

Posted on
Thu Jun 15, 2017 2:43 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

You can chose the alternative reboot sequence in rpi device edit and do a reboot at 1 am.
I don't see problems for some months with 15 rpi



Sent from my iPhone using Tapatalk

Posted on
Thu Jun 15, 2017 3:35 pm
siclark offline
Posts: 1964
Joined: Jun 13, 2017
Location: UK

Re: piBeacon: presence monitoring plugin discussions

kw123 wrote:
20170615-21:18:58 msg: ['/usr/bin/curl', '-u', u'Simon:xxxxxx', '--digest', '-X', 'PUT', '-d', 'value={"pi":"0","sensors":{"BLEconnect":{"1871373428":{"A4:67:06:36:7C:92":{"txPower":12,"signal":-22}}}},"program":"BLEconnect","ipAddress":"192.168.0.23","ts":"1497557938=BST"}', u'http://192.168.0.138:8176/variables/pi_IN_0']

20170615-21:20:17 msg: ['/usr/bin/curl', '-u', u'Simon:xxxxxx', '--digest', '-X', 'PUT', '-d', 'value={"pi":"0","sensors":{"BLEconnect":{"1428643960":{"BC:54:36:1E:68:B2":{"txPower":12,"signal":-2}}}},"program":"BLEconnect","ipAddress":"192.168.0.23","ts":"1497558017=BST"}', u'http://192.168.0.138:8176/variables/pi_IN_0']


that means it gets a signal back from these 2 devices with these MAC#
A4:67:06:36:7C:92
BC:54:36:1E:68:B2

is BLE on the phone off right now?

Karl


Bluetooth was on on both devices.
Should I turn it off and do same?

Posted on
Thu Jun 15, 2017 5:40 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

yes, and switch "... (5) BLE PGM level:" to "get data details" in config

Posted on
Thu Jun 15, 2017 7:37 pm
johnfdl offline
Posts: 177
Joined: May 18, 2017
Location: Atlanta, GA USA

Re: piBeacon: presence monitoring plugin discussions

Karl.
Re: your recommendation on a battery operated larger Beacon for the car.....I'm curious, will they transmit at a higher value to increase the range? I'd like to increase the speed with which my Pi picks up the Beacon as I pull into the driveway and it sounds like my little XY keyrings might not be the best product for the range I am seeking.

Or would a USB be better?

Posted on
Thu Jun 15, 2017 7:52 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

I believe so will. Check.
But the metal garage door will shield the signal.
But within 0.5 seconds when the rpi gets the first beep the plugin will set the state up.


Sent from my iPhone using Tapatalk

Posted on
Thu Jun 15, 2017 7:59 pm
johnfdl offline
Posts: 177
Joined: May 18, 2017
Location: Atlanta, GA USA

Re: piBeacon: presence monitoring plugin discussions

OK....I'll get my hands on USB or battery model. I am not worried about the metal garage door as I have a piBeacon in a weatherproof junction box just outside the window above the garage.

I currently have to get in front of the garage and wait a few secs, but was hoping to improve that to just before I pull up. If that doesn't work, I may move the PiBeacon more towards the beginning of the driveway but looking to avoid having to run power and ethernet down there (as wireless doesn't get that far)

Posted on
Thu Jun 15, 2017 9:29 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

i tested in my car in from of the house ~ 40 meters distance with the RPI inside behind glass in direct line of sight with AAA battery device.. the USB beacon in the car does not have line of sight but triggers about 2-3 seconds later (did not measure the distance )

so most important: is there a wall between the beacon and the RPI, or any metal.

You can measure the power:

at 1m distance to the RPI the signal you receive is the definition of the power output.


will do some measurements tomorrow

Karl

Posted on
Fri Jun 16, 2017 3:51 am
siclark offline
Posts: 1964
Joined: Jun 13, 2017
Location: UK

Re: piBeacon: presence monitoring plugin discussions

My phone , the BC mac address has been away for 4 hours now, i am VNCing back to the Mac the iPad, A4 mac address is still there This is that i see on the pi


0170616-10:45:48 timeout -s SIGINT 10s hcitool cc BC:54:36:1E:68:B2; hcitool rssi BC:54:36:1E:68:B2; hcitool tpl BC:54:36:1E:68:B2
20170616-10:45:48 BC:54:36:1E:68:B2 1. try ret: --- err>>Can't create connection: Input/output error
Not connected.
Not connected.<<
20170616-10:45:53 timeout -s SIGINT 10s hcitool cc A4:67:06:36:7C:92; hcitool rssi A4:67:06:36:7C:92; hcitool tpl A4:67:06:36:7C:92
20170616-10:45:53 A4:67:06:36:7C:92 1. try ret: --- err>>Can't create connection: Input/output error
Not connected.
Not connected.<<
20170616-10:45:58 timeout -s SIGINT 10s hcitool cc BC:54:36:1E:68:B2; hcitool rssi BC:54:36:1E:68:B2; hcitool tpl BC:54:36:1E:68:B2
20170616-10:45:58 BC:54:36:1E:68:B2 1. try ret: --- err>>Can't create connection: Input/output error
Not connected.
Not connected.<<
20170616-10:46:03 timeout -s SIGINT 10s hcitool cc A4:67:06:36:7C:92; hcitool rssi A4:67:06:36:7C:92; hcitool tpl A4:67:06:36:7C:92
20170616-10:46:03 A4:67:06:36:7C:92 1. try ret: --- err>>Can't create connection: Input/output error
Not connected.
Not connected.<<
20170616-10:46:09 timeout -s SIGINT 10s hcitool cc BC:54:36:1E:68:B2; hcitool rssi BC:54:36:1E:68:B2; hcitool tpl BC:54:36:1E:68:B2
20170616-10:46:09 BC:54:36:1E:68:B2 1. try ret: --- err>>Can't create connection: Input/output error
Not connected.
Not connected.<<

Posted on
Fri Jun 16, 2017 2:48 pm
kw123 offline
User avatar
Posts: 8392
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

is there a line with http ... in the debug log?

Page 54 of 78 1 ... 51, 52, 53, 54, 55, 56, 57 ... 78

Who is online

Users browsing this forum: No registered users and 4 guests