Metadata-Version: 2.1
Name: qbee-gpio
Version: 3.0.1
Summary: Control an LCD display and amplifier relay for use in an AirPlay and/or Spotify Connect Raspberry Pi server.
Home-page: https://github.com/gpajot/qbee-gpio
License: MIT
Author: Gabriel Pajot
Author-email: gab@lescactus.eu
Requires-Python: >=3.8
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: asyncinotify (>=4.0,<4.1) ; python_version < "4"
Requires-Dist: concurrent-tasks (>=1.7,<2)
Requires-Dist: zenconfig[attrs,yaml] (>=2.1.0,<3)
Project-URL: Repository, https://github.com/gpajot/qbee-gpio
Description-Content-Type: text/markdown

# qbee-gpio

[![tests](https://github.com/gpajot/qbee-gpio/actions/workflows/test.yml/badge.svg?branch=main&event=push)](https://github.com/gpajot/qbee-gpio/actions/workflows/test.yml?query=branch%3Amain+event%3Apush)
[![version](https://img.shields.io/pypi/v/qbee-gpio?label=stable)](https://pypi.org/project/qbee-gpio/)
[![python](https://img.shields.io/pypi/pyversions/qbee-gpio)](https://pypi.org/project/qbee-gpio/)

A python script to control an LCD and amplifier relay for use in an AirPlay and/or Spotify Connect Raspberry Pi server.

* Detect sound ouput and turn on the amplifier power supply.
* Get the track information and display it on an LCD.
* Auto turn off amplifier power supply and/or shutdown after set period of inactivity.

Additional documentation:

* [Setting up shairport-sync](./docs/shairport-sync.md)
* [Setting up librespot](./docs/librespot.md)
* [My hardware](./docs/hardware.md)

## Installation

```shell
sudo python -m pip install qbee-gpio
````

For first time usage:
```shell
qbee --init-config
```
then change what you need in `~/.qbee.yaml`.

## Usage

```shell
qbee
```

Pass a `-v` flag for verbose logging.

## Detailed setup

For starting up automatically, create `/etc/systemd/system/qbee.service` file with (adjust users/paths):
```
[Unit]
Description=Qbee
After=network-online.target
StartLimitIntervalSec=500
StartLimitBurst=5

[Service]
User=qbee
Group=qbee
ExecStart=/usr/local/bin/qbee
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target
```
Enable to run on boot: `sudo systemctl enable qbee --now`.

Optionally, specify a `CONFIG` env variable when running the script:
`CONFIG="/etc/qbee.yaml" qbee ...`.
The default config will be located at `~/.qbee.yaml`.

See [all config options](./qbee_gpio/config.py)

