# Offseason Kiosk Programmer

### Releases

{% embed url="<https://vividhosting.box.com/v/frc-radio-kiosk>" %}

### Installation (Preferred)

1. Ensure that Docker Desktop is installed and running
2. Download and extract the "offseason\_installer\_vX\_Y\_Z.zip"
3. Right click and run the executable as admin

   <figure><img src="/files/PPQUyk7TkJ4yJROndSjP" alt=""><figcaption></figcaption></figure>
4. Select your desired network adapter to enable DHCP coexistance with a static IP. <mark style="background-color:red;">**Note**</mark><mark style="background-color:red;">: Ensure that the desired ethernet port is plugged in/active</mark>

   <figure><img src="/files/qDiAzLgBsJS99HCRNIGE" alt=""><figcaption></figcaption></figure>
5. Click Configure

   <figure><img src="/files/wuPfQrr5xZNIBehzwQ8p" alt=""><figcaption></figcaption></figure>
6. Wait for the kiosk to be installed

   <figure><img src="/files/HJSfE2F4lna08jicWWJJ" alt=""><figcaption></figcaption></figure>
7. Perform a self-test of the kiosk

   <figure><img src="/files/m2QAmU3oDH4kq7GjS7M1" alt=""><figcaption></figcaption></figure>
8. View the status of the health of the kiosk

   <figure><img src="/files/YpYfsB6uoiGPsNfXu7lp" alt=""><figcaption></figcaption></figure>
9. Open the kiosk in your default web browser

   <figure><img src="/files/s0bIABJ3u7YdPnbW9wO3" alt=""><figcaption></figcaption></figure>
10. Kiosk is ready for key material and event setup

    <figure><img src="/files/VRFOyelUVyhuCOuJcgbD" alt=""><figcaption></figcaption></figure>

### Alternate Installation

<details>

<summary>Installation (Manual)</summary>

The only requirements are that Docker is installed and a network interface (Ethernet adapter) is configured to 192.168.69.2/24

1. Assign the IP address of 192.168.69.2 with a netmask of 255.255.255.0 and no default gateway to your ethernet adapter of choice
2. From a terminal open to the folder containing `vh109-kiosk-0_2_0.tar.gz`, run `docker image load --input vh109-kiosk-0_2_0.tar.gz`. This loads the docker image from the archive.&#x20;
3. If you don't need to change the default password ("supercoolpassword"), skip to step 4. The password is set using a hash and salt. As a hacky solution, the salt and hash can be generated by running the following in node (or any online NodeJS compiler).

```
const crypto = require("crypto")
const pass = "<SET PASSWORD HERE>"
const salt = crypto.randomBytes(8).toString("base64")
const hash = crypto.createHash("sha256").update(pass + salt).digest("base64")
console.log(`salt: ${salt}\nhash: ${hash}`)
```

4. To persist the team keys data, we need to mount a local folder to the docker container. Create a data folder in the desired location. It must be referenced by **absolute path** and have the desired security for the raw team keys csv data.
5. Run the docker container with the following, replacing "/path/to/local/folder" with the path to the folder you just created.

```
docker run -d --name kiosk --restart always -p 80:80 --net=bridge -v "/path/to/local/folder:/app/data" vh109-kiosk
```

If you created a custom password, use this command and also replace `<HASH>` and `<SALT>` with what you generated.

```
docker run -d --name kiosk --restart always -p 80:80 --net=bridge -v "/path/to/local/folder:/app/data" -e OVERRIDE_KEY_UPLOAD_HASH="<HASH>" -e OVERRIDE_KEY_UPLOAD_SALT="<SAlT>" vh109-kiosk
```

**If you get an error about a container with the name `kiosk` already being in use, run the following to remove it.**

```
docker stop kiosk
docker rm kiosk
```

6. At this point, the kiosk should be running at [http://localhost](http://localhost/) and auto restart as long as docker auto restarts.
7. Upload your key material in CSV format (team,key) at [http://localhost/upload](#releases)
8. The kiosk is now ready for use!

</details>

### Localization

The Kiosk Tool has localizations to support three languages:

* English (en)
* French (fr)
* Turkish (tr)

Here is how to change the localization on the Kiosk Tool:

{% stepper %}
{% step %}

### Go To The Admin Page

```
http://localhost/admin
```

<figure><img src="/files/hIbVF7uTWLlFyflA6XIJ" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Enter The Admin Password

Changes will be disabled until you enter the admin password for the Kiosk tool:

<figure><img src="/files/BzbYKQRiUJuaa67QQIXR" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Select The Desired Language

<figure><img src="/files/kvYisL8Ayvowt2uoVw7z" alt=""><figcaption></figcaption></figure>
{% endstep %}

{% step %}

### Click Save

The Kiosk Tool will now display in the selected language.

<figure><img src="/files/Ue15RYUiibonaKvQsfyt" alt=""><figcaption></figcaption></figure>
{% endstep %}
{% endstepper %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://frc-radio.vivid-hosting.net/advanced-topics/offseason-kiosk-programmer.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
