An integration for Home Assistant that allows devices running the Espruino JavaScript Interpreter to be controlled and programmed directly from Home Assistant, from anywhere in the world!
Ensure that your Home Assistant installation has the ability to scan for bluetooth devices. We'd recommend adding a few ESP32 devices running https://esphome.io/
NOTE: We're waiting to be submitted to HACS and there appears to be a long waiting list. Until submission, only Manual Installation will work.
Via HACS or manually copy espruino folder from latest release to custom_components folder in your config folder.
- Download the latest release as a zip
- Extract
custom_components/espruinofrom thatzipinto your Home Assistantconfigfolder - eghomeassistant/config/custom_components/espruino - Restart Home Assistant!
- Install this Integration
- Go to
Settings->Devices and Services - Click
+ Add Integrationand chooseEspruino
You should now have any Espruino device that advertises the 0x0590 manufacturer data (eg any with up to date firmware) listed in Settings -> Devices and Services under Discovered
- Click
Addnext to the newly discovered device. If yours isn't listed, click on theEspruinointegration below, thenAdd device,Set up another instance of Espruinoand you can select from any discovered Bluetooth device. Note that for it to work, it must be connectable and have theNordic UARTBluetooth Service that Espruino devices have by default. - In
Name and assignyou can set up your device name and where in your house it is.
Once added, each device has a text entity, for instance text.jolt_js_c904. If you set this to a JavaScript command, that command will be sent to the device to be executed immediately. For example if you set it to LED.set() the LED should get lit up.
However the main feature of the Espruino Integration is the IDE. Once installed, Home Assistant will have a new tab called Espruino. Click on it and you'll get the Espruino IDE. If you click the connect icon in the top left of the IDE, you'll see the usual Web Bluetooth connection icon, but also every device that's been added to the Espruino integration. Crucially you're connecting to these devices through Home Assistant's own Bluetooth, so you can program your devices at home from anywhere in the world.
We'd recommend that you set up your Espruino devices with BTHome (https://www.espruino.com/BTHome) as it provides a great way for them to transfer data back as entities that appear in Home Assistant. The BTHome library for Espruino will work alongside the Espruino integration as long as you leave your device as connectable:true in NRF.setAdvertising.