|
2 | 2 |
|
3 | 3 | **⚠️ WARNING: This is a PUBLIC repository! Never commit personal information, credentials, API keys, or proprietary content to this repository.** |
4 | 4 |
|
| 5 | +## Running Dotfiles |
| 6 | + |
| 7 | +**CRITICAL: NEVER run `chezmoi` directly. ALWAYS use `./install.sh` to apply changes.** |
| 8 | + |
| 9 | +```bash |
| 10 | +# Correct - always use this: |
| 11 | +./install.sh |
| 12 | + |
| 13 | +# WRONG - never do this: |
| 14 | +chezmoi apply # NO! |
| 15 | +``` |
| 16 | + |
| 17 | +The install script handles chezmoi installation, profile detection, and proper initialization. Running chezmoi directly will fail or produce incorrect results. |
| 18 | + |
| 19 | +## Git Commits |
| 20 | + |
| 21 | +**NEVER automatically commit changes to this repository.** Always wait for explicit user approval before committing. Present the changes and ask if they should be committed. |
| 22 | + |
5 | 23 | ## Installation Hierarchy |
6 | 24 |
|
7 | 25 | 1. **chezmoi first**: Always use chezmoi for installations and configuration management |
@@ -171,6 +189,70 @@ Claude Code automatically manages marketplace updates. The repository in `~/.cla |
171 | 189 | - Repository is owned by you and fully under your control |
172 | 190 | - Never commit sensitive data to plugin repositories |
173 | 191 |
|
| 192 | +## Home Assistant Integration (Desktop Profile) |
| 193 | + |
| 194 | +The OpenDeck Stream Deck configuration includes Home Assistant integration for controlling lights via the second encoder knob. |
| 195 | + |
| 196 | +For OpenDeck profile format details (encoder context format, button layout), see `dot_config/opendeck/README.md`. |
| 197 | + |
| 198 | +### Credentials Storage |
| 199 | + |
| 200 | +**IMPORTANT**: Home Assistant credentials are stored locally and are NOT managed by chezmoi or committed to the repository. |
| 201 | + |
| 202 | +Credentials are stored at: `~/.config/home-assistant/credentials` |
| 203 | + |
| 204 | +This file contains: |
| 205 | +```bash |
| 206 | +HA_URL="http://your-ha-instance:8123" |
| 207 | +HA_TOKEN="your_long_lived_access_token" |
| 208 | +HA_LIGHT_ENTITY="light.your_light_entity" |
| 209 | +``` |
| 210 | + |
| 211 | +### Setup |
| 212 | + |
| 213 | +During `chezmoi apply`, you'll be prompted for Home Assistant credentials if not already configured: |
| 214 | + |
| 215 | +1. **Home Assistant URL**: Your HA instance URL (e.g., `http://192.168.1.100:8123`) |
| 216 | +2. **Long-lived access token**: Create one in HA under Profile → Long-Lived Access Tokens |
| 217 | +3. **Light entity ID**: The entity you want to control (e.g., `light.office`) |
| 218 | + |
| 219 | +You can skip the prompt (Ctrl+C) and configure later by creating the credentials file manually. |
| 220 | + |
| 221 | +### Stream Deck Controls |
| 222 | + |
| 223 | +- **Encoder 1 (left)**: Volume control - rotate to adjust, press to mute |
| 224 | +- **Encoder 2**: Light control - rotate to dim, press to toggle on/off |
| 225 | + |
| 226 | +### Manual Configuration |
| 227 | + |
| 228 | +If you skipped the interactive setup or need to update credentials: |
| 229 | + |
| 230 | +```bash |
| 231 | +mkdir -p ~/.config/home-assistant |
| 232 | +cat > ~/.config/home-assistant/credentials << 'EOF' |
| 233 | +HA_URL="http://your-ha-instance:8123" |
| 234 | +HA_TOKEN="your_long_lived_access_token" |
| 235 | +HA_LIGHT_ENTITY="light.your_light_entity" |
| 236 | +EOF |
| 237 | +chmod 600 ~/.config/home-assistant/credentials |
| 238 | +``` |
| 239 | + |
| 240 | +### Getting a Long-Lived Access Token |
| 241 | + |
| 242 | +1. Open your Home Assistant instance |
| 243 | +2. Click your profile (bottom left) |
| 244 | +3. Scroll to "Long-Lived Access Tokens" |
| 245 | +4. Click "Create Token" |
| 246 | +5. Give it a name (e.g., "Stream Deck") |
| 247 | +6. Copy the token immediately (it won't be shown again) |
| 248 | + |
| 249 | +### Security Notes |
| 250 | + |
| 251 | +- Credentials file has 600 permissions (owner read/write only) |
| 252 | +- The `~/.config/home-assistant/` directory is NOT managed by chezmoi |
| 253 | +- Never commit credentials to any repository |
| 254 | +- The token grants full API access to your HA instance - keep it secure |
| 255 | + |
174 | 256 | ## Testing |
175 | 257 |
|
176 | 258 | ### Testing Workflow |
|
0 commit comments