What about using the EspruinoHub for this?
A BLE -> MQTT bridge for Raspberry Pi and other Embedded devices
https://github.com/espruino/EspruinoHub
@MaBe started
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.
What about using the EspruinoHub for this?
A BLE -> MQTT bridge for Raspberry Pi and other Embedded devices
https://github.com/espruino/EspruinoHub