Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ rendering, and CLI dispatch separate.
## Public/private boundary

Public files may contain documentation-only values such as `192.0.2.10` and
generic example names. Site inventory belongs in the private `home-ops` repo.
Secrets may live in the private `home-ops` configuration deployed mode `0600`,
generic example names. Site inventory belongs in the private `home-config` repo.
Secrets may live in the private `home-config` configuration deployed mode `0600`,
but never in this public repository, logs, issues, or command output.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@ Python 3.11 or newer is required by the current implementation.
## Install

```bash
cd /path/to/private/home-ops
cd /path/to/private/home-config
./bin/bootstrap-ctls switchctl
```

The private `home-ops` bootstrap is the canonical installer: it populates the
The private `home-config` bootstrap is the canonical installer: it populates the
real switch inventory, calls this repository's stable `script/install`
contract, and creates `/usr/local/bin/switchctl` backed by an isolated system
environment under `/usr/local/lib/home-ops/ctls`.
environment under `/usr/local/lib/home-config/ctls`.

## Configure private switches

Expand All @@ -62,7 +62,7 @@ Store each Tuya local key directly in the private mode-`0600` configuration:
```

The public repository and command output must never contain or print real keys.
The private `home-ops` repository is the deployment source of truth and its
The private `home-config` repository is the deployment source of truth and its
bootstrap installs the complete configuration without runtime environment
variables.

Expand Down
4 changes: 2 additions & 2 deletions docs/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
## Config is not found

Create `/usr/local/config/switchctl/config.json` from the public example, install the
private home-ops inventory, or set `SWITCHCTL_CONFIG`. Repository-local runtime
private home-config inventory, or set `SWITCHCTL_CONFIG`. Repository-local runtime
configuration is intentionally unsupported.

## A local key is missing

Add the target's `local_key` to the private source configuration, run the
`home-ops` bootstrap, and confirm `/usr/local/config/switchctl/config.json` is
`home-config` bootstrap, and confirm `/usr/local/config/switchctl/config.json` is
owned by the operating user with mode `0600`. Never paste the key into logs.

## A device is unreachable
Expand Down
9 changes: 5 additions & 4 deletions runbooks/tuya-local-setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@ current instructions before creating cloud resources.
- protocol version; and
- switch datapoint, commonly but not universally `1`.

Names, addresses, identifiers, and room metadata belong in the private
`home-ops` inventory. Local and cloud keys do not belong in Git at all.
Names, addresses, identifiers, room metadata, and local keys belong in the
private `home-config` inventory. Cloud-extraction credentials and generated
vendor snapshots do not belong in Git.

## 1. Pair a test device

Expand All @@ -38,7 +39,7 @@ Save TinyTuya cloud extraction credentials only in:
```

Use the format expected by the installed `tinytuya` release and set mode `0600`.
Do not put this file in `home-ops` or any other Git repository.
Do not put this extraction file in `home-config` or any other Git repository.

## 4. Discover and extract

Expand All @@ -59,7 +60,7 @@ rather than copying an environment-specific script into public documentation.

## 5. Record private inventory

Add the endpoint to private `home-ops` switch configuration with its meaningful
Add the endpoint to private `home-config` switch configuration with its meaningful
local name, role, room, host, device ID, local key, protocol version, and
datapoint:

Expand Down
4 changes: 2 additions & 2 deletions script/install
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ set -eu
repo_root=$(CDPATH= cd -- "$(dirname -- "$0")/.." && pwd)
name=switchctl
install_prefix=${CTL_INSTALL_PREFIX:-/usr/local}
venv_root=${CTL_VENV_ROOT:-$install_prefix/lib/home-ops/ctls}
venv_root=${CTL_VENV_ROOT:-$install_prefix/lib/home-config/ctls}
bin_dir=${CTL_BIN_DIR:-$install_prefix/bin}
venv="$venv_root/$name"
python=${PYTHON:-python3}
Expand All @@ -14,7 +14,7 @@ if ! command -v "$python" >/dev/null 2>&1; then
exit 1
fi

install -d -m 755 "$install_prefix/lib" "$install_prefix/lib/home-ops" "$venv_root" "$bin_dir"
install -d -m 755 "$install_prefix/lib" "$install_prefix/lib/home-config" "$venv_root" "$bin_dir"
"$python" -m venv --clear "$venv"
"$venv/bin/python" -m pip install --disable-pip-version-check "$repo_root"
chmod -R a+rX "$venv"
Expand Down
Loading