Use a Raspbery Pi, a GPIO rotary encoder and optionally a screen to control the volume of your chromecast. This a port of Cattmate to use GPIO devices instead of USB devices.
This project is considered stable and working except mute. See #3.
- Raspbery Pi - I used a Raspberry Pi Model 3B Rev 1.2
- Rotary Encorder - Either with jumper cables or without!
- 0.96" SSD1336 OLED Screen (optional) - I use these from MakerFocus
- Chromecast - any sort will do, original, audio or ultra
These steps assume you have your Pi set up with Raspbian, that it's booted up, connected
to the same WiFi as your Chromecast. If your Chromecast is on a different network, but
you can get to it by IP, the
config supports IPs instead of Chromecast names. It also assumes you're using the pi
default user with a home directory of /home/pi
and that you have python3,
pip3 and optionally
virtualenv installed:
- Clone this repo and cd into it:
git clone https://github.com/Ths2-9Y-LqJt6/cattrotar.git /home/pi/cattrotar; cd /home/pi/cattmate
- Create your own virtualenv and activate it
python3 -m venv venv;. venv/bin/activate
(optional) - Install all the python prerequisites with
pip3 install -r requirements.txt
- Connect your rotary encoder to these GPIO pins. You're welcome to use different ones, but be
sure to update your
config.py
on the next step. See this diagram to help get you started (thx Pi Hut):clk = 17 dt = 18 sw = 23 + = 3.3 GND = Ground
- Create your own config file
cp config.dist.py config.dist
and editconfig.dist
if needed:- names or IPs of the chromecasts you want to use (ony first one supported right now ;)
- whether you want to use an external I2C screen or not
- the pins you'll use for the rotary encoder
- Copy the systemd file into place, reload systemd, start and enable it:
sudo cp cattrotar.service /etc/systemd/system/ sudo systemctl daemon-reload sudo systemctl enable cattrotar sudo systemctl start cattrotar
You should be good to go!
You can debug the system in syslog with sudo tail -f /var/log/syslog
. I try to do a lot
of testing and have except
errors that explicitly tell you what went wrong
and how to fix it. If all else fails, open an issue and I'l try and help ya!
I've added experimental support for Orange Pi Zero boards. The screen doesn't work and I've had problems getting around details as seen in #4, but it does work if you do some hand holding!