---
title: "Denon discovery — HEOS player ID"
description: "Reads the HEOS player ID (pid) of the first player in a Denon HEOS system via HEOS CLI on TCP port 1255. One variable; enter the HEOS player IP on import."
url: "https://taphome.com/en/compatibility/denon-discovery/"
language: en
lastmod: 2026-11-10
generator: hugo
ai:
  topics: ["tcp","audio","packet-parser","heos-cli","multi-room"]
  questions: ["How to get the HEOS player ID (pid) of a Denon speaker in TapHome?","What does the Denon discovery TapHome template read?","How to connect a Denon HEOS player to TapHome over TCP port 1255?","Why does Denon discovery show only one player when there are several HEOS speakers?","Why is the Denon player id value empty after importing the template?","What is the difference between the Denon discovery and Denon HEOS templates?"]
---

# Denon discovery — HEOS player ID

Communication: Packet Parser → TCP

## Integration guide

Denon discovery is a small helper template for Denon HEOS products. It does not scan the network for devices: it connects to one HEOS player at the IP address entered during import, asks the HEOS CLI (Command Line Interface) for the list of players in the HEOS system and stores the player ID (`pid`) of the **first** player in that list. The player commands of the HEOS CLI (`heos://player/...`) address a player by this `pid`.

The template contains one module with a single variable, **Denon player id**. It has no volume, mute or playback control.

> [!WARNING]
> The template always reads the first entry of the player list (`payload[0].pid`). In a HEOS system with several players it shows only that one `pid` — the HEOS CLI specification does not define the order of the list, so the first entry is not necessarily the speaker whose IP address was entered.

Full control of a HEOS player, and selecting a player from the list by its index (service actions **Get Players** and **Set Player Id**), is provided by the main [Denon HEOS](https://taphome.com/en/compatibility/denon-heos/) template. Denon discovery only reads the `pid`.

## Preparing the HEOS device

The HEOS CLI is part of the HEOS firmware; there is nothing to enable on the device and no extra hardware. The template is built against HEOS CLI v1.17, which corresponds to HEOS version 2.41.140.

1. Install the **HEOS App** (Android / iOS) on a phone or tablet in the same network and finish the initial setup of the HEOS device, so that it is connected to Wi-Fi or Ethernet. The CLI is not available until this setup is complete.
2. Find the IP address of the HEOS device — in the HEOS app under **Settings → My Devices → About**, or in the DHCP client list of the router. HEOS products also announce themselves on the LAN over UPnP SSDP (search target `urn:schemas-denon-com:device:ACT-Denon:1`).
3. Reserve that address in the router (DHCP reservation) or set a static IP, so that it does not change after a DHCP renewal.
4. Make sure the TapHome Core can reach the HEOS device on **TCP port 1255** — same LAN or routed subnet, no firewall blocking the port.

One HEOS device is enough: a connection to a single HEOS speaker gives access to every HEOS player in the network, so `get_players` returns all of them.

> [!WARNING]
> The HEOS CLI has no login of its own — any device that can reach TCP port 1255 can send commands to the HEOS system. Keep the HEOS products on a trusted network segment.

## Configuration

During import into the Packet Parser interface of the TapHome app, enter the IP address of the HEOS device in the **IP address** parameter; the port and message framing are already set in the template.

| Setting | Value |
|---------|-------|
| Transport | TCP, port 1255 |
| Message delimiter | `\r\n` for commands and responses |
| Connection | opened for each reading, not kept open (`StayConnected` off) |
| Reading interval | 15 s |
| Command sent | `heos://player/get_players` |
| Value stored | `payload[0].pid` from the JSON response |

The response of `get_players` is a JSON object with a `heos` header (`command`, `result`, `message`) and a `payload` array with one entry per player. Each entry carries `name`, `pid`, `model`, `version` and `network` (`wired` or `wifi`), plus `lineout`, and depending on the device `gid` (only when the player is part of a group), `control` and `serial`. The template keeps only the `pid` of the first entry.

## Device capabilities

### Denon player id

**Denon player id** is a variable that holds the HEOS player ID read from the first entry of the `get_players` response. It is refreshed every 15 seconds, so it follows the HEOS system when the list changes. The template has no write script for this variable — it is meant for reading only.

The value can be used wherever a HEOS `pid` is needed, for example when a `heos://player/*` command is sent from another Packet Parser module. When the full [Denon HEOS](https://taphome.com/en/compatibility/denon-heos/) template is in use, this helper is not needed — its **Get Players** and **Set Player Id** service actions already list the players and bind the module to the chosen one.

## Troubleshooting

### Denon player id stays empty after import

A HEOS speaker runs the CLI in a dormant mode and starts it only when the first TCP connection arrives. Right after that the CLI may not yet be able to answer player commands, because it first has to discover all players in the network. Wait for a few reading cycles (15 s each). Because this template closes the connection after every reading, the CLI can fall back to dormant mode between readings; the first readings after a longer pause may therefore stay empty as well.

If the value never appears, check that:

1. The IP address in the module still belongs to the HEOS device (DHCP reservation or static IP).
2. TCP port 1255 is reachable from the TapHome Core — same LAN, no firewall in between.
3. The HEOS device is fully online in the HEOS app.

### The value belongs to a different speaker

The template stores the `pid` of the first player in the list, which is not necessarily the speaker at the entered IP address. With several HEOS players use the main [Denon HEOS](https://taphome.com/en/compatibility/denon-heos/) template, whose **Get Players** service action shows the whole list (name, `pid`, model) and whose **Set Player Id** selects the player by its 0-based index.

### The pid changed

HEOS assigns `pid` values to the players in the network. If a speaker was factory-reset or replaced, it can get a new `pid`; Denon player id shows the new value on the next reading, but a value copied elsewhere must be updated by hand.

## Available devices 1

These devices appear in TapHome after import.

Denon discovery Module

Denon player id Variable

Read (module)

```taphome
SENDDATA("heos://player/get_players")
```

Listener

```taphome
VAR responseJson := TOSTRING(RECEIVEDBYTES);
Va := PARSEJSON(responseJson,"$.payload[0].pid", 1);
```

**Connection:** Packet Parser → TCP

## Import parameters

Enter these values when you import the XML.

| Asked in the app | Default       |
|------------------|---------------|
| IP address       | `192.168.0.1` |

## Related Documentation

- [Packet Parser Integration](https://taphome.com/en/compatibility/packet-parser-guide/)
- [Packet Parser (HTTP, TCP, UDP, FTP, MQTT)](https://taphome.com/en/docs/integration/packet-parser/)
- [Packet parser functions](https://taphome.com/en/docs/script/packet-parser/)
- [Parsing functions](https://taphome.com/en/docs/script/parsing-functions/)

