piBeacon: 3- presence monitoring download

Posted on
Wed May 08, 2019 9:01 am
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Added features / changes in v7.104.279 @ 2019-05-08
===================================================

1. moved setGPIO command into execcommands. that reduces delay with older RPI ie RPI1
and do not send back status to indigo if not requested

2. now all pibeacon logfiles on the RPI are in ONE file: /var/log/piBeacon.log
it looks like:
date module debuglvl message
Code: Select all
20190507-12:56:30 copyToTemp L:-1= killing copyToTemp.py
20190507-12:56:30 sunDial L:-2= move return due to: direction1, inFixBoundaryMode:0 cap switch sens: 0; switch sensor:0
20190507-12:56:30 sunDial L:-3= 1100 === 34 1
20190507-12:56:31 master L:-1= IP find:::: wifiIP >><<; eth0IP: >>192.168.1.39<<; hostnameIP >>['192.168.1.39']<<; ipAddressRead >>192.168.1.39<<
20190507-12:56:31 sunDial L:-2= move return due to: direction-1, inFixBoundaryMode:0 cap switch sens: 0; switch sensor:0
20190507-12:56:31 sunDial L:-3= 1300 === 85 -1
20190507-12:56:31 master L:-1= master can ping indigo server at ip:>>192.168.1.50<<
20190507-12:56:32 installLibs L:-1= installLibs starting
20190507-12:56:32 installLibs L:-1= installLibs no opsys upgrade requested

20190507-14:59:04 execcommands L:-1= next command: {u'device': u'OUTPUTgpio-1', u'inverseGPIO': True, u'command': u'down', u'pin': u'26'}
20190507-14:59:04 execcommands L: 1= next cmd: "down"
20190507-14:59:04 execcommands L: 0= setGPIO pid=16700, command :{'startAtDateTime': u'1557259144.27', 'values': {}, 'pin': '26', 'debug': 3, 'inverseGPIO': True, 'cmd': u'down', 'devId': 0, 'PWM': 1}
20190507-14:59:04 execcommands L: 0= msg: 156x-6-api_IN_14x-6-a{"outputs":{"OUTPUTgpio-1-ONoff":{"0":{"actualGpioValue":"high"}}},"program":"execcommands","ipAddress":"","pi":"14","ts":{"tz":"CDT","time":1557259144.16}}

20190507-14:59:04 execcommands L:-1= next command: {u'device': u'OUTPUTgpio-1', u'inverseGPIO': True, u'command': u'down', u'pin': u'5'}
20190507-14:59:04 execcommands L: 1= next cmd: "down"
20190507-14:59:04 execcommands L: 0= setGPIO pid=16707, command :{'startAtDateTime': u'1557259144.36', 'values': {}, 'pin': '5', 'debug': 3, 'inverseGPIO': True, 'cmd': u'down', 'devId': 0, 'PWM': 1}
20190507-14:59:04 execcommands L: 0= msg: 156x-6-api_IN_14x-6-a{"outputs":{"OUTPUTgpio-1-ONoff":{"0":{"actualGpioValue":"high"}}},"program":"execcommands","ipAddress":"","pi":"14","ts":{"tz":"CDT","time":1557259144.29}}

Posted on
Fri May 10, 2019 10:54 am
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Added features / changes in v7.105.280 @ 2019-05-08
===================================================

1. added option to show BLEconnect devices on location plot.
you need to set options (color, name etc) in device edit.

2. fixed some code inconsistencies after running code inspec w pycharm.
and found some bugs, but only when exceptions occur = not under normal operations
hence they do not show up frequently

3. removed old style version check, now depends on indigo to do version checking (7.3 and higher)


Karl

Posted on
Wed Jun 12, 2019 11:29 am
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Code: Select all
Added features / changes in v7.105.282 @ 2019-06-12
===================================================

1. added option to select wlan/ eth on rpasberry
    switch wlan/eth : on / off / on if other off/ do not change
    useIP# use / do not use / use if other off/
       this is the IP # send to the plugin to ID the device
    the default is
      eth : do not change, useIP#
      wlan: on if eth off, useIP if eth off
== this was added to cover: wifi is used for comm to indigo and eth for another subnet


