Have an app on the Pi that scans Bluetooth and then acts on the data received. There are a few ways to do that, but maybe the easiest is this one: https://www.espruino.com/BLE+Advertising
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
I think you've basically got two options:
Hope that's some help!