technicalpickles / picklehome

Configuration & Planning for my Home Automation systems
14 stars 0 forks source link

Playing Overcast through the Sonos #39

Closed technicalpickles closed 5 years ago

technicalpickles commented 6 years ago

We use Overcast for podcasts. Unfortunately Alexa nor Sonos support it directly.

Some people have used https://github.com/josh/overcast-sonos with success. I tried it though, and I'm running into https://github.com/josh/overcast-sonos/issues/11

The next best thing would be using Airplay from the iOS app to play to Sonos. https://github.com/stephen/airsonos was the main way I had heard of this, but it's not actively being developed. There was a recently released hass.io plugin airsonos which confusingly doesn't use airsonos, but https://github.com/philippe44/AirConnect so that is probably the best way.

@eric had some luck with it, and sent me a Dockerfile snippet and docker-compose snippet:

Dockerfile:

FROM debian:jessie
# Setup base system
RUN \
    apt-get update \
    \
    && apt-get install -y --no-install-recommends libssl1.0.0 wget ca-certificates \
    \
    && rm -f -r \
        /tmp/* \
        /var/lib/apt/lists/*
RUN wget https://raw.githubusercontent.com/philippe44/AirConnect/master/bin/airupnp-x86-64 \
    && chmod 755 airupnp-x86-64
ENTRYPOINT [ “./airupnp-x86-64” ]

docker-compose snippet:

  airconnect:
    restart: always
    build: airconnect
    logging: *logging
    network_mode: host
    command:
     - "-d"
     - all=info
     - "-m"
     - "AVR-2113,LG TV"
     - "-b"
     - ":49152"
     - "-x"
     - /config/airconnect.xml
     - "-Z"
    volumes:
     - /vols/airconnect/config:/config

I'll push a PR up, but for whatever reason my variations on it end up exiting early, even when I comment out all the command.

I do know that it requires some initial config, and there's a command line flag to save. I might want to exclude some devices like eric does, particularly the denon.

technicalpickles commented 6 years ago

I got https://github.com/technicalpickles/picklehome/pull/41 running. I'm not sure I understand why my changes to the Dockerfile work, but they do 😅 In particular, it downloads the file to /app, and runs an absolute path for the ENTRYPOINT

We tested it for a few minutes today, and it seems to work. There is a bit of a delay, but I think that is expected with airplay.

technicalpickles commented 5 years ago

I switched to PocketCasts at some point because it was easier.