general setting is done in config, as soon as the rpi is edited the device edit setting is used.

forgot to set PUSH new software to ON. So please "push all" (config AND software) to RPI.

Karl

Posted on
Thu Jun 13, 2019 9:50 am
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

posted v7.105.283

fixed bug in .282: format error in pibeaconutils.py on rpi
if you installed .282, you need to reboot the RPI (through plugin menu/ "send ...")

now the push will get done automatically with every new version


Karl

Posted on
Sat Jun 15, 2019 4:30 pm
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Code: Select all
Added features / changes in v7.105.284 @ 2019-06-13
===================================================

1. fixed some code and menus for select wlan/eth on raspberry

2. added option to switch on fan when RPI INTERNAL temp is > xx C
   in addtion to any external temp sensor
   this is set in RPI device edit

3. now warnings are also printed into the standard indigo logfile, was send only to pibeacon.log file before

4. when the RPI boots it check if the "dirty bit was on (ie shutdown = simple power off)"
   when after boot the dirty bit is still on the plugin will get a message ( shown in the logfile)

6. increase wait time for proper start of tcpip stack to > 75 secs from 65 secs. should always work after 25 secs.
   but some slower MAC might take a little longer

7. change error message when tcpip stack does not start properly to something meaingfull beside error in line ..

8. changed log message when sending data to rpi and it is not accepting commands while rebooting to a simple warning, not error


Karl

Posted on
Mon Jun 17, 2019 10:17 pm
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

released 7.105.286

fixed bug: Line 513 has error=global name 'wifiIP'


Karl

Posted on
Wed Jun 19, 2019 11:05 pm
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

released: v.105.287

added option for ibeacon plot postions background.png
can either be in
(1) .../Indigo x.y/Preferences/Plugins/com.karlwachs.piBeacon/plotPositions/
or in
(2) /output image path/

fixed description in config, was pointing to old directories

Karl

Posted on
Fri Jun 21, 2019 5:14 pm
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

released v 7.105.291

fixed: wifi only setup, RPI master was always restarting
added: check for # of eth / wifi packages to check if networks are up

Karl

Posted on
Tue Jun 25, 2019 4:25 pm
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

released v 7.105.293

Code: Select all
1. allows now to "normally" create an RPI beside "basic initial setup of RPI".
   you can now setup all parameters from device edit
   basic initial setup is still available

2. cleaned up device edit py programs (internal only)

3. cleaned up wlan/eth management on RPI

Karl

Posted on
Wed Jul 03, 2019 8:01 pm
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Code: Select all
Added features / changes in v7.105.295 @ 2019-07-03
===================================================

1. fixed  chown for pibeacon.log:  removed, as it is in std log directory now

2. checking if userid password is set AND ( authorisathion is basic or digest)
   = does not wait for userid and passsword if no indigo security enabled.

3. cleaned up threads for sending files to RPI
   now much clearer and will also manage new RPI w/o restarting plugin.

4. added amg88xx image display program to regular plugin.log

5. added parameter to NOT restart RPI if no messages received in 1-  xx minutes

Posted on
Fri Jul 12, 2019 5:19 pm
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Code: Select all
Added features / changes in v7.107.298 @ 2019-07-12
===================================================

1. added menu option in send ... to RPI:
   - get pibeacon log:  does an tail - 100 on /var/log/pibeacon and puts it into the plugin.log file
   - gets output of hcitool lesacn from the rpi to plugin.log
   - lines for rpi log are preceded by "-Pi#x - " to easily id that info

2. added option to use the new rpi UPS v2 ups. It has an interface (rx/tx and signal shutdown eminent)
   you can connect the 3 pins to your rpi (rx,tx and one gpio) and set shutdown at xx % battery power left and or use shutdown eminent signal to shut down the rpi.
   this version (2) is significantly  better than the previous UPS version.

3. cleaned up thread for sending stuff to the rpi's better management of down rpi ...

4. fixed several little things, menus




