Headless templates
Released on 2022-10-25
What better time to release headless hardware templates than the lead-up to Halloween!
Headless template
If you're working with CI/CD systems, have an addiction to tiling window managers, or just need a tool without a GUI - the new headless templates are made just for you!
Follow the headless quickstart guide for a deeper explanation of the template, or for advanced users, start poking around the node template:
arc init hello-headless --template node
The default template includes an example to test connecting to a device flashed with hello-blink
firmware, manipulating and reading the LED state while printing the led
message periodically, before closing.
eui@ubuntu-ct ~/hello-headless $ arc startsrc/main.ts → dist/index.js...created dist/index.js in 4.1s◼ EUI000: Connected to device completed in 0s 678ms◼ EUI000: Found and connected to 50018◼ EUI002: name: HelloEUI◼ EUI000: ┌ LED Sweep◼ EUI002: │ led switched after 30ms, state is 0◼ EUI002: │ led switched after 40ms, state is 0◼ EUI002: │ led switched after 50ms, state is 0[...]◼ EUI000: LED Sweep completed in 4s 504ms◼ EUI000: Tests complete◼ EUI000: Done in 5s 209ms
We expect to build out the documentation of the headless template over the next week, with the key focus on hardware-in-the-loop tests.
General fixes and changes
useDataSourceSubscription
hook'ssourceOutsideDomain
property is now correctly marked as optional.useQuery
anduseSendMessage
hooks now support usage outside of a DeviceContext.TimeSlicedLineChart
now supports a batch ingestion API- New utility functions have been added to help facilitate headless-template and low-level hardware access
@electricui/script-utilities
functions such assleep
,findAnyDevice
andstartDeviceSession
as used in the headless template.- Documentation will be updated over time to include the full public surface area, along with usage examples.
- New device management hooks have been added:
arc
has a new startup API (internal) which should be better suited to support a wider-range of template types going forward.arc
now has more consistent login error messages, improved messaging for incompatible templates.arc
includes ancompletion
command to generate autocompletion (tab completion) files.- i.e. Add
source <(arc completion bash)
to your.profile
for bash completion.
- i.e. Add
- Yarn
3.2.4
is specified by the template - Internal improvements to integration testing and screenshot testing.
The
@electricui/core-actions
library has been deprecated. This shouldn't impact you, as the API surface and usage was not made publicly available.
Documentation
Added new examples for custom ConnectionsCards,
and Mapbox.