piBeacon: 3- presence monitoring download

Posted on
Sat Jun 20, 2020 9:55 am
kw123 offline
User avatar
Posts: 7172
Joined: May 12, 2013
Location: Dallas, TX

piBeacon: 3- presence monitoring download

posted v7.121.406

Code: Select all
Added features / changes in v7.121.406 @ 2020-06-20
===================================================
1. added compression of data when #bytes > xxbytes (set in config)
2. there was a limnit in # of bytes to be received from RPIs at ~ 30k, was lifted to 120kbytes
running beacon scan with very low cutoff RSSI could produced much more data
3. added beacon report for new and existing beacons
 start from menu and send request to ONE rpi, set RSSI cutoff  to accpet all/many/some/ony very close beacons:
BLEAnalysis received for beacons with signal (rssi) > -70; from RPI#:11
================================ existing_Beacons ============================================
===MAC# DC:0D:30:92:E3:1F  -b-feasy-aaa == ; raw data:
n_of_MSG_Types              : 4
raw data:
- 043E26020100001FE392300DDC1A0201060303AAFE1116AAFE20000C6F80000005E43F000414A4
- 043E26020104001FE392300DDC1A0E16F0FF1B020902DC0D3092E31F640A094653435F42503130
- 043E2A020100001FE392300DDC1E0201061AFF4C000215FDA50693A4E24FB1AFCFC6EB07647825275165C1
- 043E27020100001FE392300DDC1B0201060303AAFE1316AAFE10D403676F6F2E676C2F50484E5364
mfg_info                    : FSC_BP104
MSG_in_10Secs               : 4.0
beaconType                  : [u'Feasy_AAA', u'MiniBeacon']
max_rssi                    : -53
max_TX                      : 109
pos_of_reverse_MAC_in_UUID  : []
pos_of_MAC_in_UUID          : []
possible knownTag options:
-- use:Feasy_AAA
-- use:MiniBeacon

================================ new_Beacons ============================================
===MAC# FF:FF:C2:28:06:C3   == ; raw data:
n_of_MSG_Types              : 2
raw data:
- 043E1702010000C30628C2FFFF0B0201060302E0FF030954
- 043E1A02010400C30628C2FFFF0E0DFFFFFFC22806C315FB757117
mfg_info                    : TF
MSG_in_10Secs               : 5.3
beaconType                  : [u'', u'']
max_rssi                    : -60
max_TX                      : 70
pos_of_reverse_MAC_in_UUID  : [-1, -1]
pos_of_MAC_in_UUID          : [-1, 18]
possible knownTag options:
-- "name_here":{"battCmd":"off","beepCmd":"off","dBm":"-61","prio":1,"pos":12,"posDelta":0,"tag":"0B0201060302"}
-- "name_here":{"battCmd":"off","beepCmd":"off","dBm":"-61","prio":1,"pos":12,"posDelta":0,"tag":"0E0DFFMAC#########"}

4. added debug option on RPI do
   cd pibeacon
   sudo python beaconloop.py
   echo "A4:DA:32:24:5F:6B" > temp/beaconloop.trackmac
will create output like for 10 beacon message, it will give you frequence, some raw info and if accepted or rejected
START  A4:DA:32:24:5F:6B 30:20.899144  logCount: 10  hex: 6B5F2432DAA41E0201061AFF4C00021553706F747950616C5465727261636F6D1ADDD624CACA
0-     A4:DA:32:24:5F:6B ; UUID: 53706f747950616c5465727261636f6d ; Maj: 6877 ; Min: 54820
1-     A4:DA:32:24:5F:6B ; tag: SpotyPal ; prio: 1 ; uuidMajMin: [u'SpotyPal', u'6877', u'54820'] ; useOnlyPrioMsg: True
tag-   A4:DA:32:24:5F:6B ; posFound: 32 ; dPos: 0 ; tag: SpotyPal ;  53706F747950616C5465727261636F ; tagString 53706F747950616C5465727261636F
5-     A4:DA:32:24:5F:6B ; rejectThisMessage: False ; UUID: SpotyPal 6877 54820
9-     A4:DA:32:24:5F:6B ; tagFound True ; UUID: SpotyPal
11-    A4:DA:32:24:5F:6B ; added to beaconMSG
99     A4:DA:32:24:5F:6B ; accepted
START  A4:DA:32:24:5F:6B 30:24.911548  logCount: 9  hex: 6B5F2432DAA41E0201061AFF4C00021553706F747950616C5465727261636F6D1ADDD624CACB
0-     A4:DA:32:24:5F:6B ; UUID: 53706f747950616c5465727261636f6d ; Maj: 6877 ; Min: 54820
1-     A4:DA:32:24:5F:6B ; tag: SpotyPal ; prio: 1 ; uuidMajMin: [u'SpotyPal', u'6877', u'54820'] ; useOnlyPrioMsg: True
tag-   A4:DA:32:24:5F:6B ; posFound: 32 ; dPos: 0 ; tag: SpotyPal ;  53706F747950616C5465727261636F ; tagString 53706F747950616C5465727261636F
5-     A4:DA:32:24:5F:6B ; rejectThisMessage: False ; UUID: SpotyPal 6877 54820
9-     A4:DA:32:24:5F:6B ; tagFound True ; UUID: SpotyPal
11-    A4:DA:32:24:5F:6B ; added to beaconMSG
99     A4:DA:32:24:5F:6B ; accepted

