My objective is to write a function that scans for a Bluetooth low energy device, extracts data from it, display it on my AutoPi dashboard and upload it to the cloud (from where I can extract it to my own db).
I tried to search documentation (and probably missed it) but not sure where this is documented
I just want to make sure
it is doable
I have the right overall component structure
So the steps
Install ble python modules for the PI (some like Adafruit BLE
Create a AutoPi custom code module that
Runs every x minutes while the dongle is operational
Scans fro BLE device and retrieves data
3). Create a trigger ?
From here I know I could report to my own cloud however I would like to make it available on the daashboard and upload to autopi.io and then retrieve from atopi.io
Am I on the right path or totally misunderstood the architecture
so no way to get the data into the autopi world (dashboard, cloud). It will only b3 6 bytes (3 if i am pushed ) and I would much rather use your existing cloud process (to save log on retry etc) but can absolutely do my own.
Well if anyone is watching and for future google searches.
I had tremendous problems getting python ble libraries running using https://github.com/IanHarvey/bluepy however I am happy to put that down to my lack of python knowledge.
So went to back to node.js and after some fun (40 degree day in Sydney, a very hot garage with very dodgy wifi, no 4 g coverage and a cat who would not take no as an answer )
The Noble (BLE for Node) package, a great fork by abandonware (you must use this one or you will get VERY VEY frustrated) https://github.com/abandonware/noble
And then got a simple script running that can scan for and connect to ble peripherals.
My thinking given I have a very short amount of time to get this running is that I will have a node.js script (initiated from a python job every 5 minutes) that runs and uploads to cloud,
A question - has anyone run a node script on the pi while running autopi. Is there an impact ?
Time for a beer after a very hot and frustrating (but successful) say
Hello Peter,
thank you for suggestion 'Implement the module in custom code'.
Can you please clarify, Does the standard AutoPi image includes pre-installed libraries like bluepy or beacontools for work with BLE scan ? or if not then does command line autopi module offers BLE scan functions?
I have only worked with devices that I have registered so not able to help here, I had it running on a device that was registered ( I remember an extremely hot pre Covid day in the car in the garage ; so it was running on the AutoPI)