Skip to content
Open
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
34 changes: 34 additions & 0 deletions .github/copilot-instructions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# Control Hub · GitHub Copilot

## Dansk

Læs [projektreglerne](../AGENTS.md) og [bidragsvejledningen](../CONTRIBUTING.md). Svar ejeren på dansk. Opdatér brugerflade og dokumentation på dansk og engelsk i samme ændring. Første prioritet er Stream Deck sammen med PowerPoint og OBS Studio, derefter AndroidRemote.

Læg pluginimplementationer og aktiver under `Plugins/`. Genbrug protokol v1 og den fælles dispatcher til styringskommandoer. Styr det eksisterende PowerPoint-slideshow via COM. Præsentationsfiler må aldrig ændres, og styringen må aldrig afhænge af tastaturfokus. Hold tokens, OBS-adgangskoder og parringsbeviser ude af kode, logfiler og PR-tekst.

Arbejd på den valgte arbejdsbranch og brug PR til review. Følg [versionsreglerne](../docs/versioning.md). Release og tag kræver ejerens godkendelse. Hver .100-grænse og overgangen til 0.1.000 kræver særskilt godkendelse.

## English

Read the [project rules](../AGENTS.md) and [contribution guide](../CONTRIBUTING.md). Reply to the owner in Danish. Update user-facing text and documentation in Danish and English in the same change. Prioritize Stream Deck with PowerPoint and OBS Studio, followed by AndroidRemote.

Keep plugin implementations and assets under `Plugins/`. Reuse protocol v1 and the shared dispatcher for control commands. Control the existing PowerPoint slideshow through COM. Never modify presentation files or use focus-dependent shortcuts. Keep tokens, OBS passwords and pairing invitations out of code, logs and pull request text.

Work on the selected development branch and use a pull request for review. Follow the [version policy](../docs/versioning.md). Releases and tags require owner approval. Each .100 boundary and the transition to 0.1.000 require separate approval.

## Build og test / Build and test

Brug .NET 10 SDK og Node.js 24 fra repositoryets rod. / Use the .NET 10 SDK and Node.js 24 from the repository root.

```sh
dotnet restore ControlHub.slnx
dotnet build ControlHub.slnx --no-restore --configuration Release
dotnet test ControlHub.slnx --no-build --configuration Release
node --test tests/streamdeck.test.cjs tests/inspector.test.cjs
node tests/host-smoke.cjs
node scripts/check-policy.cjs
```

Se [CI](workflows/ci.yml) for Windows-installationen, Elgato-validering og APK-prøven på Android-emulatoren. Beskriv i PR’en, hvilke kontroller du kørte, hvad de viste, og hvilke fysiske prøver der stadig afventer.

See [CI](workflows/ci.yml) for Windows packaging, Elgato validation and the Android APK emulator trial. Report the checks you ran, their results and any outstanding physical hardware trials in the pull request.
65 changes: 65 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Build and tests / Byg og test
on:
push:
branches: [main, 'feature/**']
pull_request:
branches: [main]
permissions:
contents: read
jobs:
verify:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- uses: actions/setup-node@v4
with:
node-version: '24'
- run: dotnet restore ControlHub.slnx
- run: dotnet build ControlHub.slnx --no-restore --configuration Release
- run: dotnet test ControlHub.slnx --no-build --configuration Release --logger trx
- run: node --test tests/streamdeck.test.cjs tests/inspector.test.cjs
- run: npx --yes --package=@elgato/cli@1.10.3 streamdeck validate --no-update-check Plugins/StreamDeck/dk.thebonden.controlhub.sdPlugin
- run: node tests/host-smoke.cjs
- run: node scripts/check-policy.cjs
- name: Build Windows installers / Byg Windows-installation
if: runner.os == 'Windows'
shell: pwsh
run: |
$iscc = "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe"
./scripts/package-windows.ps1 -IsccPath $iscc -OutputDirectory "$env:GITHUB_WORKSPACE\artifacts\windows"
./scripts/verify-package.ps1 -PackageDirectory "$env:GITHUB_WORKSPACE\artifacts\windows"
- uses: actions/upload-artifact@v4
if: runner.os == 'Windows'
with:
name: ControlHub-0.0.001-windows-development
path: artifacts/windows/files/*
retention-days: 14
if-no-files-found: error
android:
name: Android APK and emulator / APK og emulator
runs-on: ubuntu-latest
timeout-minutes: 25
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: '17'
- run: bash scripts/android-emulator-ci.sh
- uses: actions/upload-artifact@v4
with:
name: ControlHub-AndroidRemote-0.0.001-development
path: ${{ runner.temp }}/controlhub-android/ControlHub-AndroidRemote-0.0.001.apk
retention-days: 14
if-no-files-found: error
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
**/bin/
**/obj/
.vs/
TestResults/
artifacts/
.env
*.user
*.streamDeckPlugin
*.apk
*.p12
*.jks
*.controlhub
__pycache__/
12 changes: 12 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Projektregler / Project rules

