{"id":243,"date":"2026-04-01T16:13:39","date_gmt":"2026-04-01T16:13:39","guid":{"rendered":"https:\/\/www.myuremote.com\/website\/?page_id=243"},"modified":"2026-04-27T21:13:02","modified_gmt":"2026-04-27T21:13:02","slug":"advanced-command-reference","status":"publish","type":"page","link":"https:\/\/www.myuremote.com\/website\/docs\/how-to\/device-database-commands\/advanced-command-reference\/","title":{"rendered":"Advanced Command Reference"},"content":{"rendered":"\n<!doctype html>\n<html lang=\"en\">\n<head>\n  <meta charset=\"utf-8\" \/>\n  <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" \/>\n  <title>Advanced Command &#038; Feedback Reference \u2013 MyURemote<\/title>\n  <meta name=\"description\" content=\"Deep technical explanation of how commands, responses and feedback parsing work in MyURemote.\" \/>\n  <style>\n    :root {\n      --max: 1080px;\n      --bg: #ffffff;\n      --card: #fafafa;\n      --border: #e6e6e6;\n      --text: #111;\n      --muted: #555;\n      --accent: #0f62fe;\n      --ok: #0a7f32;\n      --warn: #b26a00;\n      --danger: #b00020;\n      --code: #f0f0f0;\n    }\n\n    * { box-sizing: border-box; }\n\n    body {\n      font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;\n      margin: 0;\n      background: var(--bg);\n      color: var(--text);\n    }\n\n    .wrap {\n      max-width: var(--max);\n      margin: 0 auto;\n      padding: 28px 18px 48px;\n    }\n\n    .card {\n      border: 1px solid var(--border);\n      border-radius: 14px;\n      padding: 18px;\n      margin: 14px 0;\n      background: var(--card);\n    }\n\n    h1 { font-size: clamp(28px, 4vw, 38px); margin: 0 0 10px; }\n    h2 { font-size: 22px; margin: 18px 0 10px; }\n    h3 { font-size: 17px; margin: 16px 0 8px; }\n    h4 { font-size: 15px; margin: 14px 0 6px; }\n\n    p, li { line-height: 1.6; }\n    p { margin: 10px 0; }\n    ul, ol { margin: 10px 0 0 20px; padding: 0; }\n\n    code {\n      background: #eee;\n      padding: 2px 6px;\n      border-radius: 6px;\n      white-space: pre-wrap;\n      word-break: break-word;\n    }\n\n    pre {\n      background: var(--code);\n      border-radius: 10px;\n      padding: 14px;\n      overflow: auto;\n      margin: 10px 0;\n      font-size: 14px;\n      line-height: 1.45;\n    }\n\n    table {\n      width: 100%;\n      border-collapse: collapse;\n      margin: 12px 0;\n      background: #fff;\n      border: 1px solid var(--border);\n      border-radius: 10px;\n      overflow: hidden;\n      display: table;\n    }\n\n    th, td {\n      border-bottom: 1px solid var(--border);\n      padding: 9px 10px;\n      text-align: left;\n      vertical-align: top;\n      font-size: 14px;\n    }\n\n    th {\n      background: #f3f3f3;\n      font-weight: 700;\n    }\n\n    tr:last-child td { border-bottom: 0; }\n\n    .note, .warning, .danger, .rule {\n      padding: 10px 12px;\n      border-radius: 8px;\n      margin: 12px 0;\n      background: #fff;\n    }\n\n    .note { border-left: 4px solid var(--accent); background: #f4f8ff; }\n    .warning { border-left: 4px solid var(--warn); background: #fff8ed; }\n    .danger { border-left: 4px solid var(--danger); background: #fff4f6; }\n    .rule { border-left: 4px solid #111; background: #f7f7f7; }\n\n    .pill {\n      display: inline-block;\n      border: 1px solid var(--border);\n      border-radius: 999px;\n      padding: 2px 8px;\n      background: #fff;\n      color: var(--muted);\n      font-size: 12px;\n      margin: 2px 4px 2px 0;\n    }\n\n    .muted { color: var(--muted); }\n    .ok { color: var(--ok); font-weight: 700; }\n    .bad { color: var(--danger); font-weight: 700; }\n\n    .toc a {\n      display: block;\n      color: var(--accent);\n      text-decoration: none;\n      padding: 4px 0;\n    }\n\n    .toc a:hover { text-decoration: underline; }\n\n    .footer {\n      margin-top: 26px;\n      font-size: 13px;\n      color: #666;\n    }\n\n    @media (max-width: 720px) {\n      table, thead, tbody, th, td, tr { display: block; }\n      th { display: none; }\n      td { border-bottom: 0; padding: 6px 10px; }\n      tr { border-bottom: 1px solid var(--border); padding: 8px 0; }\n      tr:last-child { border-bottom: 0; }\n      td::before {\n        content: attr(data-label);\n        display: block;\n        font-weight: 700;\n        color: var(--muted);\n        margin-bottom: 2px;\n      }\n    }\n  <\/style>\n<\/head>\n\n<body>\n  <main class=\"wrap\">\n\n    <header class=\"card\">\n      <h1>Advanced Command &#038; Feedback Reference<\/h1>\n\n      <p>\n        This page explains how commands, responses, query timing and UI feedback parsing work inside MyURemote.\n      <\/p>\n\n      <p class=\"rule\">\n        MyURemote is <strong>not command-driven<\/strong>. It is a <strong>response-driven execution system<\/strong>.\n        Commands trigger communication. Responses determine UI state.\n      <\/p>\n\n      <p>\n        A command can work perfectly on the network while the UI still shows nothing. In that case, the transport is usually correct and the feedback parsing is wrong.\n      <\/p>\n    <\/header>\n\n    <section class=\"card toc\">\n      <h2>Contents<\/h2>\n      <a href=\"#execution-model\">1. The real execution model<\/a>\n      <a href=\"#action-vs-query\">2. Action commands vs query commands<\/a>\n      <a href=\"#query-scheduler\">3. Which queries are called by the UI?<\/a>\n      <a href=\"#feedback-fields\">4. Feedback fields used by MyURemote<\/a>\n      <a href=\"#parser-model\">5. The feedback parser model<\/a>\n      <a href=\"#stopsigns\">6. StopSign rules<\/a>\n      <a href=\"#hex-rules\">7. Hex, text and escaped values<\/a>\n      <a href=\"#heos-example\">8. HEOS example: title, artist, station, volume<\/a>\n      <a href=\"#ok-response\">9. What OK really means<\/a>\n      <a href=\"#troubleshooting\">10. Troubleshooting checklist<\/a>\n    <\/section>\n\n    <section id=\"execution-model\" class=\"card\">\n      <h2>1. The real execution model<\/h2>\n\n<pre>UI action\n  \u2192 sendCommandFromDevice()\n  \u2192 extender.executeCommand()\n  \u2192 localhost gateway\n  \u2192 socket \/ websocket \/ secure transport\n  \u2192 device\n  \u2192 raw response\n  \u2192 AnalyseFeedback()\n  \u2192 display_line update<\/pre>\n\n      <div class=\"note\">\n        A successful write does not update the display. Only a response that is parsed correctly updates the display.\n      <\/div>\n    <\/section>\n\n    <section id=\"action-vs-query\" class=\"card\">\n      <h2>2. Action commands vs query commands<\/h2>\n\n      <h3>Action command<\/h3>\n<pre>PLAY \u2192 player\/set_play_state?pid={pid}&state=play<\/pre>\n\n      <ul>\n        <li>Changes device state.<\/li>\n        <li>May return only success or nothing useful.<\/li>\n        <li>Does not automatically update title, artist, volume or power state.<\/li>\n      <\/ul>\n\n      <h3>Query command<\/h3>\n<pre>TITLE QUERY \u2192 player\/get_now_playing_media?pid={pid}<\/pre>\n\n      <ul>\n        <li>Requests current device state.<\/li>\n        <li>Returns raw data.<\/li>\n        <li>Feeds <code>AnalyseFeedback()<\/code>.<\/li>\n      <\/ul>\n\n      <div class=\"warning\">\n        If a button works but the display does not change, check the query and feedback settings, not only the action command.\n      <\/div>\n    <\/section>\n\n    <section id=\"query-scheduler\" class=\"card\">\n      <h2>3. Which queries are called by the UI?<\/h2>\n\n      <p>\n        MyURemote does not continuously run every possible query. The active zone, input and enabled feedback flags determine which queries are called.\n      <\/p>\n\n      <h3>Main scheduler<\/h3>\n<pre>fnQueryState()\n  \u2192 fnQueryStateAmplifier()       immediately\n  \u2192 fnQueryRow1()                 after 2 seconds\n  \u2192 fnQueryStateAmplifier()       after 3 seconds\n  \u2192 fnQueryRow2()                 after 5 seconds\n  \u2192 fnQueryStateAmplifier()       after 6 seconds\n  \u2192 fnQueryRow3()                 after 8 seconds\n  \u2192 fnQueryStateAmplifier()       after 9 seconds\n  \u2192 fnQueryRow4()                 after 11 seconds<\/pre>\n\n      <h3>Amplifier queries<\/h3>\n      <table>\n        <thead>\n          <tr><th>Function<\/th><th>Command name<\/th><th>Feedback function<\/th><th>Purpose<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr>\n            <td data-label=\"Function\"><code>fnQueryStateAmplifier()<\/code><\/td>\n            <td data-label=\"Command name\"><code>SRC QUERY<\/code><\/td>\n            <td data-label=\"Feedback function\"><code>GetFeedbackSRC()<\/code><\/td>\n            <td data-label=\"Purpose\">Detect amplifier input\/source.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Function\"><code>fnQueryStatePWR()<\/code><\/td>\n            <td data-label=\"Command name\"><code>PWR QUERY<\/code><\/td>\n            <td data-label=\"Feedback function\"><code>GetFeedbackPWR()<\/code><\/td>\n            <td data-label=\"Purpose\">Detect amplifier power state.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Function\"><code>fnQueryStateVolume()<\/code><\/td>\n            <td data-label=\"Command name\"><code>Vol QUERY<\/code><\/td>\n            <td data-label=\"Feedback function\"><code>GetFeedbackVolume()<\/code><\/td>\n            <td data-label=\"Purpose\">Read volume and update volume display.<\/td>\n          <\/tr>\n        <\/tbody>\n      <\/table>\n\n      <h3>Current input device queries<\/h3>\n      <table>\n        <thead>\n          <tr><th>Function<\/th><th>Command name<\/th><th>Feedback variables<\/th><th>Purpose<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr>\n            <td data-label=\"Function\"><code>fnQueryTitle()<\/code><\/td>\n            <td data-label=\"Command name\"><code>TITLE QUERY<\/code><\/td>\n            <td data-label=\"Feedback variables\"><code>TitlePrefix<\/code>, <code>TitleHex<\/code>, <code>TitlePos<\/code>, <code>TitleDig<\/code>, <code>TitleStopSign<\/code><\/td>\n            <td data-label=\"Purpose\">Read title\/song name and update display line 3 and 6.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Function\"><code>fnQueryArtist()<\/code><\/td>\n            <td data-label=\"Command name\"><code>ARTIST QUERY<\/code><\/td>\n            <td data-label=\"Feedback variables\"><code>ArtistPrefix<\/code>, <code>ArtistHex<\/code>, <code>ArtistPos<\/code>, <code>ArtistDig<\/code>, <code>ArtistStopSign<\/code><\/td>\n            <td data-label=\"Purpose\">Read artist name and update display line 3 and 6.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Function\"><code>fnQueryStation()<\/code><\/td>\n            <td data-label=\"Command name\"><code>STATION QUERY<\/code><\/td>\n            <td data-label=\"Feedback variables\"><code>StationPrefix<\/code>, <code>StationHex<\/code>, <code>StationPos<\/code>, <code>StationDig<\/code>, <code>StationStopSign<\/code><\/td>\n            <td data-label=\"Purpose\">Read station\/source name and update display line 3 and 6.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Function\"><code>fnQueryAmpDispInfo()<\/code><\/td>\n            <td data-label=\"Command name\"><code>DISPINFO QUERY<\/code><\/td>\n            <td data-label=\"Feedback variables\"><code>DispInfoPrefix<\/code>, <code>DispInfoHex<\/code>, <code>DispInfoPos<\/code>, <code>DispInfoDig<\/code>, <code>DispInfoStopSign<\/code><\/td>\n            <td data-label=\"Purpose\">Read display information from the amplifier.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Function\"><code>fnQueryStateRDS()<\/code><\/td>\n            <td data-label=\"Command name\"><code>RDS QUERY<\/code><\/td>\n            <td data-label=\"Feedback variables\"><code>rdsPrefix<\/code>, <code>rdsHex<\/code>, <code>rdsPos<\/code>, <code>rdsDig<\/code>, <code>rdsStopSign<\/code><\/td>\n            <td data-label=\"Purpose\">Read FM\/RDS text.<\/td>\n          <\/tr>\n        <\/tbody>\n      <\/table>\n\n      <div class=\"note\">\n        The command name must exist in <code>devices.js<\/code>. For example, <code>TITLE QUERY<\/code> is not magic. It is a configured command that is sent to the current input device.\n      <\/div>\n    <\/section>\n\n    <section id=\"feedback-fields\" class=\"card\">\n      <h2>4. Feedback fields used by MyURemote<\/h2>\n\n      <p>\n        Each feedback type has its own command and parsing settings. The parser does not know what a title, artist or volume is. It only receives a raw response and extraction rules.\n      <\/p>\n\n      <table>\n        <thead>\n          <tr><th>UI value<\/th><th>Query command<\/th><th>Prefix setting<\/th><th>StopSign setting<\/th><th>Hex setting<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr>\n            <td data-label=\"UI value\">Volume<\/td>\n            <td data-label=\"Query command\"><code>Vol QUERY<\/code><\/td>\n            <td data-label=\"Prefix setting\"><code>VOL Prefix<\/code><\/td>\n            <td data-label=\"StopSign setting\"><code>VOL StopSign<\/code><\/td>\n            <td data-label=\"Hex setting\"><code>VOL Hex<\/code><\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"UI value\">Power<\/td>\n            <td data-label=\"Query command\"><code>PWR QUERY<\/code><\/td>\n            <td data-label=\"Prefix setting\"><code>PWR Prefix<\/code><\/td>\n            <td data-label=\"StopSign setting\"><code>PWR StopSign<\/code><\/td>\n            <td data-label=\"Hex setting\"><code>PWR Hex<\/code><\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"UI value\">Source<\/td>\n            <td data-label=\"Query command\"><code>SRC QUERY<\/code><\/td>\n            <td data-label=\"Prefix setting\"><code>SRC Prefix<\/code><\/td>\n            <td data-label=\"StopSign setting\"><code>SRC StopSign<\/code><\/td>\n            <td data-label=\"Hex setting\"><code>SRC Hex<\/code><\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"UI value\">Title<\/td>\n            <td data-label=\"Query command\"><code>TITLE QUERY<\/code><\/td>\n            <td data-label=\"Prefix setting\"><code>TITLE PREFIX<\/code><\/td>\n            <td data-label=\"StopSign setting\"><code>TITLE STOPSIGN<\/code><\/td>\n            <td data-label=\"Hex setting\"><code>TITLE HEX<\/code><\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"UI value\">Artist<\/td>\n            <td data-label=\"Query command\"><code>ARTIST QUERY<\/code><\/td>\n            <td data-label=\"Prefix setting\"><code>ARTIST PREFIX<\/code><\/td>\n            <td data-label=\"StopSign setting\"><code>ARTIST STOPSIGN<\/code><\/td>\n            <td data-label=\"Hex setting\"><code>ARTIST HEX<\/code><\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"UI value\">Station<\/td>\n            <td data-label=\"Query command\"><code>STATION QUERY<\/code><\/td>\n            <td data-label=\"Prefix setting\"><code>STATION PREFIX<\/code><\/td>\n            <td data-label=\"StopSign setting\"><code>STATION STOPSIGN<\/code><\/td>\n            <td data-label=\"Hex setting\"><code>STATION HEX<\/code><\/td>\n          <\/tr>\n        <\/tbody>\n      <\/table>\n    <\/section>\n\n    <section id=\"parser-model\" class=\"card\">\n      <h2>5. The feedback parser model<\/h2>\n\n      <p>\n        The generic parser is <code>AnalyseFeedback(response, Prefix, Hex, Position, Digits, StopSign, WhatFeedback)<\/code>.\n      <\/p>\n\n      <h3>Meaning of each setting<\/h3>\n      <table>\n        <thead>\n          <tr><th>Setting<\/th><th>Meaning<\/th><th>Typical value<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr>\n            <td data-label=\"Setting\">Prefix<\/td>\n            <td data-label=\"Meaning\">Text that appears before the value.<\/td>\n            <td data-label=\"Typical value\"><code>level=<\/code>, <code>song<\/code>, <code>artist<\/code><\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Setting\">Position<\/td>\n            <td data-label=\"Meaning\">Extra offset after the prefix.<\/td>\n            <td data-label=\"Typical value\"><code>0<\/code>, <code>3<\/code>, <code>4<\/code>, <code>5<\/code><\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Setting\">Digits<\/td>\n            <td data-label=\"Meaning\">Maximum or fixed length when no stopsign is found.<\/td>\n            <td data-label=\"Typical value\"><code>1<\/code>, <code>2<\/code>, <code>50<\/code><\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Setting\">StopSign<\/td>\n            <td data-label=\"Meaning\">Marker where the value ends.<\/td>\n            <td data-label=\"Typical value\"><code>&amp;<\/code>, <code>\\x22\\x2C<\/code>, <code>,<\/code><\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Setting\">Hex<\/td>\n            <td data-label=\"Meaning\">Whether the response must be interpreted as hex\/binary.<\/td>\n            <td data-label=\"Typical value\"><code>false<\/code> for JSON\/text, <code>true<\/code> for binary\/hex protocols.<\/td>\n          <\/tr>\n        <\/tbody>\n      <\/table>\n\n      <h3>Text extraction logic<\/h3>\n<pre>value starts at:\n  indexOf(Prefix) + Prefix.length + Position\n\nvalue ends at:\n  StopSign\n\nif StopSign is empty or not usable:\n  Digits is used<\/pre>\n\n      <div class=\"warning\">\n        <code>Position<\/code> is not an absolute position in the response. It is an offset after the prefix.\n      <\/div>\n    <\/section>\n\n    <section id=\"stopsigns\" class=\"card\">\n      <h2>6. StopSign rules<\/h2>\n\n      <p>\n        StopSign is the marker that tells MyURemote where the extracted value ends. It is often more important than Digits.\n      <\/p>\n\n      <h3>Common StopSigns<\/h3>\n      <table>\n        <thead>\n          <tr><th>Situation<\/th><th>Response example<\/th><th>StopSign<\/th><th>Notes<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr>\n            <td data-label=\"Situation\">URL-style message<\/td>\n            <td data-label=\"Response example\"><code>level=13&amp;mute=off<\/code><\/td>\n            <td data-label=\"StopSign\"><code>&amp;<\/code><\/td>\n            <td data-label=\"Notes\">Stops before the next parameter.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Situation\">Normal JSON string<\/td>\n            <td data-label=\"Response example\"><code>\"song\":\"Re-Rewind\",\"station\":<\/code><\/td>\n            <td data-label=\"StopSign\"><code>\",<\/code><\/td>\n            <td data-label=\"Notes\">Stops before the closing quote and comma.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Situation\">Escaped JSON string<\/td>\n            <td data-label=\"Response example\"><code>\\\"song\\\":\\\"Re-Rewind\\\",\\\"station\\\":<\/code><\/td>\n            <td data-label=\"StopSign\"><code>\\x22\\x2C<\/code><\/td>\n            <td data-label=\"Notes\">Safer when quotes cannot be stored directly in <code>devices.js<\/code>.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Situation\">Fixed-length numeric value<\/td>\n            <td data-label=\"Response example\"><code>level=13<\/code><\/td>\n            <td data-label=\"StopSign\"><em>empty<\/em><\/td>\n            <td data-label=\"Notes\">Use Digits, for example <code>2<\/code>.<\/td>\n          <\/tr>\n        <\/tbody>\n      <\/table>\n\n      <h3>Important ASCII \/ HEX references<\/h3>\n      <table>\n        <thead>\n          <tr><th>Character<\/th><th>Meaning<\/th><th>Decimal<\/th><th>Hex<\/th><th>Escaped form<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr><td data-label=\"Character\"><code>\"<\/code><\/td><td data-label=\"Meaning\">double quote<\/td><td data-label=\"Decimal\">34<\/td><td data-label=\"Hex\"><code>22<\/code><\/td><td data-label=\"Escaped form\"><code>\\x22<\/code><\/td><\/tr>\n          <tr><td data-label=\"Character\"><code>,<\/code><\/td><td data-label=\"Meaning\">comma<\/td><td data-label=\"Decimal\">44<\/td><td data-label=\"Hex\"><code>2C<\/code><\/td><td data-label=\"Escaped form\"><code>\\x2C<\/code><\/td><\/tr>\n          <tr><td data-label=\"Character\"><code>&amp;<\/code><\/td><td data-label=\"Meaning\">ampersand<\/td><td data-label=\"Decimal\">38<\/td><td data-label=\"Hex\"><code>26<\/code><\/td><td data-label=\"Escaped form\"><code>\\x26<\/code><\/td><\/tr>\n          <tr><td data-label=\"Character\"><code>:<\/code><\/td><td data-label=\"Meaning\">colon<\/td><td data-label=\"Decimal\">58<\/td><td data-label=\"Hex\"><code>3A<\/code><\/td><td data-label=\"Escaped form\"><code>\\x3A<\/code><\/td><\/tr>\n          <tr><td data-label=\"Character\"><code>\\<\/code><\/td><td data-label=\"Meaning\">backslash<\/td><td data-label=\"Decimal\">92<\/td><td data-label=\"Hex\"><code>5C<\/code><\/td><td data-label=\"Escaped form\"><code>\\x5C<\/code><\/td><\/tr>\n        <\/tbody>\n      <\/table>\n\n      <div class=\"danger\">\n        Do not store a raw <code>\"<\/code> in a command or setting when it breaks the generated JavaScript. Use the escaped form, such as <code>\\x22<\/code>, when the configuration is exported to <code>devices.js<\/code>.\n      <\/div>\n    <\/section>\n\n    <section id=\"hex-rules\" class=\"card\">\n      <h2>7. Hex, text and escaped values<\/h2>\n\n      <h3>Text \/ JSON response<\/h3>\n<pre>{\"heos\":{\"message\":\"pid=123&level=13\"}}<\/pre>\n\n      <p>\n        Use <code>Hex = false<\/code>. Extract with Prefix, Position and StopSign.\n      <\/p>\n\n      <h3>Pure hex string response<\/h3>\n<pre>1b920318080210021a<\/pre>\n\n      <p>\n        Use hex parsing only when the response is actually a hex string or binary protocol data.\n      <\/p>\n\n      <h3>Binary \/ raw byte response<\/h3>\n<pre>\\x02\\x01\\xFF<\/pre>\n\n      <p>\n        Some protocols return non-printable bytes. In that case MyURemote may convert the raw string to bytes before parsing.\n      <\/p>\n\n      <div class=\"warning\">\n        <strong>Hex = false<\/strong> is normally correct for HEOS, because HEOS responses are JSON\/text, not binary.\n      <\/div>\n    <\/section>\n\n    <section id=\"heos-example\" class=\"card\">\n      <h2>8. HEOS example: title, artist, station, volume<\/h2>\n\n      <p>\n        HEOS is a good example because the command succeeds, but the display only works when the response is parsed correctly.\n      <\/p>\n\n      <h3>HEOS transport commands<\/h3>\n      <table>\n        <thead>\n          <tr><th>Action<\/th><th>Command<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr><td data-label=\"Action\">Play<\/td><td data-label=\"Command\"><code>player\/set_play_state?pid={pid}&amp;state=play<\/code><\/td><\/tr>\n          <tr><td data-label=\"Action\">Pause<\/td><td data-label=\"Command\"><code>player\/set_play_state?pid={pid}&amp;state=pause<\/code><\/td><\/tr>\n          <tr><td data-label=\"Action\">Stop<\/td><td data-label=\"Command\"><code>player\/set_play_state?pid={pid}&amp;state=stop<\/code><\/td><\/tr>\n          <tr><td data-label=\"Action\">Next<\/td><td data-label=\"Command\"><code>player\/play_next?pid={pid}<\/code><\/td><\/tr>\n          <tr><td data-label=\"Action\">Previous<\/td><td data-label=\"Command\"><code>player\/play_previous?pid={pid}<\/code><\/td><\/tr>\n          <tr><td data-label=\"Action\">Volume query<\/td><td data-label=\"Command\"><code>player\/get_volume?pid={pid}<\/code><\/td><\/tr>\n          <tr><td data-label=\"Action\">Now playing query<\/td><td data-label=\"Command\"><code>player\/get_now_playing_media?pid={pid}<\/code><\/td><\/tr>\n          <tr><td data-label=\"Action\">Play state query<\/td><td data-label=\"Command\"><code>player\/get_play_state?pid={pid}<\/code><\/td><\/tr>\n        <\/tbody>\n      <\/table>\n\n      <h3>HEOS volume response<\/h3>\n<pre>{\"heos\":{\"command\":\"player\/get_volume\",\"result\":\"success\",\"message\":\"pid=123&level=13\"}}<\/pre>\n\n      <table>\n        <thead>\n          <tr><th>Setting<\/th><th>Value<\/th><th>Reason<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr><td data-label=\"Setting\">VOL Prefix<\/td><td data-label=\"Value\"><code>level=<\/code><\/td><td data-label=\"Reason\">Value starts after <code>level=<\/code>.<\/td><\/tr>\n          <tr><td data-label=\"Setting\">VOL Position<\/td><td data-label=\"Value\"><code>0<\/code><\/td><td data-label=\"Reason\">No extra offset needed.<\/td><\/tr>\n          <tr><td data-label=\"Setting\">VOL Digits<\/td><td data-label=\"Value\"><code>2<\/code><\/td><td data-label=\"Reason\">HEOS volume can be one or two digits.<\/td><\/tr>\n          <tr><td data-label=\"Setting\">VOL StopSign<\/td><td data-label=\"Value\"><code>\\x26<\/code> or empty<\/td><td data-label=\"Reason\"><code>\\x26<\/code> is <code>&amp;<\/code>. Empty also works when Digits is enough.<\/td><\/tr>\n          <tr><td data-label=\"Setting\">VOL Hex<\/td><td data-label=\"Value\"><code>false<\/code><\/td><td data-label=\"Reason\">HEOS is text\/JSON.<\/td><\/tr>\n        <\/tbody>\n      <\/table>\n\n      <h3>HEOS now playing response<\/h3>\n<pre>{\"heos\":{\"command\":\"player\/get_now_playing_media\",\"result\":\"success\"},\"payload\":{\"type\":\"station\",\"song\":\"Re-Rewind\",\"station\":\"Nostalgie 90's & 00's\",\"album\":\"\",\"artist\":\"Artful Dodger\"}}<\/pre>\n\n      <h3>Recommended HEOS text settings when the response remains escaped<\/h3>\n      <p>\n        This is recommended when raw quotes cannot safely be stored in <code>devices.js<\/code>.\n      <\/p>\n\n      <table>\n        <thead>\n          <tr><th>Field<\/th><th>Prefix<\/th><th>Position<\/th><th>Digits<\/th><th>StopSign<\/th><th>Hex<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr><td data-label=\"Field\">Title<\/td><td data-label=\"Prefix\"><code>song<\/code><\/td><td data-label=\"Position\"><code>5<\/code><\/td><td data-label=\"Digits\"><code>50<\/code><\/td><td data-label=\"StopSign\"><code>\\x22\\x2C<\/code><\/td><td data-label=\"Hex\"><code>false<\/code><\/td><\/tr>\n          <tr><td data-label=\"Field\">Artist<\/td><td data-label=\"Prefix\"><code>artist<\/code><\/td><td data-label=\"Position\"><code>5<\/code><\/td><td data-label=\"Digits\"><code>50<\/code><\/td><td data-label=\"StopSign\"><code>\\x22<\/code><\/td><td data-label=\"Hex\"><code>false<\/code><\/td><\/tr>\n          <tr><td data-label=\"Field\">Station<\/td><td data-label=\"Prefix\"><code>station<\/code><\/td><td data-label=\"Position\"><code>5<\/code><\/td><td data-label=\"Digits\"><code>50<\/code><\/td><td data-label=\"StopSign\"><code>\\x22\\x2C<\/code><\/td><td data-label=\"Hex\"><code>false<\/code><\/td><\/tr>\n        <\/tbody>\n      <\/table>\n\n      <div class=\"note\">\n        Why <code>Position = 5<\/code>? In escaped JSON, after <code>song<\/code> comes <code>\\\":\\\"<\/code>. That is five characters: backslash, quote, colon, backslash, quote.\n      <\/div>\n\n      <h3>Alternative HEOS settings when quotes are unescaped<\/h3>\n      <p>\n        If <code>heos.js<\/code> converts <code>\\\"<\/code> to <code>\"<\/code>, then the response becomes normal JSON text. In that case use:\n      <\/p>\n\n      <table>\n        <thead>\n          <tr><th>Field<\/th><th>Prefix<\/th><th>Position<\/th><th>Digits<\/th><th>StopSign<\/th><th>Hex<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr><td data-label=\"Field\">Title<\/td><td data-label=\"Prefix\"><code>song<\/code><\/td><td data-label=\"Position\"><code>3<\/code><\/td><td data-label=\"Digits\"><code>50<\/code><\/td><td data-label=\"StopSign\"><code>\",<\/code><\/td><td data-label=\"Hex\"><code>false<\/code><\/td><\/tr>\n          <tr><td data-label=\"Field\">Artist<\/td><td data-label=\"Prefix\"><code>artist<\/code><\/td><td data-label=\"Position\"><code>3<\/code><\/td><td data-label=\"Digits\"><code>50<\/code><\/td><td data-label=\"StopSign\"><code>\"<\/code><\/td><td data-label=\"Hex\"><code>false<\/code><\/td><\/tr>\n          <tr><td data-label=\"Field\">Station<\/td><td data-label=\"Prefix\"><code>station<\/code><\/td><td data-label=\"Position\"><code>3<\/code><\/td><td data-label=\"Digits\"><code>50<\/code><\/td><td data-label=\"StopSign\"><code>\",<\/code><\/td><td data-label=\"Hex\"><code>false<\/code><\/td><\/tr>\n        <\/tbody>\n      <\/table>\n\n      <div class=\"warning\">\n        Use one strategy consistently. Either keep HEOS escaped and use <code>\\x22<\/code>-style stopsigns, or unescape HEOS and use normal text stopsigns. Mixing both causes off-by-one and wrong-stop problems.\n      <\/div>\n\n      <h3>HEOS play state as power status<\/h3>\n<pre>player\/get_play_state?pid={pid}<\/pre>\n\n      <p>\n        HEOS does not provide a classic amplifier power state. For UI purposes, play state can be used as a logical power\/activity state.\n      <\/p>\n\n      <table>\n        <thead>\n          <tr><th>HEOS state<\/th><th>Suggested MyURemote meaning<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr><td data-label=\"HEOS state\"><code>play<\/code><\/td><td data-label=\"Suggested MyURemote meaning\">On \/ active<\/td><\/tr>\n          <tr><td data-label=\"HEOS state\"><code>pause<\/code><\/td><td data-label=\"Suggested MyURemote meaning\">On \/ active but paused<\/td><\/tr>\n          <tr><td data-label=\"HEOS state\"><code>stop<\/code><\/td><td data-label=\"Suggested MyURemote meaning\">Stopped \/ inactive<\/td><\/tr>\n        <\/tbody>\n      <\/table>\n    <\/section>\n\n    <section id=\"ok-response\" class=\"card\">\n      <h2>9. What OK really means<\/h2>\n\n      <p><code>OK<\/code> only means:<\/p>\n      <ul>\n        <li>The gateway accepted the request.<\/li>\n        <li>The connection\/write probably succeeded.<\/li>\n      <\/ul>\n\n      <p>It does not mean:<\/p>\n      <ul>\n        <li>The device executed the command.<\/li>\n        <li>The device state changed.<\/li>\n        <li>The UI has enough data to update.<\/li>\n      <\/ul>\n\n      <div class=\"note\">\n        Real state must be verified with a query command and parsed feedback.\n      <\/div>\n    <\/section>\n\n    <section id=\"troubleshooting\" class=\"card\">\n      <h2>10. Troubleshooting checklist<\/h2>\n\n      <table>\n        <thead>\n          <tr><th>Symptom<\/th><th>Likely cause<\/th><th>What to check<\/th><\/tr>\n        <\/thead>\n        <tbody>\n          <tr>\n            <td data-label=\"Symptom\">Command works but display does not update<\/td>\n            <td data-label=\"Likely cause\">Feedback parser mismatch<\/td>\n            <td data-label=\"What to check\">Raw response, Prefix, Position, StopSign, Hex.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Symptom\">Only first characters appear<\/td>\n            <td data-label=\"Likely cause\">StopSign matches too early<\/td>\n            <td data-label=\"What to check\">Use a more specific StopSign, for example <code>\\x22\\x2C<\/code> instead of only <code>\\x22<\/code>.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Symptom\">Value includes <code>\",<\/code><\/td>\n            <td data-label=\"Likely cause\">Substring includes the StopSign<\/td>\n            <td data-label=\"What to check\">Parser end-index logic. JavaScript <code>substring(start, end)<\/code> excludes <code>end<\/code>.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Symptom\">No response<\/td>\n            <td data-label=\"Likely cause\">Device did not answer in time, or gateway read timing is too short<\/td>\n            <td data-label=\"What to check\">Timeout, keepOpen, Wireshark, raw gateway response.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Symptom\">Raw length is 1024 with null bytes<\/td>\n            <td data-label=\"Likely cause\">Gateway returns fixed buffer instead of received bytes<\/td>\n            <td data-label=\"What to check\">Native socket read\/result conversion.<\/td>\n          <\/tr>\n          <tr>\n            <td data-label=\"Symptom\">Quotes break <code>devices.js<\/code><\/td>\n            <td data-label=\"Likely cause\">Unescaped quote in generated JavaScript<\/td>\n            <td data-label=\"What to check\">Use <code>\\x22<\/code> or keep response escaped.<\/td>\n          <\/tr>\n        <\/tbody>\n      <\/table>\n\n      <h3>Recommended debug logging inside AnalyseFeedback<\/h3>\n<pre>console.log(\"varPrefix:\", varPrefix);\nconsole.log(\"varPosition:\", varPosition);\nconsole.log(\"varDigits before:\", varDigits);\nconsole.log(\"varStopSign:\", varStopSign);\nconsole.log(\"mResultBrut:\", mResultBrut);\n\nvarPositionPrefix = (mResultBrut.indexOf(varPrefix) + 1 + varPrefix.length);\nconsole.log(\"indexOf prefix:\", mResultBrut.indexOf(varPrefix));\nconsole.log(\"varPositionPrefix:\", varPositionPrefix);\nconsole.log(\"text from prefix:\", mResultBrut.substring(varPositionPrefix - 1, varPositionPrefix + 80));\n\nif (varStopSign != \"\") {\n  var stopIndex = mResultBrut.indexOf(varStopSign, varPositionPrefix);\n  console.log(\"stopIndex:\", stopIndex);\n  console.log(\"text at stop:\", mResultBrut.substring(stopIndex - 10, stopIndex + 10));\n}<\/pre>\n\n      <div class=\"rule\">\n        Debug order: first prove the raw response, then prove the prefix, then prove the start position, then prove the stopsign.\n      <\/div>\n    <\/section>\n\n    <section class=\"card\">\n      <h2>Final model<\/h2>\n<pre>transport + query + parsing = UI state<\/pre>\n\n      <p>\n        MyURemote integrations become reliable when commands, responses and feedback settings are treated as one deterministic chain.\n      <\/p>\n    <\/section>\n\n    <div class=\"footer\">\n      MyURemote \u2014 Response-driven command and feedback system.\n    <\/div>\n\n  <\/main>\n<\/body>\n<\/html>\n\n","protected":false},"excerpt":{"rendered":"<p>Advanced Command &#038; Feedback Reference \u2013 MyURemote Advanced Command &#038; Feedback Reference This page explains how commands, responses, query timing and UI feedback parsing work inside MyURemote. MyURemote is not command-driven. It is a response-driven execution system. Commands trigger communication. Responses determine UI state. A command can work perfectly on the network while the UI [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":218,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-243","page","type-page","status-publish","hentry"],"blocksy_meta":{"has_hero_section":"disabled","styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":6}},"_links":{"self":[{"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/pages\/243","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/comments?post=243"}],"version-history":[{"count":4,"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/pages\/243\/revisions"}],"predecessor-version":[{"id":283,"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/pages\/243\/revisions\/283"}],"up":[{"embeddable":true,"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/pages\/218"}],"wp:attachment":[{"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/media?parent=243"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}