piBeacon: 3- presence monitoring download

User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

added features / changes in v2022.180.109 @ 2024-10-10
==================================================


1. fixed battery level for iSensor types
2. fixed bug where beacons where not recognized fast enough after being away .
3. added battery level values for devcies that have lowBattery info: if low bat: set batterylevel to 5%, otherwise 100%


added features / changes in v2022.180.108 @ 2024-10-07
==================================================


1. clean up code, handle some exceptions faster on RPI
2. added states:
xxxstateMinAt xxxstateMaxAt , shows time stamp when value was at min today and yesterday
xxxstate = temperature, humidity, pressure, illumination ....
3. added option to enable / disable states xxMin/xxMax/ xxchanged10Minute/ .. for xx = states like Temperature Humidity, Pressure, CO2, illuminance ...
this can reduce many state updates
4. added rpi name (besides number) to warning message rpi power propblem

5. added device edit option in beacon edit for BLE beacon + sensor devcies like ruuvi, KKM button .. to (not) create sensor child devices ie for button temp etc information.
e.g. if you dont want to use that sensor function, only interesed in the ebacon / presence info.
6. removed some orphan text in device.xml and set display default to the proper options
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

added features / changes in v2022.181.111 @ 2024-11-06
==================================================

1. added support for voice recognition sensor DF2301Q
voice commands can be used to trigger indigo action. all data is local, recognition is done by the onboard chip
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

Code: Select all

