244 lines
6.8 KiB
Markdown
244 lines
6.8 KiB
Markdown
# Internal cabinet setup and assigned tokens
|
||
|
||
This guide records the supplied credentials for the internal Arcade Escape installation. It documents configuration only: adding a row here does not update a running controller, create cabinet resources, or deploy a Pi.
|
||
|
||
## Assigned tokens
|
||
|
||
| Role | Cabinet ID | Token |
|
||
| --- | --- | --- |
|
||
| Operator | — | `Yu1qH7nz_aMUTlkk` |
|
||
| Cabinet 1 | `cabinet_01` | `K32qg0lYioXmzWAK` |
|
||
| Cabinet 2 | `cabinet_02` | `LY9ATvM3wkTxJg0x` |
|
||
| Cabinet 3 | `cabinet_03` | `qZSD9eM2dmeRtmVA` |
|
||
| Cabinet 4 | `cabinet_04` | `2xXcj0sUbOzQCn2j` |
|
||
| Cabinet 5 | `cabinet_05` | `weISFvFBOt6pxfk-` |
|
||
| Cabinet 6 | `cabinet_06` | `h-lP-SfQMXT_dLtc` |
|
||
| Cabinet 7 | `cabinet_07` | `pUT4GdBYtW3slhOq` |
|
||
|
||
All eight tokens are distinct and exactly 16 characters. Copy them exactly, including capitalization, underscores, and hyphens. Cabinet 5's token ends with a hyphen.
|
||
|
||
## Windows controller and browser
|
||
|
||
The Python controller does **not** read `arcade_network.cfg`. Merge these values into the existing `tools/launch/launcher.ini`; preserve the current database/catalog paths and other settings:
|
||
|
||
```ini
|
||
[controller]
|
||
bind = 0.0.0.0
|
||
port = 8766
|
||
operator_token = Yu1qH7nz_aMUTlkk
|
||
cabinet_tokens = {"cabinet_01":"K32qg0lYioXmzWAK","cabinet_02":"LY9ATvM3wkTxJg0x","cabinet_03":"qZSD9eM2dmeRtmVA","cabinet_04":"2xXcj0sUbOzQCn2j","cabinet_05":"weISFvFBOt6pxfk-","cabinet_06":"h-lP-SfQMXT_dLtc","cabinet_07":"pUT4GdBYtW3slhOq"}
|
||
```
|
||
|
||
Stop the existing stack, then launch controller-only mode so the PC does not compete with a Pi for its cabinet identity:
|
||
|
||
```powershell
|
||
.\Start-Arcade.ps1 -Mode controller -Browser
|
||
```
|
||
|
||
Enter the **Operator** token from the table in the browser. The PC can browse `http://127.0.0.1:8766/`; other devices use `http://WINDOWS_PC_IP:8766/`. No Godot CFG is required for this browser workflow.
|
||
|
||
If old environment variables override the INI, clear them in the launching PowerShell session before restarting:
|
||
|
||
```powershell
|
||
Remove-Item Env:ARCADE_OPERATOR_TOKEN -ErrorAction SilentlyContinue
|
||
Remove-Item Env:ARCADE_CABINET_TOKENS -ErrorAction SilentlyContinue
|
||
Remove-Item Env:ARCADE_CABINET_TOKEN -ErrorAction SilentlyContinue
|
||
```
|
||
|
||
## Optional Godot operator on the PC
|
||
|
||
Only when running the exported app with `-- --operator`, create `%APPDATA%/Godot/app_userdata/ArcadeEscape/arcade_network.cfg`:
|
||
|
||
```ini
|
||
[network]
|
||
url="http://127.0.0.1:8766"
|
||
operator_token="Yu1qH7nz_aMUTlkk"
|
||
```
|
||
|
||
Use the controller's LAN IP instead if it runs on another machine. This CFG supplies the Godot operator client; it does not change the Python server's accepted tokens.
|
||
|
||
## Pi configuration
|
||
|
||
Create `~/.local/share/godot/app_userdata/ArcadeEscape/arcade_network.cfg` under the account running the game. It is not stored beside the executable. Replace `WINDOWS_PC_IP` in the examples below with the controller's actual LAN address.
|
||
|
||
For each Pi, also set the matching ID in `tools/launch/launcher.ini`. The launcher always passes this ID and it overrides the CFG ID. Leave its `url` and `token` empty to use the Godot CFG. Retain your executable path, `gpio` setting, and hardware pin allowlist.
|
||
|
||
### Cabinet 1
|
||
|
||
Godot `arcade_network.cfg`:
|
||
|
||
```ini
|
||
[network]
|
||
url="http://WINDOWS_PC_IP:8766"
|
||
cabinet_id="cabinet_01"
|
||
cabinet_token="K32qg0lYioXmzWAK"
|
||
```
|
||
|
||
Merge into this Pi's launcher INI, preserving the other settings:
|
||
|
||
```ini
|
||
[cabinet]
|
||
id = cabinet_01
|
||
url =
|
||
token =
|
||
```
|
||
|
||
### Cabinet 2
|
||
|
||
Godot `arcade_network.cfg`:
|
||
|
||
```ini
|
||
[network]
|
||
url="http://WINDOWS_PC_IP:8766"
|
||
cabinet_id="cabinet_02"
|
||
cabinet_token="LY9ATvM3wkTxJg0x"
|
||
```
|
||
|
||
Merge into this Pi's launcher INI, preserving the other settings:
|
||
|
||
```ini
|
||
[cabinet]
|
||
id = cabinet_02
|
||
url =
|
||
token =
|
||
```
|
||
|
||
### Cabinet 3
|
||
|
||
Godot `arcade_network.cfg`:
|
||
|
||
```ini
|
||
[network]
|
||
url="http://WINDOWS_PC_IP:8766"
|
||
cabinet_id="cabinet_03"
|
||
cabinet_token="qZSD9eM2dmeRtmVA"
|
||
```
|
||
|
||
Merge into this Pi's launcher INI, preserving the other settings:
|
||
|
||
```ini
|
||
[cabinet]
|
||
id = cabinet_03
|
||
url =
|
||
token =
|
||
```
|
||
|
||
### Cabinet 4
|
||
|
||
Godot `arcade_network.cfg`:
|
||
|
||
```ini
|
||
[network]
|
||
url="http://WINDOWS_PC_IP:8766"
|
||
cabinet_id="cabinet_04"
|
||
cabinet_token="2xXcj0sUbOzQCn2j"
|
||
```
|
||
|
||
Merge into this Pi's launcher INI, preserving the other settings:
|
||
|
||
```ini
|
||
[cabinet]
|
||
id = cabinet_04
|
||
url =
|
||
token =
|
||
```
|
||
|
||
### Cabinet 5
|
||
|
||
Godot `arcade_network.cfg`:
|
||
|
||
```ini
|
||
[network]
|
||
url="http://WINDOWS_PC_IP:8766"
|
||
cabinet_id="cabinet_05"
|
||
cabinet_token="weISFvFBOt6pxfk-"
|
||
```
|
||
|
||
Merge into this Pi's launcher INI, preserving the other settings:
|
||
|
||
```ini
|
||
[cabinet]
|
||
id = cabinet_05
|
||
url =
|
||
token =
|
||
```
|
||
|
||
### Cabinet 6
|
||
|
||
Godot `arcade_network.cfg`:
|
||
|
||
```ini
|
||
[network]
|
||
url="http://WINDOWS_PC_IP:8766"
|
||
cabinet_id="cabinet_06"
|
||
cabinet_token="h-lP-SfQMXT_dLtc"
|
||
```
|
||
|
||
Merge into this Pi's launcher INI, preserving the other settings:
|
||
|
||
```ini
|
||
[cabinet]
|
||
id = cabinet_06
|
||
url =
|
||
token =
|
||
```
|
||
|
||
### Cabinet 7
|
||
|
||
Godot `arcade_network.cfg`:
|
||
|
||
```ini
|
||
[network]
|
||
url="http://WINDOWS_PC_IP:8766"
|
||
cabinet_id="cabinet_07"
|
||
cabinet_token="pUT4GdBYtW3slhOq"
|
||
```
|
||
|
||
Merge into this Pi's launcher INI, preserving the other settings:
|
||
|
||
```ini
|
||
[cabinet]
|
||
id = cabinet_07
|
||
url =
|
||
token =
|
||
```
|
||
|
||
## Start and verify each Pi
|
||
|
||
1. Verify its cabinet profile is registered in `data/project_database.tres`, with its own hardware controller ID and actions. Configure the bridge to match that profile. The current catalog contains Cabinets 1–3; Cabinets 4–7 are reserved token assignments until their profiles are created, registered, exported, and deployed.
|
||
2. Run Control Setup on that Pi if not already configured.
|
||
3. If using the CFG examples above, clear stale overrides in that Pi's launching terminal:
|
||
|
||
```sh
|
||
unset ARCADE_ROOM_URL ARCADE_CABINET_TOKEN
|
||
```
|
||
|
||
4. Start the cabinet from the deployment folder:
|
||
|
||
```sh
|
||
bash start-arcade.sh cabinet --check
|
||
bash start-arcade.sh cabinet
|
||
```
|
||
|
||
5. Confirm that the correct cabinet ID becomes ONLINE in the browser. Run only one process per ID.
|
||
|
||
Alternatively, put the URL and this cabinet's token directly in `[cabinet]` in `launcher.ini` (unquoted). That overrides the Godot CFG. Existing environment variables have the highest priority. For real GPIO, use the hardware profile's controller ID and BCM pin allowlist in `[gpio]`; the bridge remains local on 8765 while the game connects to the room controller on 8766.
|
||
|
||
## Generate additional tokens
|
||
|
||
Windows PowerShell:
|
||
|
||
```powershell
|
||
py -3 -c "import secrets; print(secrets.token_urlsafe(12))"
|
||
```
|
||
|
||
Pi / macOS / Linux:
|
||
|
||
```sh
|
||
python3 -c "import secrets; print(secrets.token_urlsafe(12))"
|
||
```
|
||
|
||
Each generates exactly 16 characters. Use a different value for each identity. To replace a cabinet token, change the controller's JSON entry and that cabinet's configured token together, update this registry, and restart both affected processes. Operator token changes also require a controller restart and a fresh browser login.
|
||
|
||
See the [project README](../README.md), [launcher guide](../tools/launch/README.md), and [controller guide](../tools/room_controller/README.md) for the full deployment workflow.
|