logs look like:
Code: Select all
ibeaconList form Pi# 8 collected over 20 secs ==============: 
pi#8 -
pi#8 - 0C:2A:69:16:5C:DB Tovala 1737
pi#8 - 0C:2A:69:16:5C:DB (unknown)
pi#8 - 4C:95:54:73:17:AE (unknown)
...
pi#8 - 00:15:83:E5:12:D5 (unknown)
pi#8 - C1:33:62:A9:36:15 MiniBeacon_32424
pi#8 - [1]+  Done                    sudo hcitool lescan
pi#8 -
pi#8 - ibeaconList  END         ===================================



2019-07-12 10:50:48 stats from Pi# 8
pi#8 -
pi#8 - fsck.fat 4.1 (2017-01-24)
pi#8 - Checking we can access the last sector of the filesystem
pi#8 - Boot sector contents:
pi#8 - System ID "mkfs.fat"
...
pi#8 -  | BCM | wPi |   Name  | Mode | V | Physical | V | Mode | Name    | wPi | BCM |
pi#8 -  +-----+-----+---------+------+---+---Pi 3---+---+------+---------+-----+-----+
pi#8 - pi@raspberrypi:~$ exit
pi#8 - logout
pi#8 - Connection to 192.168.1.28 closed.

pi#8 -
pi#8 - Stats end ===========


pi#8 - pibeacon logfile from Pi# 8  ==============: 
pi#8 -
pi#8 - 20190710-18:37:04 master          L:-1=           Requested Config:{u'wlan0': {u'on': u'dontChange', u'useIP': u'useIf'}, u'eth0': {u'on': u'dontChange', u'useIP': u'use'}}
pi#8 - 20190710-18:37:06 master          L:-1= can ping indigo server at ip:>>192.168.1.50<<
pi#8 - 20190710-18:37:06 installLibs     L:-1=  installLibs starting 
pi#8 - 20190710-18:37:06 installLibs     L:-1=  installLibs no opsys upgrade requested
pi#8 - 20190710-18:37:06 installLibs     L:-1= ==== libraries seem to be setup, no need for action
pi#8 - 20190710-18:37:06 installLibs     L:-1= ==== libraries install finished
..
pi#8 - 
pi#8 - 20190712-10:50:46 beaconloop      L:-1= my BLE mac# is : B8:27:EB:20:90:32
pi#8 - 20190712-10:50:46 beaconloop      L:-1= ble thread started
pi#8 - 20190712-10:50:46 beaconloop      L:-1= starting loop
pi#8 - 20190712-10:50:47 BLEconnect      L:-1= starting BLEconnect program 
pi#8 - 20190712-10:50:49 BLEconnect      L:-1= BLEconnect: using mac:B8:27:EB:20:90:32;  hci0; bus:UART
pi#8 - pi@raspberrypi:~$
pi#8 - pibeacon logfile  END    ===================================


Posted on
Wed Aug 21, 2019 8:01 am
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

released SSD image for buster for RPI4, fixes also RPI3+ issues with blue scanning
https://www.dropbox.com/s/p6yyrvafrfmv3qh/2019-08-21-pibeacon-buster.img.zip?dl=1

new plugin release:

Added features / changes in v7.108.302, @ 2019-08-21
===================================================

1. various little fixes

2. added several options to pi server:
- network management, if network config changes : do notthing, restart master, reboot
- added option to start webinput server where you can enter wifi SID and password w/o using shh

3. works with rpi - buster image

Karl

ps latest SSD images links are always in the first post.

Posted on
Fri Aug 23, 2019 6:28 pm
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: 3- presence monitoring download

Added features / changes in v7.109.303 @ 2019-08-24
===================================================

1. added sensor Geiger counter support
use INPUT pulse sensor as input
set deadtime and bounce time to 0
you need to make sure that the RPI does not get 5V to GPIO.
tested w Portable Handle Geiger Counter 0.01 μSv/h DIY Kit Nuclear Radiation Detector With Miller GM Tube Gamma Beta Ray Suit for Arduino
https://www.amazon.com/Portable-Counter ... way&sr=8-5
standard cheap china detector.
with this detector you need to bridge the P100 pins and use the headset output through a voltage devider (2x 4.7K Ohm) as GPIO input
The detector can be connected to +5V/ground from the RPi as power source.
As the signals are ~ 0.5 mSec wide a faster RPI (3 and higher) is recommended
in normal circumstance you should see ~ 1 count per second. w a radioactive source like:
Geiger Counter Radioactive Source Thorium Lantern Mantles you should see > 10 counts/second
These detectors do not detect alpha particles. Mostly muons and some elctrons / gamma rays from cosmic particles (muon) decays

