Skip to content

Commit d1f147a

Browse files
committed
feat: improve defaults and project documentation
1 parent 363852e commit d1f147a

11 files changed

Lines changed: 89 additions & 16 deletions

File tree

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# HomeWave
2+
3+
HomeWave is a Home Assistant OS add-on that turns a Home Assistant host into a
4+
low-latency AirPlay 2 receiver. Audio is sent directly to Home Assistant's
5+
native PulseAudio service, so the platform's built-in audio-device selector
6+
remains the single place to choose the physical output.
7+
8+
## Highlights
9+
10+
- AirPlay 2 receiver powered by Shairport Sync and nqptp.
11+
- Native PulseAudio output with no ALSA fallback or duplicate sink selector.
12+
- Stable, low-latency defaults for `amd64`, `aarch64`, and `armv7`.
13+
- Per-stream 60 dB volume range: a practical silent minimum and full output at
14+
the top of the AirPlay control.
15+
- Compact normal logs and optional diagnostics for troubleshooting.
16+
17+
## Install
18+
19+
In Home Assistant, open **Settings → Add-ons → Add-on Store → Repositories**
20+
and add:
21+
22+
```text
23+
https://github.com/KleoPadre/homewave-ha
24+
```
25+
26+
Install **HomeWave AirPlay 2**, select the output device in Home Assistant's
27+
audio-device selector, and start the add-on. Stop any other AirPlay receiver on
28+
the host before using HomeWave.
29+
30+
## Settings
31+
32+
| Setting | Default | Description |
33+
| --- | --- | --- |
34+
| `airplay_name` | `HomeWave` | Name displayed in the AirPlay receiver list. |
35+
| `audio_profile` | `stable` | Latency profile: minimal (0.10 s), standard (0.15 s), stable (0.30 s), or custom. |
36+
| `custom_buffer_seconds` | `0.15` | Buffer length for the custom profile, from 0.08 to 0.50 seconds. |
37+
| `offset_seconds` | `0.0` | Advanced timing correction from -2 to 2 seconds. Leave unchanged unless measured playback requires it. |
38+
| `interpolation` | `auto` | Resampling mode: auto, basic, or soxr. |
39+
| `default_airplay_volume` | `-24.0 dB` | Suggested initial source volume. AirPlay's range is mapped to a 60 dB per-stream curve. |
40+
| `diagnostics` | `false` | Enables detailed Shairport Sync statistics and debug logs. Keep disabled during normal use. |
41+
42+
## Support and testing
43+
44+
Use the `stable` profile first. If playback is reliable on a wired network, try
45+
`standard` or `minimal` for lower latency. If you encounter clicks or dropouts,
46+
return to `stable`, enable diagnostics, and review the add-on log.
47+
48+
The add-on does not provide MQTT metadata or remote control in the 0.1 release
49+
series.

airplay2_lowlatency/CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog
22

3+
## 0.1.3
4+
5+
- Use the stable latency profile by default.
6+
- Keep normal logging concise and reserve detailed statistics for diagnostics.
7+
38
## 0.1.2
49

510
- Map the AirPlay volume control to a 60 dB per-stream attenuation range for a

airplay2_lowlatency/README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,17 +20,17 @@ JohannVR, v3rm0n, or other Shairport Sync add-on before starting HomeWave.
2020
| Option | Allowed values | Default | Effect and safe correction |
2121
| --- | --- | --- | --- |
2222
| `airplay_name` | Non-empty text | `HomeWave` | Receiver name shown by AirPlay. |
23-
| `audio_profile` | `minimal`, `standard`, `stable`, `custom` | `standard` | Selects the buffer profile. Start with standard. |
23+
| `audio_profile` | `minimal`, `standard`, `stable`, `custom` | `stable` | Selects the buffer profile. Stable is recommended. |
2424
| `custom_buffer_seconds` | `0.08` to `0.50` | `0.15` | Used only by custom. Increase it when diagnostics show dropouts. |
2525
| `offset_seconds` | `-2` to `2` | `0.0` | Advanced playback synchronisation correction; change only after measurement. |
2626
| `interpolation` | `auto`, `basic`, `soxr` | `auto` | Advanced resampling. Keep auto unless diagnosing a device-specific issue. |
2727
| `default_airplay_volume` | `-30` to `0` dB | `-24.0` | Initial stream volume; never changes the global Home Assistant sink volume. |
2828
| `diagnostics` | `true`, `false` | `false` | Writes Shairport Sync statistics to the add-on log. Enable while investigating audio faults. |
2929

3030
Latency profiles are `minimal` (0.10 seconds), `standard` (0.15 seconds),
31-
`stable` (0.30 seconds), and `custom` (0.08–0.50 seconds). Minimal is suitable
32-
for a stable wired network but may click on an unstable network. If standard
33-
clicks, enable diagnostics and try stable before lowering the buffer.
31+
`stable` (0.30 seconds), and `custom` (0.08–0.50 seconds). Stable is the
32+
recommended default. Minimal is suitable for a stable wired network but may
33+
click on an unstable network.
3434

3535
AirPlay's `-30` to `0` dB control range is mapped to a 60 dB Shairport Sync
3636
attenuation range. This makes the lowest source setting practically silent and
@@ -46,6 +46,6 @@ For migration, stop and uninstall the prior receiver, install HomeWave, select
4646
the output device in Home Assistant, then start HomeWave. To roll back, stop
4747
HomeWave before re-enabling the former receiver. Do not run both at once.
4848

