Skip to main content

Mute snapcast client playing on raspi3

Project description

Dark Mute

Dark Mute is python script that mutes snapcast client volume when it senses lights are off in the room.

It's written in Python 3 and requires a photoresistor-capacitor circuit connected to a Raspberry Pi running Snapcast.


As the pi user in its home directory:

  • python3 -m venv darkmute-venv
  • . darkmute-venv/bin/activate
  • sudo python3 -m pip install DarkMute
  • Test it: darkmute

Brightness thresholds are hard-coded for now, to change them see Developer Setup section.

To run this as a service, create a systemd service definition:


Description=Dark Mute



Developer Setup

  • Clone this from gitlab
  • Create and activate Python 3 virtual env
  • pip install -e . to install dependencies
  • Build the circuit, connected to GPIO Pin 7
  • add user to gpio group /dev/gpiomem

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for DarkMute, version 0.1.8
Filename, size File type Python version Upload date Hashes
Filename, size DarkMute-0.1.8-py3-none-any.whl (4.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size DarkMute-0.1.8.tar.gz (3.4 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page