1. added option to set lastBatteryReplaced datet ime stamp for devices in menu (select beacon from list shown) or in beacon device edit.
2. voice recognition sensor DF2301Q: added support for uart/serial interface;  improved help menues etc 
   added option to set a GPIO output to switch on an LED when a phrase is recognized (any phrase or specific)
   added option to switch gpios on/off if specific voice commands (4) are received, eg turn the lights on (id#103) --> toggle gpio 21
   added option to set timing parameters  in device edit to adopt to different circumstances (experts only)
   added check if serial/uart port is properly defined, if not a waring is printed in indigo log file
      and try to fix by adding enable_uart=1 to /boot/(firmware)/config.txt if not present
   added check for directory for config.txt,  was /boot , with recent op-sys it is /boot/firmware/
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

added features / changes in added features / changes in v2022.183.126 @ 2025-01-11
==================================================

1. fixed exception situations for DF2301Q, eg when sensor hangs etc.
this is now very stable and can recover from power disconnects, sensors issues, due to reset commands discovered
VERY stabile and reliable with the serial / uart connection.
the i2c interface still creates problems on older RPI < 4

I now have 5 of these spread through out my home: doing lights on/off, open doors, start coffee machine etc.. anything that an indigo action can do.

Karl
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

posted at: https://github.com/kw123/pibeacon/relea ... 22.184.130

Code: Select all

added features / changes in added features / changes in v2022.184.130 @ 2025-02-07
==================================================

1. this version will fully configure a new micro SSD. No need to for any raspi-config to set OneWire, i2c on/off, or install new libraries.
    it supports RPI-OS 11(bullseye) and 12 (bookworm) 32 bit and 64 bit
    The module GPIO is not supported by the new OSes anymore. The programs on the PRI now uses PIGPIO and GPIOZERO to write and read pins on the rpi - that was a major effort.
    Older OSes are still supported with GPIO. So no need to upgrade the RPI OS. but I suggested to at least V11 for security updates on your RPI.

2. added menu and action to set any pibeacon device state, just in case

3. added a delayed "off" for itrack / musegear beacons. When you press the button these beacons will send an on and after 60 secs an off.
   if you leave the house fast and the off does not reach the RPI receiver anymore the beacon state stays ON. At the next button press  nothing will happen as the state is already ON
   This was fixed with a delayed action in the plugin. If the onOffState is not going to an off after 50 secs (no off from the beacon received as it is out of reach) the plugin will set the onOffState to off.

4. fixed some config exceptions for OneWire sensors. All config is done automatically. No need for raspi-config, also if several GPIOs are used to read many oneWire sensors
   I have one RPI with 21 oneWire sensors connected to 11 GPIOs to speed up reading to make signal errors on the wire less frequent (2 sensors on one pin not 21)

5. Changed state "lastUpdateBatterylevel": only do update once a day or when changed. 
   this is to cover ie musegear / iTrack beacons. They send battery level with every package, but it only gets changed after a button press or a connect.
   the plugin uses both message as well as connect to beacon through BLE. This is scheduled 3 times a day, but only when last update is older than 17 hours.
   To avoid preventing a "real" update the battery info is used only once a day or when changed.
Karl
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

added features / changes in added features / changes in v2022.184.138 @ 2025-04-10
==================================================


1. this version will FULLY CONFIGURE a new micro SSD. No need to for any raspi-config to set Onewire, i2c, on/off or install new libraries.
it supports RPI-OS 11(bullseye) and 12 (bookworm) 32 bit and 64 bit
The module GPIO is not supported by the new OSes anymore. The programs on the PRI now uses PIGPIO and GPIOZERO to write and read pins on the rpi - that was a major effort.
Older OSes are still supported with GPIO. So no need to upgrade the RPI OS. But suggested to at least V11(bullseye) for security updates on your RPI.

2. added menu and action to set any pibeacon device state, just in case

3. added a delayed "off" for itrack / musegear beacons. When you press the button these beacons will send an on and after 60 secs an off.
if you leave the house fast and the off does not reach the RPI receiver anymore the beacon state stays ON. At the next button press nothing will happen as the state is already ON
This was fixed with a delayed action in the plugin. If the onOffState is not going to an off after 50 secs (no off from the beacon received as it is out of reach) the plugin will set the onOffState to off.

4. fixed some config exceptions for oneWire sensors. All config is done automatically. No need for raspi-config, also if several GPIOs are used to read many oneWire sensors
I have one RPI with 21 oneWire sensors connected to 11 GPIOs to speed up reading to make signal errors on the wire less frequent (2 sensors on one pin not 21)

5. changed state "lastUpdateBatterylevel": only do update once a day or when changed.
this is to cover ie musegear / iTrack beacons. they send battery level with every package, but it only gets changed after a button press or connect.
the plugin uses both message as well as connect to beacon through ble. this is scheduled 3 times a day, but only when last update is older that 17 hours.
to avoid preventing a "real" update the battery info is used only once a day or when changed.

6. made ALL functions methods etc py3 and latest rpi op-sys(bookworm) compatible

7. fixed some formatting eg Co2 -> CO2

8. added AUTO RECOVERY when an rpi ssd is replaced. the ssd on the rpi will be automatically configured.
You still need to make the SSD with the Raspberry Pi Imager
The userid, password and ip # has to setup correctly in the plugin. ANYTHING else is automated.

9. reduced logging on rpi for display.py

10. added TREND states: xxx_trend states for xxx = temperature humidity, pressure ...
it shows vvvv,vvv,vv,v, = ^,^^,^^^,^^^^ for -8*x,-4*x....+8*x depending on changes of the state value in the last yy minutes. in device edit you can set time window (yy) and % change (x) to set limits for ^ v etc .

11. the plugin is not using the mac number anymore to ID the RPI. that created some issues when you used more than one BLE dongle (for BLECONNECT+ regular).
Sometimes a BLE dongle could be down and then the RPI would switch mac number to the one up and running. before the Plugin would switch the mac number (checking all kinds of things),
but under certain circumstances it would get confused and replace the RPI device with a beacon devce.
Now the plugin uses the RPI# (1-30) to ID the RPI and will use the submitted MAC number by the RPI as the current one.

12. added option to start any unix command on an rpi with the voice sensor, eg when light on is received a GPIO on or any command can be executed directly on that RPI
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

next major sensor add:

https://github.com/DFRobot/DFRobot_Gest ... /README.md

That's a gesture detection sensor, detects 5 different hand gestures
cost ~$15
all is local, no internet connection needed, communication to sensor via Serial or I2C
That is the sibling of the voice sensor.

If this works as well as the voice sensor, this is a major add-on.

I will try to get this done soon, but might take till mid of May, as I am out for some weeks, visiting grandchild

Karl
User avatar
jay (support)
Site Admin
Posts: 19232
Joined: Wed Mar 19, 2008 11:52 am
Location: Austin, Texas
Contact:

Re: piBeacon: 3- presence monitoring download

Post by jay (support) »

That sounds cool!
Jay (Indigo Support)
Twitter | Facebook | LinkedIn
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

added features / changes in added features / changes in v2022.185.138 @ 2025-04-24
==================================================

1. added first beta version for face gesture sensor from df robot
it works basically and can be used. exception handling etc is not done properly yet ( restart, disconnect ...)
it supports recognition of up to 10 faces and and gestures (1-5)
* - 1: LIKE (👍) - blue
* - 2: OK (👌) - green
* - 3: STOP (🤚) - red
* - 4: YES (✌️) - yellow
* - 5: SIX (🤙) - purple

Karl
I will be out for 2 weeks playing with grandchild
https://github.com/kw123/pibeacon/relea ... 24.185.138

its about $15 + import tariffs
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

latest release always at: https://github.com/kw123/pibeacon/releases

added features / changes in added features / changes in v2022.185.139 @ 2025-04-24
==================================================
1. fully support face and gesture sensor together with DF2301Q
- Have a box with 3 DF2301Q connected through USB to serial converters and one face gesture sensor on i2c
-- it drives a somfy RF remote (up/down/stop) through gpio and opto couplers hat simulate button presses.
- Both sensor have an option to drive directly gpios on the rpi or issue unix commands, set in device edit.
- As the i2c connection is not stable (hangs about 1/day) you have the option to reset the sensor through a relay that toggles the power, see drawing.
-- that is done automatically when detected, automatically fixed within < 10 secs

2. various little improvements
-exception handling
-fixed python compiler warnings (different return types etc)

circuit for my gesture + 3 voice sensor setup:
Screenshot 2025-07-08 at 12.28.33.png
Screenshot 2025-07-08 at 12.28.33.png (97.29 KiB) Viewed 735 times
connection to SomFy remote:
Screenshot 2025-07-09 at 22.19.35.png
Screenshot 2025-07-09 at 22.19.35.png (266.79 KiB) Viewed 735 times
the box:
Screenshot 2025-07-09 at 22.23.17.png
Screenshot 2025-07-09 at 22.23.17.png (306.54 KiB) Viewed 735 times
Screenshot 2025-07-09 at 22.25.22.png
Screenshot 2025-07-09 at 22.25.22.png (437.24 KiB) Viewed 735 times
you can see 2 holes on 2 sides for the mics and the bigger hole for the face gesture sensor
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

added features / changes in added features / changes in v2022.186.141 @ 2025-09-05
==================================================
1. added option to fix a screwed up RPI situation where 2 rpi have the same RPI# (0-19)
2. added option to have multiple FACE and GESTURE sensors connected to the RPi,
using USB to serial converters. I have implemented 3 voice and one gesture sensor.
All sensors must be the same type connected to the USB to serial converters.

added features / changes in added features / changes in v2022.185.141 @ 2025-08-03
==================================================
1. File "plugin.py", line 18838, in handleRPIMessagePart
existingPiDev = indigo.devices[existingIndigoId]


added features / changes in added features / changes in v2022.185.140 @ 2025-04-24
==================================================
1. fully support face and gesture sensor together with DF2301Q
Have a box with 3 DF2301Q connected through USB to serial converters and one face gesture sensor on i2c
it drives a somfy RF remote (up/down/stop) through gpio and opto couplers hat simulate button presses.
Both sensor have an option to drive directly gpios on the rpi or issue unix commands, set in device edit.
As the i2c connection is not stable (hangs about 1/day) you have the option to reset the sensor through a relay that toggles the power, see drawing.
that is done automatically when detected

2. various little improvements
exception handling
fixed python compiler warnings (different return types etc)
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

dded features / changes in added features / changes in v2022.187.148 @ 2025-11-04
==================================================
1. added special action. menu to move switchbot curtain3 very slow / slow / fast
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

Added features / changes in added features / changes in v2022.189.151 @ 2025-11-12
==================================================
1. added support for ruuvi air sensor (T,H,P,CO2,NOx,VOC, PM2.5)
ruuvi data type 06 BLE message
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

Added features / changes in added features / changes in v2022.191.161 @ 2026-01-18
==================================================
1. added sensor switchbot mm wave occupancy BLE sensor
has option to update state "occupancy duration" continuously every xxscs until occupancy is off, set option in devce edit
you can do a trigger on dev State "occupancyDuration" any change and condition dev state" "onOffState" = true
then you get a trigger every xx secs.
After occupancy is gone you can see how long someone was in the room

These type of sensors (mm Wave ~ >30 GHz frequency) are not light or temperature (infrared) sensitive. They measure the time traveled from send to receiving waves similar to an ultrasound sensor.

2. added delay ON state change in addition to delay OFF state
User avatar
kw123
Posts: 8705
Joined: Sun May 12, 2013 4:44 pm
Location: Dallas, TX
Contact:

Re: piBeacon: 3- presence monitoring download

Post by kw123 »

Added features / changes in added features / changes in v2022.191.171 @ 2026-07-13
==================================================
1. harmless shell warnings on stderr (e.g. shell-init/getcwd after the plugin folder was replaced
under the running plugin) are no longer treated as ssh/sftp errors -> no more false
"fixHostsFile" log blocks for every rpi
2. the pi password is now masked in the fixHostsFile diagnostic log message
3. reminder: when the plugin bundle is replaced manually or via sync (not via the Indigo installer),
reload the plugin afterwards
4. added function to beep switchbot remote button

Added features / changes in added features / changes in v2022.191.170 @ 2026-07-13
==================================================
1. code cleanup release, no new features
2. removed all python2 u"..." string prefixes (217 occurrences in 45 files); no unicode() usage left
3. fixed misplaced comment "#" in plugin.py checkSensortoPi that created an undefined name

Added features / changes in added features / changes in v2022.191.169 @ 2026-07-04
==================================================
1. bug fix release, no new features
2. fixed many format errors in log messages (missing {} placeholders, wrong argument order, invalid format specs)
3. fixed undefined variable bugs (NameError) in plugin.py and several pi/*.py programs
e.g. BLE KKM button events, syncSensors device-to-pi sync, sftp file transfer, gatttool retry cleanup,
FaceGesture USB port scan, launchpgm, neopixel off(), LM75A init
4. fixed missing imports (subprocess, sys, serial, GPIO, U. prefixes)
5. removed unused "from ctypes import *" (DF2301Q, FaceGesture) that hid errors from checkers
6. completed serial MH-Z19 branch in mhzCO2.py (wrong class names, added start(), valid range)
7. removed python2 leftovers (raw_input, long, unicode, lowercase true/false)

Added features / changes in added features / changes in v2022.191.168 @ 2026-05-25
==================================================
1. reduced frequency for writing changedValues.json to prefs directory from 1/minute to 1 per day or restart


Added features / changes in added features / changes in v2022.191.167 @ 2026-04-09
==================================================
1. fixed tag for ble ruuvi tag tag pos was 9 should be 8 do not know why this was wrong
2. some smaller format etc fixes
3. added debug for set sensor icon color
4. added check to fix wrong comparison ie "< =" instead of "<=" in set sensor icon color
5. when sensor icon color is ste to blank temp, hum /light/ auto select sensor icon will be restored (after plugin restart of device edit and save )
Post Reply

Return to “piBeacon”