2.2 KiB
XION Arcade Control Panel
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.
Configuration
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:
SIMCTL_CHILD_HOME_ASSISTANT_ACCESS_TOKEN='token' \
xcrun simctl launch booted net.buzzert.XaibatsuControlPanel
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:
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
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:
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:
ASC_KEY_IDASC_ISSUER_IDASC_KEYMATCH_PASSWORDMATCH_GIT_BASIC_AUTHORIZATION