π Overviewβ
Welcome to the @digital-alchemy
Home Automation quickstart project!
This project is designed to work with Supervised and HA OS based installs, where Addons are supported. If you used a different installation method, you will need to make tweaks to the process.
These instructions assume that Studio Code Server Addon has been installed on your setup, serving as both editor and workspace management tool.
Links!
π Setupβ
Note: The below command works for:
- Initial setup
- Fixing a broken environment
- Updating the
scripts
provided by quickstart repo with newer versions
Within the Code Server Addon:
- Open a terminal
- Press Ctrl-Shift-` (default keybind) to open a terminal, or go through
Menu
>Terminal
>New Terminal
- Press Ctrl-Shift-` (default keybind) to open a terminal, or go through
- Execute the command
curl -fsSL https://setup.digital-alchemy.app -o setup.sh; bash setup.sh
This script will:
- Install NodeJS on your system
- Pull down the starter template
- Install all necessary dependencies
- Add the local code runner addon as a local addon
The final install step is for you to install the addon.
π You are now able to run Typescript code on your Home Assistant instance! π Check out the next steps guide for an orientation on the project you just set up
πΊ In actionβ
No sound orientation videos, for a bit of context on what things should look like when everything goes right.
TLDR: Tldw: Setup Process Speed run of the setup process, taking a break to run the code manually and in the background with the addon
TLDR: Tldw: Editing Experience Have your editor provide handy suggestions about your current setup as you type
βοΈ Workspace Managementβ
Warning: The NodeJS environment within the Code Server addon does not survive reboots and may occasionally need to be set up again.
A script has been provided to restore your environment if something goes wrong.
./scripts/environment.sh
Also accessible as a task within VSCode as part of the workspace. Use
Tasks: Run Task
from the command palette to access
Once your environment is set up, you can use the commands in the package.json
to manage your workspace further.
NPM Command | Description |
---|---|
upgrade | βΊοΈ Upgrade all package.json dependencies -- Automatically runs type-writer afterwards |
develop | β© Run the development server from within the Code Server addon -- Not intended for long term deployments! |
develop:watch | π Run the development server in watch mode from within the Code Server addon -- Automatically restart server on code changes |
setup:addon | π Reinstall the code runner addon. -- Uses name in package.json to determine install path |
build | π¨ Create a build of your code in the dist/ folder -- Reports all the errors in your workspace |
build:deploy | ποΈ Create a build of your code in the deploy/ folder -- Addon has been set up to run from here |
lint | π± Check your workspace for non-critical issues |
lint:fix | πͺ Run eslint --fix to resolve minor issues |
type-writer | π¨οΈ Rebuild custom type definitions for Home Assistant -- Run any time you modify your setup for more accurate definitions |