Skip to content

mattbun/castaway

Repository files navigation

castaway

Perform actions when cast sessions start or end!

So far, it can:

  • Post to MQTT
  • Call a webhook
  • Write to console
  • Run a command

Getting Started

Docker images are available at both Docker Hub and GitHub Container Registry. Get started by running:

# Docker Hub
docker run --rm -it mattbun/castaway --help

# GitHub Container Registry
docker run --rm -it ghcr.io/mattbun/castaway --help

Configuration

Castaway can be configured by command line argument or by environment variable (perfect for docker-compose!).

Command Line Arguments

docker run --rm -it ghcr.io/mattbun/castaway \
  --host <address-of-cast-device> \
  --mqtt-broker <address-of-mqtt-broker> \
  --mqtt-topic 'cool/topic' \
  --mqtt-message-on-start 'session_connected' \
  --mqtt-message-on-end 'no_session'

Environment Variables (docker-compose)

Environment variables are prefixed with CASTAWAY_ and follow the naming of the command line argument.

services:
  castaway:
    container_name: castaway
    image: ghcr.io/mattbun/castaway
    restart: unless-stopped
    environment:
      - CASTAWAY_HOST=<address-of-cast-device>
      - CASTAWAY_MQTT_BROKER=<address-of-mqtt-broker>
      - CASTAWAY_MQTT_TOPIC=cool/topic
      - CASTAWAY_MQTT_MESSAGE_ON_START=session_connected
      - CASTAWAY_MQTT_MESSAGE_ON_END=no_session

About

Perform actions when cast sessions start or end

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors 3

  •  
  •  
  •