I am trying to implement program with python on Raspberry Pi 3. Purpose is to scan near RuuviTag beacons automatically without hardcoding MAC addresses in code. I have studied https://github.com/ttu/ruuvitag-sensor and have been able to get data from beacon when MAC address is hardcoded.
Currently I’m wondering what would be best way to scan near beacons automatically and use their addresses. I have noticed that with command ruuvitag -l I can get MAC address and data of beacon. It seems I can’t use commands like ruuvitag -l | awk … or grep to get lines with json and mac address. Any ideas how to proceed with this? My purpose is to create app that automatically saves data from nearest beacons to text file.