- Dansk: Kommunikér med ejeren på dansk. Dokumentation og brugervendte tekster skal være på dansk og engelsk.
- English: Communicate with the owner in Danish. Documentation and user-facing text must be Danish and English.
- Dansk: Prioritér Stream Deck sammen med PowerPoint og OBS Studio; derefter AndroidRemote.
- English: Prioritize Stream Deck with PowerPoint and OBS Studio, followed by AndroidRemote.
- Dansk: Alle pluginimplementationer og aktiver under Plugins/. Ingen ændring af præsentationsfiler eller fokusafhængige genveje.
- English: All plugin implementations and assets belong under Plugins/. Never modify presentation files or use focus-dependent shortcuts.
- Dansk: Brug arbejdsbranch og PR mod main. Byg og test. Rapportér faktisk implementering og resterende hardwaretest.
- English: Use a working branch and PR to main. Build and test. Report actual implementation and remaining hardware tests.
- Dansk: Ingen release eller tag uden ejerens godkendelse. Hver .100-grænse og skiftet til 0.1.000 kræver særskilt godkendelse. Følg docs/versioning.md.
- English: No release or tag without owner approval. Each .100 boundary and transition to 0.1.000 needs separate approval. Follow docs/versioning.md.
51 changes: 51 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# Ændringslog / Changelog

## 0.0.001 — udviklingsversion / development version

### Dansk
- AndroidRemote til Android 8 og nyere med parret HTTPS, certifikatkontrol, krypteret enhedsnøgle, slides, OBS-scene og status. APK-knapperne er prøvet på en Android 15-emulator med bogførte kommandoer, afbrydelse og tilbagekaldelse.
- Nyt Windows-vindue **Administrér telefonadgang**: vælg rettigheder, opret et to-minutters bevis, se ventende/parrede enheder og tilbagekald adgang. Lokale ejerruter kræver en separat nøgle for hver opstart; Stream Deck-nøglen alene er utilstrækkelig.
- AndroidRemote-bibliotek med enkeltbrugsparring, enhedsrettigheder, udløb og tilbagekaldelse.
- Adgang kontrolleres igen efter kommandokøen; kommandosvar holdes adskilt pr. parret enhed.
- Host-smoketest bruger en separat lokal port, så den åbne Control Hub kan fortsætte.
- Konkrete forbindelsesårsager for PowerPoint og OBS i status og Stream Deck, med sikre dansk/engelske tekster.
- Afbrudte OBS-kommandoer efter påbegyndt afsendelse rapporteres som ukendt udfald; aldrig automatisk genafsendelse.
- Rettet forbindelsessvar, når Stream Decks indstillingsvindue og knap har forskellige id'er; dækket af en regressionstest.
- Windows x64-installation med inkluderet .NET og officiel Stream Deck-installationspakke.
- Dansk/engelsk kontrolvindue med start/stop, forbindelsesstatus, kopiering af vedvarende token og DPAPI-krypterede OBS-indstillinger.
- Pakketest af konfiguration, lokal host og stop; Windows-artefakter i CI uden release/tag.
- Forbindelsestest i Stream Deck-indstillingerne med separat status for Control Hub, PowerPoint og OBS.
- Beskyttelse mod forsinket knapfeedback efter profil-/indstillingsskift.
- Hovedikon i krævet PNG-format og officiel Elgato-validering i CI.
- C#/.NET 10-kontrakter, dispatcher og lokal autentificeret HTTP-host.
- Eksplicit pluginsystem med ærlig status for ikke-implementerede integrationer.
- PowerPoint COM-navigation på STA-tråd, uden filredigering eller tastaturgenveje.
- OBS WebSocket v5-klient med godkendelse og konkrete handlinger.
- Stream Deck-kildeplugin med 12 handlinger, dansk/engelsk opsætning og statusfeedback.
- Forberedte integrationsplaner for AndroidRemote, lyd, Logitech, Android Live, fysisk fjernkontrol og Flux Keyboard.
- Automatiske tests, CI på Windows/Linux og projektbeskrivelse på begge sprog.
- Fysisk test i det aktive miljø afventer. Ingen release eller tag.

