Skip to main content

Response Sets

Response Sets define patterns for parsing feedback from devices. They enable bi-directional communication by extracting meaningful state information from device responses.

Overview

When devices send feedback over serial, TCP, or other protocols, Response Sets provide the parsing rules to interpret that feedback and update zone states, attributes, or trigger actions.

Viewing Response Sets

The main grid displays all configured response sets with the following columns:

  • ID - Unique identifier
  • Name - Internal response set name
  • Description - Purpose or device protocol description

Grid Actions

  • Add - Create a new response set
  • Delete - Remove a response set
  • Reload - Refresh the grid data

Quick Actions

  • Responses Icon - View and manage individual response patterns in the set (opens the Responses page)

Creating a Response Set

To create a new response set:

  1. Click Add in the grid toolbar
  2. Enter a name when prompted (auto-formatted to lowercase_with_underscores)
  3. The response set is created
  4. Click the Responses icon to add individual response patterns

Managing Response Patterns

Click the Responses icon on any response set row to open the Responses page, where you define the actual parsing rules. Each response pattern specifies:

  • Pattern - Regular expression or string to match against device feedback
  • Type - What to do when matched (update zone state, set attribute, trigger macro)
  • Extraction - How to extract values from the match (capture groups)
  • Mapping - How to interpret extracted values (value translation)

When to Use Response Sets

Response sets are needed for devices that send feedback GEM needs to interpret:

Unsolicited Feedback - Devices that push status updates:

PWR ON
VOL 45
INPUT HDMI1

Query Responses - Devices that reply to status queries:

> ?POWER
< POWER=ON

Custom Protocols - Proprietary device protocols:

<STATUS>ZONE1|PWR:1|VOL:65|SRC:3</STATUS>

Assigning Response Sets to Devices

Response sets are assigned in the Device editor:

  1. Navigate to System > Devices
  2. Edit the target device
  3. In the General tab, select the Response Set field
  4. Choose the appropriate response set
  5. Save the device

The device driver will now use the response set to parse incoming feedback.

Debugging Response Sets

View Raw Responses

Enable device logging to see raw device feedback:

  1. Navigate to Insights > Logging
  2. Select Device as the monitor target
  3. Select the device to monitor
  4. Review incoming messages to verify format

Monitor Zone Updates

Check if responses are correctly updating zone states:

  1. Navigate to Insights > History
  2. Select the zone and attribute to monitor
  3. Verify updates match expected device responses

Best Practices

  1. Descriptive Names: Name response sets after the device protocol they parse (e.g., denon_avr, lutron_radiora)

  2. Description Field: Document the protocol format and any special parsing notes

  3. One Per Protocol: Create one response set per device protocol, then share it across devices using the same protocol

  4. Test Incrementally: Start with simple patterns, verify they work, then add complexity

Troubleshooting

Responses Not Parsing

  1. Check Assignment: Ensure the response set is assigned to the device (System > Devices)
  2. Enable Logging: View raw device feedback to confirm the data format
  3. Verify Patterns: Check individual response patterns via the Responses icon
  4. Test Patterns: Use a regex tester to validate pattern syntax against actual device output

Wrong Values Extracted

  1. Check Capture Groups: Verify group numbers match pattern parentheses
  2. Review Value Mapping: Ensure value translation is correct
  3. Validate Types: Confirm value types (int, float, string) are appropriate