diff --git a/balena.yml b/balena.yml new file mode 100644 index 0000000..f8d064e --- /dev/null +++ b/balena.yml @@ -0,0 +1,46 @@ +name: Home Assistant / RPiPlay +type: sw.application +description: >- + Open source home automation that puts local control and privacy first; a Home + Assistant, HASS Config, and MQTT stack with an Airplay server using RPiPlay to enable screen mirroring on tvs, monitors and projectors. +post-provisioning: >- + ## Usage instructions + **Application download** + Once you power up your device you'll need to allow some time for it to + download the application, this typically takes less than one minute but it can take + more depending on your internet connection, and the type of device you are using. + __Note: The device will reboot to apply some device configurations.__ + **Usage** + When the download is complete the application will start. You should see + an Airplay device from your Apple devices. It will be broadcast with the name Airplay@hostname. + You can cast using your Apple devices. Use Screen Mirroring from the Control Center: + - [iOS devices](https://support.apple.com/en-us/HT204289#mirroriOS) + - [macOS devices](https://support.apple.com/guide/imac/use-airplay-apdf1417128d/mac) +assets: + repository: + type: blob.asset + data: + url: 'https://git.dou.bet/iamdoubz/balena-Raspberry3B01' + logo: + type: blob.asset + data: + url: >- + https://git.dou.bet/iamdoubz/balena-Raspberry3B01/raw/branch/main/logo.png +data: + defaultDeviceType: raspberrypi3 + supportedDeviceTypes: + - raspberrypi3 + - raspberrypi4-64 + - fincm3 + applicationEnvironmentVariables: + - AIRPIPLAY_NAME: "Hisense" + - AIRPIPLAY_AUDIO_OUT: hdmi + - AIRPIPLAY_BACKGROUND: auto + - AIRPIPLAY_LATENCY_MODE: 1 + - AIRPIPLAY_ROTATION: "" + - AIRPIPLAY_FLIP: "" + applicationConfigVariables: + - BALENA_HOST_CONFIG_gpu_mem: 256 + - BALENA_HOST_CONFIG_gpu_mem_512: 128 + - BALENA_HOST_CONFIG_dtoverlay: vc4-fkms-v3d +version: 1.0.0 diff --git a/logo.png b/logo.png new file mode 100644 index 0000000..8a01328 Binary files /dev/null and b/logo.png differ diff --git a/repo.yml b/repo.yml new file mode 100644 index 0000000..bf9ea69 --- /dev/null +++ b/repo.yml @@ -0,0 +1 @@ +type: generic diff --git a/start.sh b/start.sh new file mode 100644 index 0000000..0efba3e --- /dev/null +++ b/start.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/vc/lib + +DEVICE_NAME="${AIRPIPLAY_NAME:="Air-Pi-Play@$HOSTNAME"}" +AUDIO_OUT="${AIRPIPLAY_AUDIO_OUT:="hdmi"}" +BACKGROUND="${AIRPIPLAY_BACKGROUND:="auto"}" +case $AIRPIPLAY_LATENCY_MODE in + 1) LATENCY="-l";; + 0) LATENCY="";; +esac +ROTATION="-r ${AIRPIPLAY_ROTATION:=""}" +FLIP="-f ${AIRPIPLAY_FLIP:=""}" + +echo "Air-Pi-Play v$(cat VERSION) powered by RpiPlay" + +echo "Device is discoverable as ${DEVICE_NAME}" + +rpiplay -n $DEVICE_NAME -a $AUDIO_OUT -b $BACKGROUND $LATENCY $ROTATION $FLIP