2026-07-27 16:23:40 -07:00
|
|
|
XION Arcade Control Panel
|
2016-01-01 00:39:13 -08:00
|
|
|
================================================================================
|
|
|
|
|
|
2026-07-27 16:23:40 -07:00
|
|
|
This is an iOS control panel for the XION/Xaibatsu arcade. It connects to Home
|
|
|
|
|
Assistant's websocket API, displays entities with the `control_panel` label, and
|
|
|
|
|
renders entities with the additional `control_panel_light` label in the lights
|
|
|
|
|
section.
|
2016-01-01 00:39:13 -08:00
|
|
|
|
2026-07-27 16:23:40 -07:00
|
|
|
Configuration
|
|
|
|
|
--------------------------------------------------------------------------------
|
2016-01-01 00:39:13 -08:00
|
|
|
|
2026-07-27 16:23:40 -07:00
|
|
|
The Home Assistant access token is intentionally not stored in source control.
|
|
|
|
|
Provide it either through the `HOME_ASSISTANT_ACCESS_TOKEN` process environment
|
|
|
|
|
variable or as the `HOME_ASSISTANT_ACCESS_TOKEN` Xcode build setting. The latter
|
|
|
|
|
is expanded into the app's `HomeAssistantAccessToken` Info.plist entry.
|
|
|
|
|
|
|
|
|
|
For a Simulator launch from the command line:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
SIMCTL_CHILD_HOME_ASSISTANT_ACCESS_TOKEN='token' \
|
2026-07-27 16:52:14 -07:00
|
|
|
xcrun simctl launch booted net.buzzert.XaibatsuControlPanel
|
2026-07-27 16:23:40 -07:00
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The client disconnects cleanly when the app resigns active, reconnects and
|
|
|
|
|
refreshes immediately when it returns, and uses Home Assistant `ping`/`pong`
|
|
|
|
|
messages as a heartbeat while active.
|
|
|
|
|
|
|
|
|
|
Testing
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
The live integration test is opt-in because it briefly changes the `Asteroids`
|
|
|
|
|
switch and restores its original state:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
HOME_ASSISTANT_ACCESS_TOKEN='token' \
|
|
|
|
|
RUN_LIVE_HOME_ASSISTANT_TESTS=1 \
|
|
|
|
|
xcodebuild -project XIONControlPanel.xcodeproj \
|
|
|
|
|
-scheme XIONControlPanel \
|
|
|
|
|
-destination 'platform=iOS Simulator,name=iPhone 17' \
|
|
|
|
|
-only-testing:XIONControlPanelTests/HomeAssistantIntegrationTests \
|
|
|
|
|
test
|
|
|
|
|
```
|
2026-07-27 16:52:14 -07:00
|
|
|
|
|
|
|
|
TestFlight releases
|
|
|
|
|
--------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
Gitea Actions publishes tags named `release/vX.X.X` to TestFlight. The semantic
|
|
|
|
|
version from the tag and the Gitea `GITHUB_RUN_NUMBER` are written into the
|
|
|
|
|
app's Info.plist before it is archived. For example:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
git tag -a release/v2.0.0 -m 'Release 2.0.0'
|
|
|
|
|
git push origin release/v2.0.0
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
The workflow uses the `macos-arm64` runner and Fastlane Match. It expects these
|
|
|
|
|
repository Actions secrets:
|
|
|
|
|
|
2026-07-27 17:06:01 -07:00
|
|
|
- `ASC_KEY_ID`
|
|
|
|
|
- `ASC_ISSUER_ID`
|
|
|
|
|
- `ASC_KEY`
|
2026-07-27 16:52:14 -07:00
|
|
|
- `MATCH_PASSWORD`
|
|
|
|
|
- `MATCH_GIT_BASIC_AUTHORIZATION`
|