### English
- AndroidRemote for Android 8 and later with paired HTTPS, certificate verification, encrypted device credentials, slides, OBS scene and status. Android 15 emulator tests exercise the APK controls, counted commands, disconnection and revocation.
- New Windows **Manage phone access** dialog: select permissions, create a two-minute invitation, list pending/paired devices and revoke access. Local owner routes require a separate key for each launch; the Stream Deck key alone is insufficient.
- AndroidRemote library with single-use pairing, device permissions, expiry and revocation.
- Authorization is rechecked after queueing; command results are isolated per paired device.
- Host smoke tests use a separate local port so the open Control Hub can keep running.
- Specific PowerPoint/OBS connection reasons in status and Stream Deck, with safe Danish/English messages.
- OBS commands interrupted after transmission starts report an unknown outcome; no automatic retries.
- Fixed connection replies when the Stream Deck inspector and key have different IDs; covered by a regression test.
- Windows x64 installer with included .NET and an official Stream Deck installation package.
- Danish/English control window with start/stop, connection status, persistent token copying and DPAPI-encrypted OBS settings.
- Package checks for configuration, local host and shutdown; Windows CI artifacts without a release/tag.
- Connection check in Stream Deck settings with separate Control Hub, PowerPoint and OBS status.
- Protection against late key feedback after profile/settings changes.
- Main icon in the required PNG format and official Elgato validation in CI.
- C#/.NET 10 contracts, dispatcher and authenticated local HTTP host.
- Explicit plugin system with truthful status for unimplemented integrations.
- PowerPoint COM navigation on an STA thread without file editing or keyboard shortcuts.
- OBS WebSocket v5 client with authentication and concrete actions.
- Stream Deck source plugin with 12 actions, Danish/English settings and status feedback.
- Prepared integration plans for AndroidRemote, audio, Logitech, Android Live, physical remote and Flux Keyboard.
- Automated tests, Windows/Linux CI and project description in both languages.
- Physical testing in the active environment remains pending. No release or tag.
37 changes: 37 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Bidrag / Contributing

## Dansk

Arbejd på en branch fra `main`, og åbn en PR mod `main`. Hold alle pluginimplementationer og deres aktiver under `Plugins/`. Bevar danske og engelske dokumenter samt UI-tekster i samme ændring; protokol- og kodeidentifikatorer forbliver engelske.

Kør build, C#-tests, Stream Deck-tests, host-smoketest og kildekoderegler som beskrevet i installationsvejledningen. Beskriv præcist, om en integration er implementeret, simuleret, planlagt eller fysisk afprøvet. Brug ikke grønne enhedstests som bevis for hardwarefunktion.

Ændr aldrig præsentationsfiler, og tilføj ingen fokusafhængige genveje. Gem aldrig tokens eller adgangskoder i kode, eksempler, testlogs eller profiler. Følg [versionsreglerne](docs/versioning.md). Release, tags og .100-grænser kræver ejerens eksplicitte godkendelse.

### Kod med GitHub Copilot

