You could also try sudo /etc/init.d/bluetooth restart at the console which should restart the Bluetooth service and would automatically disconnect if it has stayed connected to the device for some reason.
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.
That's odd - only difference I can see is when I used it, I typed in a lowercase address. Could you try that?
In https://github.com/rlangoy/bluepy_examples_nRF51822_mbed/blob/master/writeLed2.py that I based it on there's a try...finally for disconnection but the exception that's reported is from earlier in the code, so that wouldn't have caused an issue.
You could also try
sudo /etc/init.d/bluetooth restart
at the console which should restart the Bluetooth service and would automatically disconnect if it has stayed connected to the device for some reason.