Also, for the unhandled promise, can you try changing characteristic.writeValue(val); to return ?characteristic.writeValue(val);? I think that'll be the problem - looks like all Espruino's docs need updating as none of them mentioned that.
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'll give it a try and update.