Posted on
Tue Jul 07, 2020 5:08 pm
kw123 offline
User avatar
Posts: 7172
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

v7.122.417, maintenance release

Code: Select all
1. cosmetic changes for new beacon reports
2. increased data collection time for new beacon report from 15secs to 25 secs.
3. fixed action reboot rpi# through ssh
4. improved speed of car devices status changes
5. improved new beacon report
6. fixed update to states in devcies edit does not work anymore, changed to batch update
  ie group members was impacted, need to edit and save all devices / beacons if problem

Posted on
Thu Jul 23, 2020 8:25 am
kw123 offline
User avatar
Posts: 7172
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Code: Select all
Added features / changes in v7.123.422 @ 2020-07-23
===================================================
1. re-wrote get battery level, beep functions, BLE analysis, get new beacon info.
   also added a beaconloop restart after any of the above functions to avoid a hanging BLE stack
2. fixed battery level calculation for Aiko beacons (it uses a range value:64 = 0% .. value:100 =100 %)
3. added more tagging features for beacons
4. RINEX and NJOII are now the same type of beacon
   if you have a RINEX or NJOII you need to edit and set beacon type
5. some samller menue changes
6. some smaller program changes

Posted on
Thu Aug 06, 2020 3:20 pm
kw123 offline
User avatar
Posts: 7172
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Code: Select all
Added features / changes in v7.124.423 @ 2020-08-06
===================================================
1. added sensor bosch BMP388 high precision pressure
   accuracy equivalent = 0.8m altitude change


Karl

Posted on
Sun Aug 23, 2020 7:35 pm
kw123 offline
User avatar
Posts: 7172
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Code: Select all
Added features / changes in v7.124.424 @ 2020-08-23
===================================================
1. several small fixes, typos, menus ..
2. fixed some properties of ruuvi tag sensor and settings
3. added option in ibeacon device edit to not run get beattery level for individual beacon at 4 am, as eg
   nutale beacons beep for 5 secs when attached to the RPI or any other host  (they beep when connection to a host is lost)


Karl

Posted on
Mon Aug 31, 2020 8:29 am
kw123 offline
User avatar
Posts: 7172
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Code: Select all
Added features / changes in v7.126.436 @ 2020-08-31
===================================================
0. added new method (option) to read beacons using hcidump & lescan instead of python socket calls
1. added several "feasy" type beacons w battery level support in std message
2. added several "Minew" type beacons w battery level support in std message
3. added menu option to reload known beacon tags (for dev)


This new option can read manufacturing special message that are filtered out in the previously used python library calls.
this allows to read several new items
- battery level, and other message supplied measurements
- beacon manufacturing names
- and other info.


The default is the old version. You can switch in config at the bottom of RPI parameter settings:
Screen Shot 2020-08-31 at 09.28.32.png
Screen Shot 2020-08-31 at 09.28.32.png (37.73 KiB) Viewed 106 times


Karl
ps thanks go to John for testing

Posted on
Tue Sep 22, 2020 5:27 pm
kw123 offline
User avatar
Posts: 7172
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Added features / changes in v7.127.453 @ 2020-10-23
===================================================
Code: Select all
0. cleaned up some code
1. rearanged some menu items, clearer structure, using some color for menu items
2. In addition to the Ruuvitag added several blue tooth sensors, very easy to setup, they all can be used as presence as well as sensors
   They have long battery life and > 30 m distance -- with several RPi in the house essetially the whole house is covered
   INGICS:
      iBS01-x: Family of on/off sensors- Button, magent, movement, external switch
      iBS01T:  Temp and humidity
      iBS01RG: x-y-z acceleration/ gravity sensor
      iBS02:   PIR presence ir IR object detection
      iBS03-x: Family of on/off sensors- Button, magent, movement, external switch
      iBS03G:  Movement detection of beacon on/off
      iBS03T:  on board temp sensor
      iBS03TP: on board temp sensor + temp sensor probe, water proved       ==> great temp sensor for a pool <====
      iBS03RG: x-y-z acceleration/ gravity sensor
    Minew
      E8: x-y-z acceleration/ gravity sensor
   iSensor - Kaipule
      various on/off sensors for GAS, CO water, alarm ...
      EN61, ES61, EW70, ET90, IM21, IX30 IX32
   Satech
      STixx sensors, acceleration, temp, humidity, on/off

