piBeacon: presence monitoring plugin discussions

Posted on
Sat Aug 10, 2019 7:21 pm
GlennNZ offline
Posts: 600
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: piBeacon: presence monitoring plugin discussions

Hi Karl,

Hope all is well.

I had a thought regarding pulling Bluetooth Device data into Indigo - what started it off was a Bluetooth Car Battery monitor. I thought it would be great to get this data into Indigo and then could add to control page/alert as usual when everything not okay. The one I have setup is Masons https://www.supercheapauto.com.au/p/mat ... 40712.html.

I immediately thought of piBeacon - and wondered whether this might be possible.

I see that essentially you have done this already with BLEsensor.py and the BlueZ sensor!

Any chance of opening these packets up to a genericBLESensor and we can figure out the packets ourself?
Still in the process and sorting out what means what - in my case should be straight-forward single packet I would hope......

Would think there may be a whole lot of Bluetooth devices which we could connect to Indigo via pibeacon and rpi....

Thanks for considering!

Glenn

Posted on
Sat Aug 10, 2019 7:55 pm
kw123 offline
User avatar
Posts: 6486
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

looks like no api, only iphone/ android app that can be downloaded.

if you can get an api, it might be possible..

BUT sofar pibeacon only listens, does not attach to sensor. - besides BLEconnect, that does a simple "teaser" to the phone and checkss if it answers, gets the signal strength from that package .. that's all.

The only "sensor" I found that is dumb and only sends broadcasts is the BLEsensor temp sensor. It sends once per minute a package that just has 2 more bytes than the iBeacon msg (for temp)

Karl

Posted on
Sat Aug 10, 2019 8:46 pm
GlennNZ offline
Posts: 600
Joined: Dec 07, 2014
Location: Central Coast, Australia

Re: piBeacon: presence monitoring plugin discussions

Thanks Karl

Ah Okay - didn't release blueZ didn't connect.

