piBeacon: 3- presence monitoring download
Re: piBeacon: 3- presence monitoring download
posted v 1-19-17
added: more error control
1. when FTP to piBeacon does not work properly (e.g. bad network) some of the files might not make it completely or there is a read/write conflict on the rPi. Now the rPi-PY programs will ignore bad files or no access and try to re-read a minute later.
2. added some more error control in the plugin. If requests to indigo time out (i.e.due to APPLESCRIPT keeping indigo from interacting) it will handle it more gracefully. Before if a request for device timed out (= error) it assumed that device does not exist. Now it will try to work around this. This is not complete but should cover many of the circumstance. To catch ALL of these situations one would need to do error control for ANY interaction with indigo( get/write state, check device, update device ...) there are > 100 places where this is done in the plugin...
Karl
thanks to Matt and John for helping to understand these situations.
added: more error control
1. when FTP to piBeacon does not work properly (e.g. bad network) some of the files might not make it completely or there is a read/write conflict on the rPi. Now the rPi-PY programs will ignore bad files or no access and try to re-read a minute later.
2. added some more error control in the plugin. If requests to indigo time out (i.e.due to APPLESCRIPT keeping indigo from interacting) it will handle it more gracefully. Before if a request for device timed out (= error) it assumed that device does not exist. Now it will try to work around this. This is not complete but should cover many of the circumstance. To catch ALL of these situations one would need to do error control for ANY interaction with indigo( get/write state, check device, update device ...) there are > 100 places where this is done in the plugin...
Karl
thanks to Matt and John for helping to understand these situations.
Re: piBeacon: 3- presence monitoring download
Karl,
FYI - Installed 1-19-17, but nothing seems to work. Everything shows expired. 1-19-12 works.
JP
FYI - Installed 1-19-17, but nothing seems to work. Everything shows expired. 1-19-12 works.
JP
Re: piBeacon: 3- presence monitoring download
fixed in 1-19-18
was an oooops.. too many things need to be tested, but the obvious one was not.
Karl
this download is locked gain please ==> discussions
was an oooops.. too many things need to be tested, but the obvious one was not.
Karl
this download is locked gain please ==> discussions
Re: piBeacon: 3- presence monitoring download
posted v 1.19.19
added: lowest level software watch dog function to the rPis.
This option can be switched on in config . you can select after how many minutes the rPi should reboot itself if the main program hangs on the rip. it is implemented via e.g. for a 4 minute delay in shutdown/reboot with:
Then every 3minutes and 40 seconds that reboot is cancelled by the main program and reissued.
Some tricks had to be deployed to make this smooth(*), but it seems to be working fine.
Anything lower than that has to be done with external hardware.
This feature is for folks that might experience bad Wifi connection that cause the rPis to hang. Don't know if this helps. just try it out. As I don't have the hangs its difficult to see if the rPi is still alive at that level. No program has to run, just "shutdown" has to do its thing.
Karl
(*)
/run/nologin
has to be removed when less than 5 minutes before reboot is left. Other wise you cant login to the rPi anymore...
added: lowest level software watch dog function to the rPis.
This option can be switched on in config . you can select after how many minutes the rPi should reboot itself if the main program hangs on the rip. it is implemented via e.g. for a 4 minute delay in shutdown/reboot with:
Code: Select all
shutdown -r 4Some tricks had to be deployed to make this smooth(*), but it seems to be working fine.
Anything lower than that has to be done with external hardware.
This feature is for folks that might experience bad Wifi connection that cause the rPis to hang. Don't know if this helps. just try it out. As I don't have the hangs its difficult to see if the rPi is still alive at that level. No program has to run, just "shutdown" has to do its thing.
Karl
(*)
/run/nologin
has to be removed when less than 5 minutes before reboot is left. Other wise you cant login to the rPi anymore...
Re: piBeacon: 3- presence monitoring download
posted v 1.19.21
fixed:
- beacons devices were deleted when "txpower_overwrite" was less than actual txpower from beacon. (old 3 lines of code left over from early testing)
- fixed some log file printouts
Karl
fixed:
- beacons devices were deleted when "txpower_overwrite" was less than actual txpower from beacon. (old 3 lines of code left over from early testing)
- fixed some log file printouts
Karl
Re: piBeacon: 3- presence monitoring download
posted v 1.21.4
fixed:
- rPi where not always updated automatically when a parameters was changed - i.e. in devices edit
- if ONE rPi is not reachable, none of the other rPi was updated (sometimes)
added
- added a shutdown button -pin. In device edit assign a pin to be shutdown button pin. if that pin is connected to ground for more than 1 seconds the rPi will shut down gracefully completely within ~ 10 seconds. the battery backup board does the same when the AC power gets disconnected. It will shutdown the rPi gracefully
- added a shutdown- output pin. If you want to use the battery backup setup you can select a pin that is used to signal to the battery backup that the api is shutting down . The battery backup board will wait ~ 20 seconds after that signal pin goes down and shutdown the power supply to the rPi. and switch off the battery and put into trickle charge mode (~ 1 mA charge)
Karl
fixed:
- rPi where not always updated automatically when a parameters was changed - i.e. in devices edit
- if ONE rPi is not reachable, none of the other rPi was updated (sometimes)
added
- added a shutdown button -pin. In device edit assign a pin to be shutdown button pin. if that pin is connected to ground for more than 1 seconds the rPi will shut down gracefully completely within ~ 10 seconds. the battery backup board does the same when the AC power gets disconnected. It will shutdown the rPi gracefully
- added a shutdown- output pin. If you want to use the battery backup setup you can select a pin that is used to signal to the battery backup that the api is shutting down . The battery backup board will wait ~ 20 seconds after that signal pin goes down and shutdown the power supply to the rPi. and switch off the battery and put into trickle charge mode (~ 1 mA charge)
Karl
piBeacon: 3- presence monitoring download
posted v 1.22.1
fixed:
rPi device edit had a typo introduced in 21.1
added One Last Thing:
you now can connect as many OneWire Temp sensors 18B20 to the rPi as you can fit cables into the box. The theoretical limit is 2**64, but only tested with 3.
-You need one resistor 4.7KOhm between pin1 and pin7 and connect to each of the signal wires ;
-connect V+ to pin1(+3.3)
-connect ground to any ground pin eg pin 11
to setup in indigo:
- create a new ONE 18B20 sensor as before.
- connect eg 5 18B20 devices to the rPi and you will get 4 extra indigo devices created. Their name will be the same as device1 + serial number of the 18B20. You will need to figure out which one is which. The serial number of the 18B20 is also a state, see attached screen shot.
To find out which is which hold one sensor into ice water or warm it, then check the change in temperature. -- it can take 2 minutes to change, depending on the sensor refresh setting in the rPi device edit.
Karl
SlaveOf value is indigoDeviceId indigoDeviceName
fixed:
rPi device edit had a typo introduced in 21.1
added One Last Thing:
you now can connect as many OneWire Temp sensors 18B20 to the rPi as you can fit cables into the box. The theoretical limit is 2**64, but only tested with 3.
-You need one resistor 4.7KOhm between pin1 and pin7 and connect to each of the signal wires ;
-connect V+ to pin1(+3.3)
-connect ground to any ground pin eg pin 11
to setup in indigo:
- create a new ONE 18B20 sensor as before.
- connect eg 5 18B20 devices to the rPi and you will get 4 extra indigo devices created. Their name will be the same as device1 + serial number of the 18B20. You will need to figure out which one is which. The serial number of the 18B20 is also a state, see attached screen shot.
To find out which is which hold one sensor into ice water or warm it, then check the change in temperature. -- it can take 2 minutes to change, depending on the sensor refresh setting in the rPi device edit.
Karl
SlaveOf value is indigoDeviceId indigoDeviceName
- Attachments
-
- Screen Shot 2016-07-09 at 19.53.40.png (55.7 KiB) Viewed 5185 times
Re: piBeacon: 3- presence monitoring download
posted v 1.22.5
fixed:
- in device edit menu pin 12 reads GPIO16 and not GPIO18. (the correct pin was selected, the display text was wrong)
- boot switch was working but created some overhead
- edit rpi -device caused error at save
Karl
fixed:
- in device edit menu pin 12 reads GPIO16 and not GPIO18. (the correct pin was selected, the display text was wrong)
- boot switch was working but created some overhead
- edit rpi -device caused error at save
Karl
Re: piBeacon: 3- presence monitoring download
V 1.22.9 posted:
added:
- support for DHT11 (besides DHT22)
- option to force install of all libs, opsys updates/upgrades: This will install all opsys updates, config all parameters feels, enable api/i2c .... and install adafruit libraries ...
This might take several hours depending on your internet speed - might need to download several GB for the api opuses
you can watch progress with:
Karl
added:
- support for DHT11 (besides DHT22)
- option to force install of all libs, opsys updates/upgrades:
Code: Select all
ssh [email protected]
sudo python installLibs.py force &This might take several hours depending on your internet speed - might need to download several GB for the api opuses
you can watch progress with:
Code: Select all
tail -f /var/log/installLibs.logRe: piBeacon: 3- presence monitoring download
posted new SSD image (top of this thread). No need to download if you have it running, Just for your next SSD.
-- latest jessie version (takes several hours to upgrade when you do it manually)
-- all py programs installed - latest version
Karl
-- latest jessie version (takes several hours to upgrade when you do it manually)
-- all py programs installed - latest version
Karl
Re: piBeacon: 3- presence monitoring download
posted new version 7-28-1
new:
1. groups of iBeacons. you can put each iBeacon into groups: Family, Guests, other1, other2. each group an be used as a trigger: allHpme, oneHome, oneAway, allAway and variables number of beacons home or away for each group
this allows to eg put your family members into a group and you can easily trigger if one or all are hpmw / away
2. displays
you can now attach small OLED or LARGE RGB-LED displays to the RPI. the plugin can send text graphics or lines, circles, images etc to the displays. They can flash, scroll, etc. You can use python, actions or the menu to send . you can also use %%v:variablename%% for data to be send to the displays
Also each temp/himidity.pressur or distance sensor can send its data direct to the display on the RPI w/o going to the plugin. (enable in edit sensor device)
Supported are
A) 16x16, ... 96x32 RGB LED Matrix - 3mm pitch PID: 2279 with RGB Matrix HAT + RTC for Raspberry Pi - Mini + good power supply 5Amps (THIS IS LARGE you can read it from 20 meters away)
B) Diymall 1.3" Inch Blue I2C IIC Serial 128X64 OLED
C) Diymall 0.96" Inch Yellow Blue I2c IIC Serial Oled
BUT NOT THE SPI OLED !!!
3. ultrasound distance sensor: Hc-sr04 Ultrasonic Distance Measuring Sensor (2cm .. 5m)
added better device setup for ADC input for MCP3008 chips. Each channel can not be its own device
4."basic security": beside no security and digest(default) it now supports also basic security communication from RPI to indigo If you don't know what it is, you are probably fine, use the default digest. have not tested the "basic" security mode as I am not using it, but it should work
5."99% of the field are now in /home/pi/pibeacon": only callbeacon.py and adafruit directories are left.
6."temp files on ramdisk": will create a ram disk for temp files /home/pi/pibeacon/temp/
to reduce writes to the SSD
7."log files on ramdisk": option to create a ram disk for /var/log. you select that in deice edit for the RPI
to reduces writes to the SSD
fixed:
various smaller things and more immune against bad applescripts
This will work under Indigo 5,6 7. Under 7 it will use 50% less CPU
In the coming days I will update the docu
Karl
new:
1. groups of iBeacons. you can put each iBeacon into groups: Family, Guests, other1, other2. each group an be used as a trigger: allHpme, oneHome, oneAway, allAway and variables number of beacons home or away for each group
this allows to eg put your family members into a group and you can easily trigger if one or all are hpmw / away
2. displays
you can now attach small OLED or LARGE RGB-LED displays to the RPI. the plugin can send text graphics or lines, circles, images etc to the displays. They can flash, scroll, etc. You can use python, actions or the menu to send . you can also use %%v:variablename%% for data to be send to the displays
Also each temp/himidity.pressur or distance sensor can send its data direct to the display on the RPI w/o going to the plugin. (enable in edit sensor device)
Supported are
A) 16x16, ... 96x32 RGB LED Matrix - 3mm pitch PID: 2279 with RGB Matrix HAT + RTC for Raspberry Pi - Mini + good power supply 5Amps (THIS IS LARGE you can read it from 20 meters away)
B) Diymall 1.3" Inch Blue I2C IIC Serial 128X64 OLED
C) Diymall 0.96" Inch Yellow Blue I2c IIC Serial Oled
BUT NOT THE SPI OLED !!!
3. ultrasound distance sensor: Hc-sr04 Ultrasonic Distance Measuring Sensor (2cm .. 5m)
added better device setup for ADC input for MCP3008 chips. Each channel can not be its own device
4."basic security": beside no security and digest(default) it now supports also basic security communication from RPI to indigo If you don't know what it is, you are probably fine, use the default digest. have not tested the "basic" security mode as I am not using it, but it should work
5."99% of the field are now in /home/pi/pibeacon": only callbeacon.py and adafruit directories are left.
6."temp files on ramdisk": will create a ram disk for temp files /home/pi/pibeacon/temp/
to reduce writes to the SSD
7."log files on ramdisk": option to create a ram disk for /var/log. you select that in deice edit for the RPI
to reduces writes to the SSD
fixed:
various smaller things and more immune against bad applescripts
This will work under Indigo 5,6 7. Under 7 it will use 50% less CPU
In the coming days I will update the docu
Karl
Re: piBeacon: 3- presence monitoring download
Karl,
Any chance for support for the new Tiles in the next version?
Thanks!
JP
Any chance for support for the new Tiles in the next version?
Thanks!
JP
Re: piBeacon: 3- presence monitoring download
One if my next projects.
...there is are YouTube how to replace the batteries in the old tiles. Requires a bit soldering but it works
Sent from my iPhone using Tapatalk
...there is are YouTube how to replace the batteries in the old tiles. Requires a bit soldering but it works
Sent from my iPhone using Tapatalk
Re: piBeacon: 3- presence monitoring download
Thanks. Looking forward to that version!
Will checkout the battery changing video.
JP
Will checkout the battery changing video.
JP
Re: piBeacon: 3- presence monitoring download
This will not be trivial.. the new Tiles do NOT send iBeacon signals.
I believe the packages they send are managed by the iPhone apps. The app puts them to sleep/ listening mode = reduces sending until asked to call back, or you press the sound button.
The scanners I am using (*) do not find the new tiles. only the old ones. Which scanner are you using to find the new tiles?
Karl
(*)LE-light-blue; eBeacon; BLEfinder
I believe the packages they send are managed by the iPhone apps. The app puts them to sleep/ listening mode = reduces sending until asked to call back, or you press the sound button.
The scanners I am using (*) do not find the new tiles. only the old ones. Which scanner are you using to find the new tiles?
Karl
(*)LE-light-blue; eBeacon; BLEfinder