3. Normally beacon go "up" as soon as a signal is detect. When they are gone / no signal is received:
   the RPi does not send any info to the plugin if no signal. Then the plugin will set them to down after xx secs (normally 90) and after another xx secs to expired
  In "fastDown" mode: after yy secs (>=10) w/o signal the RPi sends a fast down message to the plugin, then the plugin will set the beacon to down,
  If you have more than 2 RPi you can probably go down to 10 secs, better 20 seconds.
  That means if the beacons leaves the house you will know in ~ 10+3 secs
  If you have just one RPI and have it connected to something that moves around in the house it is likely not a good idea
  but for eg a beacon that is connected to eg a bike that arrives in a dedicated space and has a good connection to the RPi it shouldd work well

4. minUpSigal and minDownSignal:
  When set to eg up=-60 and down=-80: the beacon will only go up when it is close to the RPI  ~ 1 m. but will stay up until it has eg left the room (>10m)
  with this setting you can decide if a beacon is in a room - that requires an RPI in each room you like to have this feature

Karl

Posted on
Tue Sep 29, 2020 1:35 pm
kw123 offline
User avatar
Posts: 7172
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Code: Select all
Added features / changes in v7.128.459 @ 2020-10-29
===================================================
0. cleaned up some code
1. rearanged some menu items, clearer structure, using some color for menu items
2. In addition to the Ruuvitag added several blue tooth sensors, very easy to setup, they all can be used as presence as well as sensors
   They have long battery life and > 30 m distance -- with several RPi in the house essetially the whole house is covered
    INGICS:
        iBS01-x: Family of on/off sensors- Button, magent, movement, external switch
        iBS01T:  Temp and humidity
        iBS01RG: x-y-z acceleration/ gravity sensor
        iBS02:   PIR presence ir IR object detection
        iBS03-x: Family of on/off sensors- Button, magent, movement, external switch
        iBS03G:  Movement detection of beacon on/off
        iBS03T:  on board temp sensor
        iBS03TP: on board temp sensor + temp sensor probe, water proved
        iBS03RG: x-y-z acceleration/ gravity sensor
        iBS04:  on/off button
    Minew
        E8: x-y-z acceleration/ gravity sensor
    iSensor - Kaipule
        various on/off sensors: GAS, CO water, alarm ,
        on sensor: door button
        remoteKey
        The on/off states are managed according to the cabailities of the sensors
    Satech
        STixx sensors, acceleration, temp, humidity, on/off

3. Normally beacon go "up" as soon as a signal is detect. When they are gone / no signal is received:
   the RPi does not send any info to the plugin if no signal. Then the plugin will set them to down after xx secs (normally 90) and after another xx secs to expired
  In "fastDown" mode: after yy secs (>=10) w/o signal the RPi sends a fast down message to the pluginthen teh plugin will set teh beacon to down,
  If you have more than 2 RPi you can probably go down to 10 secs, better 20 seconds.
  That means if the beacons leaves the house you will know in ~ 10+3 secs
  If you have just one RPI and have it connected to something that moves around in the house it is likely not a good idea
  but for eg a beacon that is connected to eg a bike that arrives in a dedicated space and has a good connection to the RPi it shouldd work well

4. minupSigal and mindownSignal:
  When set to eg up=-60 and down=-80: the beacon will only go up when it is close to the RPI  ~ 1 m. but will stay up until it has eg left the room (>10m)
  with this setting you can decide if a beacon is in a room - that requires an RPI in each room you like to have this feature

5. changed hcidump method
    added option to restart BLE scanner every 5 minutes, just in case RPi can not keep up
    fixed so that 2. ble dongle is not needed
    This method catches all types of messages while the python socket method ignored some of the mesage types
     ie mfg info which is used to id a beacon / sensor
    You can select which method to use for all RPi in config, or overwrite in RPI device edit.


I would like to point out the newly supported BLE door button and key fob devices.
They work on battery and only send messages when button pressed -- claim lifetime of battery is > 3 years.
There is an indicator for low battery which is set when battery is low (have not tested as the batteries are still fresh)
The reaction time is ~ 0.5 secs between button press and indigo device state change

Karl

thanks go to Wouter and John in the Netherlands for patiently debugging

Who is online

Users browsing this forum: No registered users and 1 guest

cron