diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json new file mode 100644 index 0000000..fe6cd4b --- /dev/null +++ b/.devcontainer/devcontainer.json @@ -0,0 +1,67 @@ +{ + "name": "tetele/onju-voice-satellite", + "image": "ghcr.io/esphome/esphome:latest", + "mounts": [ + "source=${localWorkspaceFolder}/esphome,target=/config,type=bind,consistency=cached", + "source=/etc/localtime,target=/etc/localtime,readonly,type=bind" + ], + "containerEnv": { + "DEVCONTAINER": "1", + "PIP_BREAK_SYSTEM_PACKAGES": "1", + "PIP_ROOT_USER_ACTION": "ignore" + }, + "runArgs": [ + "--privileged", + "-e", + "ESPHOME_DASHBOARD_USE_PING=1" + // uncomment and edit the path in order to pass though local USB serial to the conatiner + // , "--device=/dev/ttyACM0" + ], + "appPort": 6052, + // if you are using avahi in the host device, uncomment these to allow the + // devcontainer to find devices via mdns + //"mounts": [ + // "type=bind,source=/dev/bus/usb,target=/dev/bus/usb", + // "type=bind,source=/var/run/dbus,target=/var/run/dbus", + // "type=bind,source=/var/run/avahi-daemon/socket,target=/var/run/avahi-daemon/socket" + //], + + "customizations": { + "vscode": { + "extensions": [ + // yaml + "redhat.vscode-yaml", + // editorconfig + "editorconfig.editorconfig" + ], + "settings": { + "editor.formatOnPaste": false, + "editor.formatOnSave": true, + "editor.formatOnType": true, + "files.trimTrailingWhitespace": true, + "terminal.integrated.defaultProfile.linux": "bash", + "yaml.customTags": [ + "!secret scalar", + "!lambda scalar", + "!extend scalar", + "!remove scalar", + "!include_dir_named scalar", + "!include_dir_list scalar", + "!include_dir_merge_list scalar", + "!include_dir_merge_named scalar" + ], + "files.exclude": { + "**/.git": true, + "**/.DS_Store": true, + "**/*.pyc": { + "when": "$(basename).py" + }, + "**/__pycache__": true + }, + "files.associations": { + "**/.vscode/*.json": "jsonc" + } + } + } + } +} diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..3ee098b --- /dev/null +++ b/.editorconfig @@ -0,0 +1,13 @@ +root = true + +# general +[*] +end_of_line = lf +insert_final_newline = true +charset = utf-8 + +# YAML +[*.{yaml,yml}] +indent_style = space +indent_size = 2 +quote_type = double diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aeaebb2 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.pio \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..e44b6ce --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,11 @@ +# Contributing to the Onju Voice Satellite project + +The easiest way to contribute to this config is to set up a development environment. The recommended such environment is VSCode with devcontainers. + +1. Fork this repo +1. Open up VSCode and invoke the command palette (`Ctrl+Shift+P` or `Cmd+Shift+P`) +1. Use the `Clone repository in container volume...` command and provide your own fork as the repo + +Once the repo is cloned, an automated process will set up a development version of ESPHome which you can use in CLI mode. + +Modify the config and use commands such as `esphome compile /config/onju-voice.yaml` to generate the corresponding firmware. diff --git a/esphome/.gitignore b/esphome/.gitignore new file mode 100644 index 0000000..d8b4157 --- /dev/null +++ b/esphome/.gitignore @@ -0,0 +1,5 @@ +# Gitignore settings for ESPHome +# This is an example and may include too much for your use-case. +# You can modify this file to suit your needs. +/.esphome/ +/secrets.yaml