I can easily second @Ollie in both: still to consider Espruino for the 'interface' between a local brain device and the things to control, last but not least because it is frugal power consumption, especially when you go BLE for communication - battery driven / cordless - and for the 'decent' local brain you go for a Rasp Pi that can be power connected all the time.
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 can easily second @Ollie in both: still to consider Espruino for the 'interface' between a local brain device and the things to control, last but not least because it is frugal power consumption, especially when you go BLE for communication - battery driven / cordless - and for the 'decent' local brain you go for a Rasp Pi that can be power connected all the time.