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.
Setup/Usage
As the pi user in its home directory:
python3 -m venv darkmute-venv. darkmute-venv/bin/activatesudo 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:
/etc/systemd/system/darkmute.service
[Unit]
Description=Dark Mute
After=snapclient.service
[Service]
ExecStart=/home/pi/darkmute-venv/bin/darkmute
Restart=Always
User=pi
[Install]
WantedBy=multi-user.target
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
Metadata
Release files for DarkMute 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| DarkMute-0.1.8.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| DarkMute-0.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / DarkMute-0.1.8.tar.gz
| Download URL | DarkMute-0.1.8.tar.gz |
|---|---|
| Size | 3.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8864067ba37a0a26f6c78c9c901051e5a9a7f46eaa1b5881c2eef857cdf0c948
|
|
BLAKE2b-256 checksum How to use checksums |
493b0abe56e884c9b9142787e32eb5909030c35cf71ad47880207b3ed6732bd7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.3
|
Release files / DarkMute-0.1.8-py3-none-any.whl
| Download URL | DarkMute-0.1.8-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6d36624e09021e180788ab73ecd10bc94af2ab46296bbf31a7445173c1a45594
|
|
BLAKE2b-256 checksum How to use checksums |
0d7b503bafaef6aebfd25c0da4eb7d8127173c0b98bfef971151a1ce00bb97f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.5.3
|