Skip to content

Commit 76a8654

Browse files
committed
doc: update readme with latest docs
1 parent 3d94de5 commit 76a8654

1 file changed

Lines changed: 27 additions & 5 deletions

File tree

README.md

Lines changed: 27 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
[![Go Report Card](https://goreportcard.com/badge/github.com/b0bbywan/go-odio-api)](https://goreportcard.com/report/github.com/b0bbywan/go-odio-api)
88
[![GitHub Sponsors](https://img.shields.io/github/sponsors/b0bbywan?label=Sponsor&logo=GitHub)](https://github.com/sponsors/b0bbywan)
99

10-
> Part of the [odio](https://beta.odio.love/) project.
10+
> Part of the [odio](https://beta.odio.love/) project[full documentation](https://docs.odio.love/api/).
1111
1212
Odio is an ultra-lightweight Go daemon that exposes a single clean REST API over your Linux user session's D-Bus: MPRIS players (Spotify, VLC, Firefox, MPD, Kodi), PulseAudio/PipeWire, systemd user services, and power management. No root. No hacks. Just Linux primitives.
1313

@@ -204,6 +204,24 @@ Bonus: You get to control it through `/pulseaudio/clients` or `/players/` and in
204204

205205
Remote reboot and power-off via the REST API — no SSH needed for day-to-day operations. Disabled by default. Uses `org.freedesktop.login1` D-Bus interface.
206206

207+
On desktop systems with a graphical session, logind handles permissions automatically — no extra configuration needed.
208+
209+
On **headless systems**, you need a polkit rule to allow your user to reboot/power-off via D-Bus. Create `/etc/polkit-1/rules.d/10-allow-shutdown.rules`:
210+
211+
```javascript
212+
polkit.addRule(function(action, subject) {
213+
if ((action.id == "org.freedesktop.login1.power-off" ||
214+
action.id == "org.freedesktop.login1.power-off-multiple-sessions" ||
215+
action.id == "org.freedesktop.login1.reboot" ||
216+
action.id == "org.freedesktop.login1.reboot-multiple-sessions") &&
217+
subject.user == "<user>") {
218+
return polkit.Result.YES;
219+
}
220+
});
221+
```
222+
223+
Replace `<user>` with the username running odio-api.
224+
207225
### Real-time Event Stream (SSE)
208226

209227
`GET /events` streams live state changes to any HTTP client — no polling needed.
@@ -471,6 +489,14 @@ power:
471489
reboot: true
472490
```
473491

492+
#### PulseAudio
493+
494+
```yaml
495+
pulseaudio:
496+
enabled: true
497+
serve_cookie: true # exposes GET /audio/cookie for network audio clients
498+
```
499+
474500
#### Zeroconf / mDNS
475501

476502
```yaml
@@ -657,11 +683,7 @@ Systemd control is disabled by default and requires an explicit whitelist. Odio
657683
- **Root forbidden by design** — Odio refuses to run as root.
658684
- **No preconfigured units** — nothing managed unless explicitly listed.
659685

660-
- **MPRIS Backend**: Communicates with media players via D-Bus, implements smart caching and real-time updates through D-Bus signals
661-
- **PulseAudio Backend**: Interacts with PulseAudio/PipeWire for audio control, supports real-time event monitoring
662-
- **Systemd Backend**: Manages systemd services via D-Bus with native signal-based monitoring
663686
**You must knowingly enable this at your own risk.** Odio is free software and comes with no warranty.
664-
- **Bluetooth Backend**: Act as a Bluetooth audio receiver (A2DP sink) via D-Bus
665687

666688
### REST API
667689

0 commit comments

Comments
 (0)