2. improved INPUTpulse sensor. Now shows
counts per minute [cpm] and frequency = counts per second [cps]
improved handling of fast and short pulses



for the Geiger counter sensor:
The output is 1.0V to 4.8V. Also for the GND, V+5, Vin. But the Vin pin is a high impedance output, not usable wit the RPI.

See pictures how to setup.
1. use audio cable, cut and add 2 resistors as voltage dividers, the blue cable was ground with mine, but you need to test.
Screen Shot 2019-08-23 at 19.20.19.png
Screen Shot 2019-08-23 at 19.20.19.png (323.58 KiB) Viewed 630 times

2. bridge P100 connectors - next to headset output. That enables the audio output.
Screen Shot 2019-08-23 at 19.17.04.png
Screen Shot 2019-08-23 at 19.17.04.png (244.31 KiB) Viewed 630 times


setup in indigo:
Screen Shot 2019-08-23 at 19.22.59.png
Screen Shot 2019-08-23 at 19.22.59.png (92.08 KiB) Viewed 630 times

and device view:
Screen Shot 2019-08-23 at 19.22.44.png
Screen Shot 2019-08-23 at 19.22.44.png (43.21 KiB) Viewed 630 times


Karl
ready for the next Chernobyl :evil:

Posted on
Sat Aug 24, 2019 10:14 am
johnfdl offline
Posts: 174
Joined: May 18, 2017
Location: Atlanta, GA USA

Re: piBeacon: 3- presence monitoring download

Karl,

Most of the stuff you've done with the piBeacon is way over my head, but I gotta say I am very thankful for my piBeacon. I use it to determine if the home is vacant (set alarm, lock doors close garage) or someone is just coming home to a vacant home (disarm alarm, unlock doors, etc.) It has worked nearly flawlessly for about a year or so now. And the hiccups I have had, you've been super helpful in resolving.

So thank you for perhaps the best feature of my home automation set-up!

Posted on
Thu Sep 05, 2019 1:47 pm
kw123 offline
User avatar
Posts: 7226
Joined: May 12, 2013
Location: Dallas, TX

piBeacon: 3- presence monitoring download

posted new SSD image for buster (RPI4 support) and new plugin version.

major new feature on SSD: will start an adhoc wifi server that allows you to connect to the RPI and set SSID and password of your home wifi w/o manual monitor/.keyboard connection.
this is really useful for RPI-0W where you don't have an ethernet connection.

See below for details


Code: Select all
Added features / changes in v7.109.305 @ 2019-09-05
===================================================

1.  added test if python-serial is installed in master.py

2.  change the check if userid/password is setup

3. change bug level setup for rpi, now select which PRI to debug, not which area.

4. fixed several smal formatting bugs

5. Option to enable setting wifi supplicant info on your RPI w/o terminal and keyboard attached to the RPI
    at FIRST launch of new SSD, before any connection to RPI is made.
    At start Master.py checks if GPIO#26 (lower left pins) is low = bridge grnd to GPIO#26
    An adhoc wifi server: "clock"  ip# 192.168.1.254 is started
    Connect laptop to that wifi server w safari  @ 192.168.1.254:8010
         there you can set SSID and passwd of your home network (also timezone)
    Or you can ssh pi@192.168.1.254 pwd = pibeacon and manually configure files in commandline mode
    FIRST:  select "clock" wifi
            you must attach to that wifi in network prefs / advanced / tcpip: 
            set your dhcp to manual and assign an IPv4 #(eg 192.168.1.5)
            set subnetmask to 255.255.255.0; router 192.168.1.254
            click ok  ... apply
    This is helpfull for a RPI-0W. You can then set your wifi sidd and password and the RPI-0W will connect to your home wifi network after reboot
    ==> this is only an option with a new SSD image > 2019-09-xx


Karl

Who is online

Users browsing this forum: No registered users and 2 guests

cron