Skip to content

Other Control Systems

cklit edited this page Sep 18, 2026 · 3 revisions

Connecting to Other Control Systems

For wiring BGAdaptor up to your own control system (a home automation setup, a macro button, etc.), there are three ways to talk to it directly over your network — no Home Assistant needed.

Use the adaptor's IP address rather than beogram.local for all of these — the DNS lookup for .local addresses can noticeably slow requests down.

Sending commands

POST <ip>/command/play
POST <ip>/command/stop
POST <ip>/command/next
POST <ip>/command/prev
POST <ip>/command/standby

Example:

curl --location --request POST 'http://192.168.100.37/command/next'

Jumping to a track (CD players only)

POST <ip>/command/track

Takes a number parameter — 1 or 2 digits, 1–99, no leading zero — and queues the same digit-entry sequence the remote uses to jump straight to that track. Responds 202 once it's queued, or 400 if the number isn't valid.

Example:

curl --location --request POST 'http://192.168.100.37/command/track?number=7'

Reading the current status

GET <ip>/status

Returns a snapshot as JSON — playback state, track, whether the product/Halo are connected, current settings, and so on. Good for a system that just wants to check in occasionally rather than stay connected.

The playback-relevant fields:

Field Meaning
beogram_state Text playback state, e.g. Playing, Stopped
beogram_track Current track (CD players only)
beogram_playing true/false
product_connected Whether the adaptor currently has a live connection to your B&O product
device_type record, cd, or tape

If you've linked a peer adaptor, the same response also includes peer_online, peer_playing, peer_state, peer_track, and peer_deck for the linked deck.

Live updates over WebSocket

For a system that wants to react instantly rather than poll, connect a WebSocket client to:

ws://<ip>:81

This is the same connection the adaptor's own control page uses for live updates — as soon as you connect you're sent the current state, and again every time it changes, with nothing further needed on your end. The message looks like:

{
  "state": "Playing",
  "track": "3",
  "deck": "cd",
  "title": "Living Room CD",
  "playing": true
}

If a peer adaptor is linked, the same message also includes peer_online, peer_playing, peer_state, peer_track, peer_deck, and peer_title for the linked deck.

Clone this wiki locally