Metadata-Version: 2.1
Name: funiculi
Version: 0.2.0
Summary: Control your Denon AVR amplifier from the command line
License: Apache-2.0
Author: Claudia Pellegrino
Author-email: clau@tiqua.de
Requires-Python: >=3.8
Classifier: Development Status :: 3 - Alpha
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: MacOS
Classifier: Operating System :: POSIX :: Linux
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
Classifier: Topic :: Home Automation
Classifier: Topic :: Utilities
Requires-Dist: colorama
Requires-Dist: fire
Description-Content-Type: text/markdown

# Funiculi

Funiculi is a tiny command-line utility which lets you interact with
Denon AVR amplifiers over your local network.

It currently supports turning the unit on and off, querying its
power status, changing its volume, and streaming music to it over
[DLNA](https://en.wikipedia.org/wiki/DLNA).

## Prerequisites

You need the following software installed on your system:

- [`ncat`](https://github.com/nmap/nmap/tree/master/ncat#readme)

- [`pulseaudio-dlna`](https://github.com/Cygn/pulseaudio-dlna)

## Installation

### Installing from PyPI

To install Funiculi from PyPI, open a shell and run:

```shell
pip install funiculi
```

If that doesn’t work, try:

```shell
python3 -m pip install funiculi
```

### Installing from the AUR

Direct your favorite
[AUR helper](https://wiki.archlinux.org/title/AUR_helpers) to the
`funiculi` package.

## Usage

```shell
funiculi [FLAGS] COMMAND
```

`COMMAND` is one of the following:

- `off`  
  Turns the device off.

- `on`  
  Turns the device on.

- `down`  
  Turns the volume down one step.

- `up`  
  Turns the volume up one step.

- `source [get | set NAME]`  
  Selects or queries the audio source.

- `status`  
  Queries whether the device is on standby.

- `dlna`  
  Sets up a local virtual output device that relays all audio to the
  receiver via DLNA.

See [`USAGE.md`](https://github.com/claui/funiculi/blob/main/USAGE.md) or `man 1 funiculi` for details.

## Contributing to Funiculi

See [`CONTRIBUTING.md`](https://github.com/claui/funiculi/blob/main/CONTRIBUTING.md).

## License

Copyright (c) 2024 Claudia Pellegrino

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
For a copy of the License, see [LICENSE](LICENSE).

<!-- markdownlint-configure-file { "MD041": { "level": 1 } } -->

# Synopsis

```shell
funiculi [FLAGS] COMMAND
```

# Commands

`COMMAND` is one of the following:

`off`
: Turns the device off.

`on`
: Turns the device on.

`down`
: Turns the volume down one step.

`up`
: Turns the volume up one step.

`source [get | set NAME]`
: Selects or queries the audio source.
The `get` subcommand returns the current source.
The `set` subcommand accepts a source name according to Denon’s
protocol; the name is case-insensitive.
Acceptable values vary by model. To find out the values for a
specific model, omit this parameter while your device is set to a
known source. Repeat for each source.

`status`
: Queries whether the device is on standby.

`dlna`
: Sets up a local virtual output device that relays all audio to the
: receiver via DLNA.

# Flags

The following flags are supported:

## `-h`, `--host=HOST`

The AVR host to connect to.

Mandatory if no `AVR_HOST` environment variable is defined.

The parameter takes precedence over the environment variable.

## `-c`, `--ctrlport=CTRLPORT`

The AVR control port to connect to.

The default is 23.

## `-w`, `--webport=WEBPORT`

The AVR web port from which to obtain DLNA metadata.

The default is 60006.

## `-t, --timeout=TIMEOUT`

The timeout for commands in milliseconds.

The default timeout is 100 ms.

## `-p`, `--path=PATH`

The remote path to the UPnP XML descriptor.

The default value is: `/upnp/desc/aios_device/aios_device.xml`