Mens [PR #1](https://github.com/thebonden/Control_Hub/pull/1) er åben, kan du skrive `@copilot` i PR’ens samtale og beskrive én konkret kodeændring. Copilot kan tilføje commits direkte på `feature/control-hub-0.0.001`. Gennemgå diffen og testresultaterne i samme PR. Hvis du starter en separat opgave i [Copilot Agents](https://github.com/copilot/agents), så vælg `thebonden/Control_Hub` og den branch, som indeholder koden, opgaven skal bygge videre på.

Eksempel på en opgave:

> @copilot Vis optagelses- og streamingstatus fra OBS på AndroidRemotes statusskærm. Vis “Ukendt” eller “Unknown”, når oplysningerne mangler. Opdatér den relevante emulatortest, og beskriv resultatet på dansk.

Brug en GitHub-konto med skriveadgang og adgang til Copilot cloud agent i repositoriet. Hvis agenten ikke kan vælges, så kontrollér repositoryadgangen i [Copilot-indstillingerne](https://github.com/settings/copilot/features). [GitHubs vejledning](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/use-cloud-agent-on-github#continuing-work-on-a-pull-request)

## English

Work on a branch from `main` and open a PR targeting `main`. Keep all plugin implementations and assets under `Plugins/`. Update Danish and English documentation and UI text together; protocol and code identifiers remain English.

Run the build, C# tests, Stream Deck tests, host smoke test and source policy checks described in setup. State precisely whether an integration is implemented, simulated, planned or physically tested. Green unit tests do not prove hardware functionality.

Never modify presentation files or add focus-dependent shortcuts. Never commit tokens or passwords in code, examples, test logs or profiles. Follow the [version policy](docs/versioning.md). Releases, tags and .100 boundaries require explicit owner approval.

### Code with GitHub Copilot

While [PR #1](https://github.com/thebonden/Control_Hub/pull/1) is open, mention `@copilot` in its conversation and describe one concrete code change. Copilot can add commits directly to `feature/control-hub-0.0.001`. Review the diff and test results in the same PR. When starting a separate task in [Copilot Agents](https://github.com/copilot/agents), select `thebonden/Control_Hub` and the branch containing the code the task should build on.

Example task:

> @copilot Show OBS recording and streaming status on AndroidRemote’s status screen. Display “Ukendt” or “Unknown” when the data is missing. Update the relevant emulator test and report the result in Danish.

Use a GitHub account with write access and Copilot cloud agent access to the repository. If the agent is unavailable, check repository access in [Copilot settings](https://github.com/settings/copilot/features). [GitHub guide](https://docs.github.com/en/copilot/how-tos/use-copilot-agents/cloud-agent/use-cloud-agent-on-github#continuing-work-on-a-pull-request)
17 changes: 17 additions & 0 deletions ControlHub.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<Solution>
<Folder Name="/src/">
<Project Path="src/ControlHub.Contracts/ControlHub.Contracts.csproj" />
<Project Path="src/ControlHub.Core/ControlHub.Core.csproj" />
<Project Path="src/ControlHub.Host/ControlHub.Host.csproj" />
<Project Path="src/ControlHub.Desktop/ControlHub.Desktop.csproj" />
</Folder>
<Folder Name="/Plugins/">
<Project Path="Plugins/AndroidRemote/ControlHub.Plugins.AndroidRemote.csproj" />
<Project Path="Plugins/AndroidRemote/Host/ControlHub.Plugins.AndroidRemote.Host.csproj" />
<Project Path="Plugins/AndroidRemote/Desktop/ControlHub.Plugins.AndroidRemote.Desktop.csproj" />
<Project Path="Plugins/PowerPoint/ControlHub.Plugins.PowerPoint.csproj" />
<Project Path="Plugins/Obs/ControlHub.Plugins.Obs.csproj" />
<Project Path="Plugins/Planned/ControlHub.Plugins.Planned.csproj" />
</Folder>
<Folder Name="/tests/"><Project Path="tests/ControlHub.Tests/ControlHub.Tests.csproj" /></Folder>
</Solution>
13 changes: 13 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project>
<PropertyGroup>
<TargetFramework>net10.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
<Version>0.0.1</Version>
<AssemblyVersion>0.0.1.0</AssemblyVersion>
<FileVersion>0.0.1.0</FileVersion>
<InformationalVersion>0.0.001</InformationalVersion>
<Deterministic>true</Deterministic>
</PropertyGroup>
</Project>
17 changes: 17 additions & 0 deletions Plugins/AndroidLive/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# Android Live / Android Live

## Dansk

Status i 0.0.001: **planlagt, ikke implementeret**. Plugin-id: `android-live`. Hosten registrerer en fælles `PlannedPlugin` med tom handlingsliste og `not_implemented`-status. Der er ingen driver, transport eller app i denne mappe endnu.

Afklar om integrationen omfatter kamera, status eller styring. Fastlæg transport, parring og adgang. Denne integration er adskilt fra AndroidRemote.

Accept kræver en dokumenteret protokol, fejl- og forbindelsestests, hardwaretest og danske/engelske brugertekster. Implementationskode skal placeres i denne mappe under `Plugins/`.

## English

0.0.001 status: **planned, not implemented**. Plugin ID: `android-live`. The host registers a shared `PlannedPlugin` with an empty action list and `not_implemented` status. No driver, transport or app exists in this directory yet.

Establish whether the integration covers a camera, status or control. Define transport, pairing and access. This integration is separate from AndroidRemote.

Acceptance requires a documented protocol, error and connection tests, hardware testing and Danish/English user text. Implementation code must be placed in this directory under `Plugins/`.
10 changes: 10 additions & 0 deletions Plugins/AndroidRemote/Android/AndroidManifest.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<manifest xmlns:android="http://schemas.android.com/apk/res/android" package="dk.thebonden.controlhub.remote" android:versionCode="1" android:versionName="0.0.001">
<uses-sdk android:minSdkVersion="26" android:targetSdkVersion="35" />
<uses-permission android:name="android.permission.INTERNET" />
<application android:label="Control Hub AndroidRemote" android:theme="@android:style/Theme.Material.Light.NoActionBar"
android:allowBackup="false" android:usesCleartextTraffic="false">
<activity android:name=".RemoteActivity" android:exported="true" android:windowSoftInputMode="adjustResize">
<intent-filter><action android:name="android.intent.action.MAIN" /><category android:name="android.intent.category.LAUNCHER" /></intent-filter>
</activity>
</application>
</manifest>
Loading
Loading