49-
When troubleshooting, enable diagnostics, reproduce the issue, inspect the
50-
add-on log for underruns or overruns, then disable diagnostics after collecting
51-
the required information. Do not share logs containing private device names.
49+
Normal operation writes concise connection and error information to the add-on
50+
log. Enable diagnostics only for troubleshooting; it adds detailed statistics
51+
and debug-level messages. Do not share logs containing private device names.

airplay2_lowlatency/README.ru.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,16 @@ HomeWave — аддон Home Assistant OS, принимающий аудио Air
1919
| Параметр | Допустимые значения | По умолчанию | Действие и безопасная коррекция |
2020
| --- | --- | --- | --- |
2121
| `airplay_name` | Непустой текст | `HomeWave` | Имя приёмника в AirPlay. |
22-
| `audio_profile` | `minimal`, `standard`, `stable`, `custom` | `standard` | Выбирает профиль буфера; начните со standard. |
22+
| `audio_profile` | `minimal`, `standard`, `stable`, `custom` | `stable` | Выбирает профиль буфера; рекомендуется stable. |
2323
| `custom_buffer_seconds` | от `0.08` до `0.50` | `0.15` | Используется только в custom; увеличьте при пропусках в диагностике. |
2424
| `offset_seconds` | от `-2` до `2` | `0.0` | Расширенная коррекция синхронизации; меняйте только после измерения. |
2525
| `interpolation` | `auto`, `basic`, `soxr` | `auto` | Расширенный ресемплинг; оставьте auto, если нет особой причины. |
2626
| `default_airplay_volume` | от `-30` до `0` дБ | `-24.0` | Начальная громкость потока; не меняет общую громкость Home Assistant. |
2727
| `diagnostics` | `true`, `false` | `false` | Выводит статистику Shairport Sync в журнал аддона. |
2828

2929
Профили задержки: `minimal` (0.10 секунды), `standard` (0.15), `stable` (0.30)
30-
и `custom` (0.08–0.50). Minimal подходит для стабильной проводной сети, но в
31-
нестабильной сети возможны щелчки. Если щелчки есть в standard, включите
32-
диагностику и сначала попробуйте stable.
30+
и `custom` (0.08–0.50). Stable используется по умолчанию. Minimal подходит для
31+
стабильной проводной сети, но в нестабильной сети возможны щелчки.
3332

3433
Шкала AirPlay от `-30` до `0` дБ сопоставлена с 60 дБ ослабления Shairport
3534
Sync. Поэтому нижнее положение источника практически бесшумно, а верхнее

airplay2_lowlatency/config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: HomeWave AirPlay 2
3-
version: 0.1.2
3+
version: 0.1.3
44
slug: airplay2_lowlatency
55
description: Low-latency AirPlay 2 receiver using Home Assistant PulseAudio.
66
url: https://github.com/KleoPadre/homewave-ha
@@ -15,7 +15,7 @@ host_network: true
1515
audio: true
1616
options:
1717
airplay_name: HomeWave
18-
audio_profile: standard
18+
audio_profile: stable
1919
custom_buffer_seconds: 0.15
2020
offset_seconds: 0.0
2121
interpolation: auto

airplay2_lowlatency/shairport-sync.conf.tpl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ general =
99
volume_max_db = 0.0;
1010
audio_backend_buffer_desired_length_in_seconds = @@BUFFER_SECONDS@@;
1111
audio_backend_latency_offset_in_seconds = @@OFFSET_SECONDS@@;
12+
};
13+
14+
diagnostics =
15+
{
1216
@@DIAGNOSTICS@@
1317
};
1418

airplay2_lowlatency/start-addon.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,8 @@ main() {
8989

9090
if [[ "$diagnostics" == true ]]; then
9191
printf ' log_output_to = "stdout";\n statistics = "yes";\n log_verbosity = 2;\n' >"$diagnostics_file"
92+
else
93+
printf ' log_output_to = "stdout";\n statistics = "no";\n log_verbosity = 1;\n' >"$diagnostics_file"
9294
fi
9395

9496
sed '/@@DIAGNOSTICS@@/r '"$diagnostics_file"$'\n/@@DIAGNOSTICS@@/d' "$TEMPLATE_PATH" |

airplay2_lowlatency/translations/en.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ configuration:
66
audio_profile:
77
name: Audio profile
88
description: >-
9-
Standard is recommended. Minimal has the lowest latency but may click on
9+
Stable is recommended. Minimal has the lowest latency but may click on
1010
unstable networks; stable uses more buffering.
1111
custom_buffer_seconds:
1212
name: Custom buffer (seconds)

airplay2_lowlatency/translations/ru.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ configuration:
66
audio_profile:
77
name: Аудиопрофиль
88
description: >-
9-
Стандартный профиль рекомендован по умолчанию. Минимальный даёт наименьшую
9+
Стабильный профиль рекомендован по умолчанию. Минимальный даёт наименьшую
1010
задержку, но при нестабильной сети возможны щелчки; стабильный использует
1111
больший буфер.
1212
custom_buffer_seconds:

tests/config-schema.bats

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,15 @@
3333

3434
[ "$status" -eq 0 ]
3535
}
36+
37+
@test "manifest defaults to the stable profile with compact diagnostics" {
38+
run ruby -e '
39+
require "yaml"
40+
config = YAML.load_file(ARGV.fetch(0))
41+
options = config.fetch("options")
42+
abort "stable profile must be the default" unless options.fetch("audio_profile") == "stable"
43+
abort "diagnostics must be disabled by default" unless options.fetch("diagnostics") == false
44+
' "$BATS_TEST_DIRNAME/../airplay2_lowlatency/config.yaml"
45+
46+
[ "$status" -eq 0 ]
47+
}

0 commit comments

Comments
 (0)