# ============================================================================= # Apple TV to MQTT Bridge - Configuration # ============================================================================= # Copy this file to .env and fill in your values # ============================================================================= # ----------------------------------------------------------------------------- # MQTT Broker Settings # ----------------------------------------------------------------------------- # MQTT broker host (IP address or hostname) MQTT_HOST=192.168.1.100 # MQTT broker port (default: 1883 for non-TLS, 8883 for TLS) MQTT_PORT=1883 # MQTT authentication (leave empty if not required) MQTT_USER=homeassistant MQTT_PASSWORD=your_mqtt_password # MQTT Quality of Service level (0, 1, or 2) # 0 = At most once, 1 = At least once, 2 = Exactly once MQTT_QOS=1 # Base topic for all Apple TV MQTT messages # Topics will be: {base}/availability, {base}/state, {base}/apps, {base}/set, {base}/get MQTT_BASE_TOPIC=appletv # ----------------------------------------------------------------------------- # Apple TV Settings # ----------------------------------------------------------------------------- # Apple TV device identifier (get from: atvremote scan) APPLETV_ID=AA:BB:CC:DD:EE:FF # Apple TV IP address APPLETV_ADDRESS=192.168.1.50 # Apple TV Companion credentials (required for remote control) # Get from: atvremote --id YOUR_ID --protocol companion pair APPLETV_CREDENTIALS_COMPANION=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx # Apple TV AirPlay credentials (required for play_url streaming) # Get from: atvremote --id YOUR_ID --protocol airplay pair # Leave empty if not needed APPLETV_CREDENTIALS_AIRPLAY= # ----------------------------------------------------------------------------- # Update Intervals (in seconds) # ----------------------------------------------------------------------------- # How often to update playback state (recommended: 2-5 seconds) STATE_UPDATE_INTERVAL=3 # How often to update apps list (recommended: 300-600 seconds) APPS_UPDATE_INTERVAL=300 # ----------------------------------------------------------------------------- # Reconnection Settings (in seconds) # ----------------------------------------------------------------------------- # Delay before attempting to reconnect to MQTT broker MQTT_RECONNECT_DELAY=5 # Delay before attempting to reconnect to Apple TV APPLETV_RECONNECT_DELAY=10 # ----------------------------------------------------------------------------- # Logging Settings # ----------------------------------------------------------------------------- # Log level: DEBUG, INFO, WARNING, ERROR, CRITICAL LOG_LEVEL=INFO