Sony AV Receiver (Legacy HTTP)
Older networked Sony AV receivers (the STR-DA / ES generation that exposes the built-in
/request.cgi control page) are driven over plain HTTP on the LAN. GEM POSTs small JSON control
packets to the receiver's own IP on port 80 — there is no gateway, no serial adapter, and no
login. One receiver becomes one GEM device, and commands target that device directly: this driver
creates no zones on its own.
Once the receiver's IP is entered, GEM can turn the main zone on and off, switch its input, set and step the volume, and toggle mute, and it polls the receiver so power, volume, and the current input stay live on your touchpanels and in triggers. If a room's audio runs through this receiver, you can also make it the Volume Device for that room's AV zone so the zone volume slider drives it — see Feeding an AV zone.
This driver is for legacy Sony receivers that expose the /request.cgi HTTP control page. GEM
ships several Sony drivers — pick by the kind of gear and how it's reachable:
- Sony AV Receiver (Legacy HTTP) — this driver. Older networked Sony receivers with the
/request.cgicontrol API; LAN control, no authentication. - Sony BRAVIA TV (HTTP) — modern BRAVIA Android/Google TVs over the REST/IRCC API with a Pre-Shared Key. See Sony BRAVIA TV (HTTP).
- Sony TV (Simple IP Control) — the older text "Simple IP Control" protocol on TCP 20060. See Sony TV (Simple IP Control).
- Sony Projector (IP Control) — Sony projectors over IP control. See Sony Projector (IP Control).
- Sony TV (Serial over IP) and Sony Blu-ray (UPnP) cover the matching Sony display and source gear over their own transports.
Reach for this driver when the receiver is on the network and answers at
http://<receiver-ip>/request.cgi.
What's controlled
- Power — main-zone on and off, with a power-state query.
- Input — select the main-zone input by its Sony name, and read back the input currently selected.
- Volume — set an absolute level (a 0–100 slider that GEM converts to the receiver's own decibel scale), step it up and down, and read the current level. See How volume works.
- Mute — a single mute toggle (the receiver has no separate mute-on / mute-off over this API).
- Live status feedback — GEM polls the receiver and reports power, volume, and the current input, so a UI button or a trigger stays in sync even when someone uses the receiver's own remote.
As written, this driver controls the receiver's main zone. Every command targets the main output, so a second powered zone (Zone 2) on the receiver is not separately controllable through this driver today. If you bind more than one AV zone to this receiver (see Feeding an AV zone), they all mirror the same main-zone volume and input.
Prerequisites
- The receiver on the same network as GEM, at a fixed IP (give it a static IP or a DHCP reservation so the address never moves).
- The legacy
/request.cgicontrol endpoint reachable — openhttp://<receiver-ip>/request.cgifrom a browser on the same network to confirm it answers. Some firmware revisions ship with the legacy control page disabled; if it doesn't respond, this driver can't reach it. - No username or password is required — the legacy endpoint is unauthenticated on the LAN.
Setup
- Open Devices, add a device, and choose the Sony AV Receiver (Legacy HTTP) driver.
- Choose the AV subsystem and set the device type to a receiver type (audio_receiver).
- Fill in the connection fields:
- Receiver IP Address (required) — the receiver's own LAN IP (for example
192.168.1.50). - HTTP Port — leave at the default 80 unless the receiver serves control on a different port.
- Status Poll Interval (ms) — optional; defaults to 10000 (10 seconds). See Live status feedback.
- Receiver IP Address (required) — the receiver's own LAN IP (for example
- Save and enable the device. GEM begins polling the receiver immediately and marks it connected on the first successful response.
- On the device's Commands tab, run
get_power, thenpower_on/power_offand avolumeto confirm control end-to-end before wiring the receiver into macros, a UI, or an AV zone.
How volume works
The receiver's real volume is a decibel value from -92 dB to +23 dB. GEM presents that to you as a familiar 0–100 slider and converts in both directions:
- Setting
volumewith alevelof 0 sends the receiver's minimum (-92 dB); alevelof 100 sends its maximum (+23 dB); everything in between scales linearly. - When GEM reads the level back, it converts the receiver's decibel value the other way into the same 0–100 scale, and stores it.
Because the conversion rounds to the nearest whole step in each direction, a level you set and then read back can land a point or two off, most noticeably near the very top and bottom of the range. This is expected — the slider is a scaled view of a coarser decibel value, not a 1:1 mapping.
- Stepping.
volume_upandvolume_downnudge the main-zone volume one receiver step at a time. Each step also schedules a volume read about two seconds later, so the reported level catches up to where the receiver actually landed.
Feeding an AV zone
This receiver is a natural Volume Device for a room whose audio runs through it. To wire that up:
- Open AV Zones and edit (or create) the room's AV zone.
- Set its Volume Device to this receiver and save.
From then on the zone's volume slider and the receiver stay in step: setting the zone volume drives the receiver, and as GEM polls the receiver it pushes the current volume and input back onto that zone so the touchpanel reflects reality — even when someone turns the knob on the receiver.
GEM picks up the binding when the receiver connects, so if you change a zone's Volume Device to (or from) this receiver, reload the receiver device afterward so it re-reads which zones it feeds. As noted above, if several zones point at this one receiver they all track the same main-zone level and input.
Live status feedback
GEM polls the receiver on the Status Poll Interval (default 10 seconds). On each pass it reads power first; only if the receiver reports it is on does it then read volume and input (with a short gap between reads to avoid overrunning the legacy endpoint). So a full poll of a powered-on receiver takes a few seconds, and a receiver that's off is polled only for power until it comes back on.
Each polled value is written to a device attribute — power_state, main_volume, main_input — so
a touchpanel button, a dashboard, or a trigger reflects the receiver's real state without you doing
anything. Raise the interval for lighter network traffic; lower it for snappier feedback.
Attributes
status_interval is specific to this driver; the status attributes below are written automatically
by GEM as it polls — you don't create them by hand, but type them exactly when you reference them in
a trigger or macro.
Device — required
| Attribute | Type | Description |
|---|---|---|
ip | string | The receiver's own LAN IP address (e.g. 192.168.1.50). |
Device — optional
| Attribute | Type | Default | Description |
|---|---|---|---|
port | int | 80 | HTTP port for the /request.cgi control endpoint. Leave at 80 unless the receiver serves control elsewhere. |
status_interval | int | 10000 | How often (ms) GEM polls the receiver for power, then volume and input when it's on. |
Device — status (set automatically)
| Attribute | Type | Description |
|---|---|---|
power_state | string | Last polled main-zone power state as the receiver reports it. |
main_volume | int | Last polled main-zone volume, on the 0–100 scale. |
main_input | string | Last polled main-zone input name. |
The last volume you set and the last input you selected are also stored on the device (volume and
input) as you issue those commands. The driver inherits the standard HTTP-device tuning fields; the
defaults suit a receiver on a LAN, so leave them alone unless you have a reason to change them.
Zone
When you bind an AV zone to this receiver as its Volume Device, GEM keeps the backing zone's volume
attribute (0–100) in sync as it polls — that's the value a zone volume slider reads and writes.
Commands
Driver-declared commands appear on the device's Commands tab and can be used in macros, triggers, and on UI buttons. All target the receiver's main zone.
Power
| Command | Action |
|---|---|
power_on | Turn the receiver's main zone on. |
power_off | Turn the receiver's main zone off (standby). |
get_power | Query the current power state. |
Input
| Command | Action |
|---|---|
input (arg input) | Select the main-zone input by its Sony input name. |
get_input | Query the input currently selected. |
Volume and mute
| Command | Action |
|---|---|
volume (arg level) | Set absolute main-zone volume on the 0–100 scale (GEM converts to decibels — see How volume works). |
volume_up / volume_down | Step the main-zone volume up / down one receiver step; a volume read is scheduled ~2 s later to refresh the level. |
get_volume | Query the current main-zone volume. |
mute_toggle | Toggle main-zone mute (there is no separate mute-on / mute-off over this API). |
Known limitations and quirks
- Main zone only. Every command drives the receiver's main output; a second powered zone (Zone 2) is not separately addressable through this driver. Multiple AV zones bound to this receiver all track the same main-zone volume and input.
- Legacy control endpoint. This is the older
/request.cgiJSON control page. Some firmware revisions disable it; ifhttp://<receiver-ip>/request.cgidoesn't answer, the driver can't reach the receiver. - Volume is decibel-scaled. The 0–100 slider is a scaled view of the receiver's -92 dB to +23 dB range, so a set-then-read value can round a point or two, most visibly near the extremes.
- Mute is toggle-only. There's a single
mute_toggle; the API exposes no discrete mute-on / mute-off, and mute state is not polled back, so a UI can't reliably show the current mute state from this receiver. - No authentication. The legacy endpoint has no login, so keep the receiver on a trusted network segment.
- Creates no zones. A receiver is one GEM device; it does not auto-create any zones. You attach it to a room by setting it as an AV zone's Volume Device (see Feeding an AV zone).
Troubleshooting
| Symptom | Check |
|---|---|
| No status updates / never connects | Confirm the receiver is reachable at http://<receiver-ip>/request.cgi from the same network. Some firmware revisions disable the legacy control endpoint by default. Confirm the IP hasn't changed (use a static IP / DHCP reservation). |
| Volume slider lands at an unexpected level | Volume is decibel-scaled internally (-92 dB to +23 dB → 0–100). Slight rounding near the top and bottom of the range is expected — see How volume works. |
| Zone volume slider does nothing | Confirm this receiver is set as that AV zone's Volume Device, and that the room's audio actually runs through this receiver. If you just changed the binding, reload the receiver device so it re-reads which zones it feeds. |
| Second zone (Zone 2) won't respond separately | Expected — this driver controls the main zone only. |
| Power/volume/input readout never reflects the front-panel knob | Confirm the receiver is reachable and polling is running (the Status Poll Interval isn't set absurdly high); the background poll is what catches changes made at the receiver. Note the receiver must be on before GEM polls volume and input. |
See also
- AV Zones — set this receiver as a zone's Volume Device for volume feedback.
- Devices — adding and configuring devices.
- Commands — running and scripting device commands.
- Attributes — editing device attributes such as
status_interval. - Triggers — fire automations on the receiver's power, volume, or input.
- Sony BRAVIA TV (HTTP) — the companion driver for modern Sony displays.