Having issues connecting with hcitool and have moved to bluetoothctl (which seems available on the Pi's and more popular)
Connected/paired very easily, just thinking about getting data... still..

Code: Select all
[bluetooth]# connect 78:04:73:09:24:C0
Attempting to connect to 78:04:73:09:24:C0
[CHG] Device 78:04:73:09:24:C0 Connected: yes
Connection successful
[NEW] Primary Service
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service000c
   00001801-0000-1000-8000-00805f9b34fb
   Generic Attribute Profile
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service000c/char000d
   00002a05-0000-1000-8000-00805f9b34fb
   Service Changed
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service000c/char000d/desc000f
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[NEW] Primary Service
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0010
   0000180a-0000-1000-8000-00805f9b34fb
   Device Information
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0010/char0011
   00002a23-0000-1000-8000-00805f9b34fb
   System ID
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0010/char0013
   00002a24-0000-1000-8000-00805f9b34fb
   Model Number String
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0010/char0015
   00002a25-0000-1000-8000-00805f9b34fb
   Serial Number String
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0010/char0017
   00002a26-0000-1000-8000-00805f9b34fb
   Firmware Revision String
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0010/char0019
   00002a27-0000-1000-8000-00805f9b34fb
   Hardware Revision String
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0010/char001b
   00002a28-0000-1000-8000-00805f9b34fb
   Software Revision String
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0010/char001d
   00002a29-0000-1000-8000-00805f9b34fb
   Manufacturer Name String
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0010/char001f
   00002a2a-0000-1000-8000-00805f9b34fb
   IEEE 11073-20601 Regulatory Cert. Data List
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0010/char0021
   00002a50-0000-1000-8000-00805f9b34fb
   PnP ID
[NEW] Primary Service
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023
   0000fff0-0000-1000-8000-00805f9b34fb
   Unknown
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char0024
   0000fff1-0000-1000-8000-00805f9b34fb
   Unknown
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char0024/desc0026
   00002901-0000-1000-8000-00805f9b34fb
   Characteristic User Description
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char0027
   0000fff2-0000-1000-8000-00805f9b34fb
   Unknown
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char0027/desc0029
   00002901-0000-1000-8000-00805f9b34fb
   Characteristic User Description
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char002a
   0000fff3-0000-1000-8000-00805f9b34fb
   Unknown
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char002a/desc002c
   00002901-0000-1000-8000-00805f9b34fb
   Characteristic User Description
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char002d
   0000fff4-0000-1000-8000-00805f9b34fb
   Unknown
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char002d/desc002f
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char002d/desc0030
   00002901-0000-1000-8000-00805f9b34fb
   Characteristic User Description
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char0031
   0000fff5-0000-1000-8000-00805f9b34fb
   Unknown
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0023/char0031/desc0033
   00002901-0000-1000-8000-00805f9b34fb
   Characteristic User Description
[NEW] Primary Service
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034
   f000ffc0-0451-4000-b000-000000000000
   Vendor specific
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0035
   f000ffc1-0451-4000-b000-000000000000
   Vendor specific
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0035/desc0037
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0035/desc0038
   00002901-0000-1000-8000-00805f9b34fb
   Characteristic User Description
[NEW] Characteristic
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039
   f000ffc2-0451-4000-b000-000000000000
   Vendor specific
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003b
   00002902-0000-1000-8000-00805f9b34fb
   Client Characteristic Configuration
[NEW] Descriptor
   /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c
   00002901-0000-1000-8000-00805f9b34fb
   Characteristic User Description
[CHG] Device 78:04:73:09:24:C0 UUIDs: 00001800-0000-1000-8000-00805f9b34fb
[CHG] Device 78:04:73:09:24:C0 UUIDs: 00001801-0000-1000-8000-00805f9b34fb
[CHG] Device 78:04:73:09:24:C0 UUIDs: 0000180a-0000-1000-8000-00805f9b34fb
[CHG] Device 78:04:73:09:24:C0 UUIDs: 0000fff0-0000-1000-8000-00805f9b34fb
[CHG] Device 78:04:73:09:24:C0 UUIDs: f000ffc0-0451-4000-b000-000000000000
[CHG] Device 78:04:73:09:24:C0 ServicesResolved: yes
[CHG] Device 78:04:73:09:24:C0 Modalias: bluetooth:v000Dp0000d0110


Code: Select all
[Battery Monitor]# select-attribute /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c
[Battery Monitor:/service0034/char0039/desc003c]# read
Attempting to read /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c
[CHG] Attribute /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c Value: 0x49
[CHG] Attribute /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c Value: 0x6d
[CHG] Attribute /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c Value: 0x67
[CHG] Attribute /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c Value: 0x20
[CHG] Attribute /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c Value: 0x42
[CHG] Attribute /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c Value: 0x6c
[CHG] Attribute /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c Value: 0x6f
[CHG] Attribute /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c Value: 0x63
[CHG] Attribute /org/bluez/hci0/dev_78_04_73_09_24_C0/service0034/char0039/desc003c Value: 0x6b
  49 6d 67 20 42 6c 6f 63 6b                       Img Block       
[Battery Monitor:/service0034/char0039/desc003c]#


Sorry about spam - another thread?

Posted on
Sat Aug 10, 2019 9:00 pm
kw123 offline
User avatar
Posts: 6486
Joined: May 12, 2013
Location: Dallas, TX

Re: piBeacon: presence monitoring plugin discussions

I am busy until early September. Then I am done with my big project.

Have done little for pibeacon and all the other things in the last 6 months.


Karl

Posted on
Fri Aug 16, 2019 5:04 pm
kw123 offline
User avatar
Posts: 6486
Joined: May 12, 2013
Location: Dallas, TX

piBeacon: presence monitoring plugin discussions

just a quick update .. regarding raspberry pi4

I got 2 in the mail and they seem to work fine. No pibeacon issues (iBeacon, BLEconnect work fine)!
Install took ~ 4 minutes and all libs where installed,

Tested an BME680 BME280 i2c sensors and oneWire , they seem to work fine.

And this thing gets hot, you need the cpu heat sink if not a fan.

But I need to go through the detailed testing.. at least for some more of the sensors

pibeacon generates about 3% cpu load

BUT::::

1. you can not use any intelligent USB-C power supply. - they do not work. It's a bug in the hardware . Only very simple ones work, old USB do not work.

2. the POE solutions work, I got 3 ($12, 25, $39 = more than the RPI!) , and will go through them.
the RPi-4 uses ~ 5 watt = 1 amp at this low cpu load. RPI 2 types use ~ 2.0 watts

3. you must use the latest OS. The previous SSDs will not work.


I will need some time to go through the testing, then publish the new SSD for RPI4 etc.


Karl

Who is online

Users browsing this forum: No registered users and 1 guest