{"id":252,"date":"2026-04-01T20:00:00","date_gmt":"2026-04-01T20:00:00","guid":{"rendered":"https:\/\/www.myuremote.com\/website\/?page_id=252"},"modified":"2026-04-10T15:43:10","modified_gmt":"2026-04-10T15:43:10","slug":"ip-tcp-device-integrations-myuremote","status":"publish","type":"page","link":"https:\/\/www.myuremote.com\/website\/docs\/how-to\/device-database-commands\/ip-tcp-device-integrations-myuremote\/","title":{"rendered":"Network TCP\/IP &amp; HTTP Controllers \u2013 MyURemote"},"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>Network TCP\/IP &#038; HTTP Controllers \u2013 MyURemote<\/title>\n  <meta name=\"description\" content=\"Learn how to use the Network TCP\/IP Controller and HTTP Post-Put-Get Controller in MyURemote for non-secure IP-based device integrations.\" \/>\n  <style>\n    :root {\n      --max: 980px;\n      --bg: #ffffff;\n      --card: #fafafa;\n      --border: #e6e6e6;\n      --text: #111;\n      --muted: #555;\n      --accent: #0f62fe;\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 {\n      font-size: clamp(28px, 4vw, 38px);\n      margin: 0 0 10px;\n    }\n\n    h2 {\n      font-size: 22px;\n      margin: 18px 0 10px;\n    }\n\n    h3 {\n      font-size: 17px;\n      margin: 16px 0 8px;\n    }\n\n    p, li {\n      line-height: 1.58;\n    }\n\n    p {\n      margin: 10px 0;\n    }\n\n    ul {\n      margin: 10px 0 0 18px;\n    }\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: #f0f0f0;\n      border-radius: 10px;\n      padding: 14px;\n      overflow: auto;\n      margin: 10px 0;\n      font-size: 14px;\n    }\n\n    .note {\n      border-left: 4px solid var(--accent);\n      background: #f4f8ff;\n      padding: 10px 12px;\n      border-radius: 8px;\n      margin: 12px 0;\n    }\n\n    .warn {\n      border-left: 4px solid #111;\n      padding-left: 12px;\n    }\n\n    .footer {\n      margin-top: 26px;\n      font-size: 13px;\n      color: #666;\n    }\n  <\/style>\n<\/head>\n\n<body>\n  <main class=\"wrap\">\n\n    <header class=\"card\">\n      <h1>Network TCP\/IP &#038; HTTP Controllers<\/h1>\n\n      <p>\n        MyURemote provides two generic controllers for non-secure IP-based integrations:\n      <\/p>\n\n      <ul>\n        <li><strong>Network TCP\/IP Controller<\/strong> \u2192 raw socket transport (<code>ip.js<\/code>)<\/li>\n        <li><strong>Network HTTP Post-Put-Get Controller<\/strong> \u2192 plain HTTP builder (<code>post.js<\/code>)<\/li>\n      <\/ul>\n\n      <p class=\"warn\">\n        These controllers define <strong>how commands are transported<\/strong>, not what they mean.\n        Command semantics are defined by your device and command database.\n      <\/p>\n    <\/header>\n\n    <section class=\"card\">\n      <h2>1. Core concept<\/h2>\n\n      <p>\n        Both controllers use the same underlying MyURemote execution model:\n      <\/p>\n\n      <ul>\n        <li>Command is resolved from the device database<\/li>\n        <li>Controller builds a transport payload<\/li>\n        <li>Payload is sent to <code>http:\/\/localhost:9090\/myuremote<\/code><\/li>\n        <li>Gateway opens connection to <code>ip:port<\/code><\/li>\n        <li>Command is written<\/li>\n        <li>Optional response is read depending on callback<\/li>\n      <\/ul>\n\n      <div class=\"note\">\n        The browser never connects directly to the device. The local proxy is always the transport bridge.\n      <\/div>\n    <\/section>\n\n    <section class=\"card\">\n      <h2>2. Request contract (shared)<\/h2>\n\n<pre>{\n  ip: \"192.168.0.50\",\n  port: 5000,\n  command: encodeURIComponent(payload),\n  timeout: 60,\n  keepOpen: false\n}<\/pre>\n\n      <ul>\n        <li><strong>callback present<\/strong> \u2192 MyURemote reads response<\/li>\n        <li><strong>callback absent<\/strong> \u2192 fire-and-forget<\/li>\n        <li><strong>keepOpen=true<\/strong> \u2192 socket reuse allowed<\/li>\n      <\/ul>\n    <\/section>\n\n    <section class=\"card\">\n      <h2>3. Network TCP\/IP Controller (ip.js)<\/h2>\n\n      <p>\n        The TCP\/IP controller sends a <strong>raw command string<\/strong> directly to a socket.\n      <\/p>\n\n      <h3>When to use<\/h3>\n      <ul>\n        <li>device uses plain TCP socket protocol<\/li>\n        <li>commands must be byte-exact<\/li>\n        <li>no HTTP structure required<\/li>\n      <\/ul>\n\n      <h3>Example command<\/h3>\n<pre>PLAY\n[\"PLAY\"]<\/pre>\n\n      <h3>With parameters<\/h3>\n<pre>INPUT\n[\"SOURCE {0}\"]<\/pre>\n\n      <p>Execution:<\/p>\n<pre>SOURCE HDMI1<\/pre>\n\n      <h3>Binary command<\/h3>\n<pre>\\x02PWRON\\x03<\/pre>\n\n      <p>\n        MyURemote sends bytes exactly as defined.\n      <\/p>\n\n      <h3>Key behavior<\/h3>\n      <ul>\n        <li>No HTTP headers<\/li>\n        <li>No automatic formatting<\/li>\n        <li>Full control over payload<\/li>\n      <\/ul>\n    <\/section>\n\n    <section class=\"card\">\n      <h2>4. Network HTTP Post-Put-Get Controller (post.js)<\/h2>\n\n      <p>\n        The HTTP controller builds a <strong>complete HTTP request<\/strong> from structured command definitions.\n      <\/p>\n\n      <h3>When to use<\/h3>\n      <ul>\n        <li>device exposes a plain HTTP API<\/li>\n        <li>headers and body must be constructed<\/li>\n        <li>no TLS required<\/li>\n      <\/ul>\n\n      <h3>Concept<\/h3>\n      <p>\n        Commands reference a method definition containing:\n      <\/p>\n      <ul>\n        <li><code>headers<\/code><\/li>\n        <li><code>content<\/code><\/li>\n      <\/ul>\n\n      <h3>Example<\/h3>\n\n<pre>\nheaders:\nPOST \/api HTTP\/1.1\nHost: {host}\nContent-Length: {length}\n\ncontent:\ncmd={0}\n<\/pre>\n\n      <p>\n        With parameter:\n      <\/p>\n\n<pre>{0} = PLAY<\/pre>\n\n      <p>Final request:<\/p>\n\n<pre>\nPOST \/api HTTP\/1.1\nHost: 192.168.0.50\nContent-Length: 8\n\ncmd=PLAY\n<\/pre>\n\n      <h3>Supported placeholders<\/h3>\n      <ul>\n        <li><code>{0}, {1}, ...<\/code> \u2192 command parameters<\/li>\n        <li><code>{host}<\/code> \u2192 extender IP<\/li>\n        <li><code>{port}<\/code><\/li>\n        <li><code>{length}<\/code> \u2192 content length<\/li>\n      <\/ul>\n    <\/section>\n\n    <section class=\"card\">\n      <h2>5. Key differences<\/h2>\n\n      <table style=\"width:100%; border-collapse:collapse;\">\n        <tr>\n          <td style=\"border:1px solid #ddd; padding:8px;\"><strong>TCP\/IP<\/strong><\/td>\n          <td style=\"border:1px solid #ddd; padding:8px;\">Raw socket, no structure<\/td>\n        <\/tr>\n        <tr>\n          <td style=\"border:1px solid #ddd; padding:8px;\"><strong>HTTP<\/strong><\/td>\n          <td style=\"border:1px solid #ddd; padding:8px;\">Full HTTP request (headers + body)<\/td>\n        <\/tr>\n      <\/table>\n\n      <p>\n        Choose based on what the device expects, not based on preference.\n      <\/p>\n    <\/section>\n\n    <section class=\"card\">\n      <h2>6. keepOpen and connection reuse<\/h2>\n\n      <p>\n        If enabled:\n      <\/p>\n\n      <ul>\n        <li>socket may be reused for same ip:port<\/li>\n        <li>performance improves<\/li>\n        <li>some devices require persistent connection<\/li>\n      <\/ul>\n\n      <p>\n        Default recommendation: keep it disabled unless needed.\n      <\/p>\n    <\/section>\n\n    <section class=\"card\">\n      <h2>7. Response handling<\/h2>\n\n      <p>\n        MyURemote returns only:\n      <\/p>\n\n      <ul>\n        <li><code>OK<\/code><\/li>\n        <li><code>cannot connect to host<\/code><\/li>\n        <li><code>no response<\/code><\/li>\n        <li><code>Could not write data<\/code><\/li>\n        <li><code>error<\/code><\/li>\n        <li>or raw device response<\/li>\n      <\/ul>\n\n      <div class=\"note\">\n        A valid response does not guarantee that the device executed the command logically.\n      <\/div>\n    <\/section>\n\n    <section class=\"card\">\n      <h2>8. Choosing the right controller<\/h2>\n\n      <h3>Use TCP\/IP when:<\/h3>\n      <ul>\n        <li>protocol is raw socket-based<\/li>\n        <li>commands are plain or binary strings<\/li>\n      <\/ul>\n\n      <h3>Use HTTP when:<\/h3>\n      <ul>\n        <li>device uses HTTP endpoints<\/li>\n        <li>headers and content are required<\/li>\n      <\/ul>\n    <\/section>\n\n    <section class=\"card\">\n      <h2>9. Troubleshooting<\/h2>\n\n      <ul>\n        <li><strong>No response<\/strong> \u2192 device not returning data<\/li>\n        <li><strong>Command ignored<\/strong> \u2192 incorrect payload<\/li>\n        <li><strong>Works in browser, not here<\/strong> \u2192 incorrect HTTP construction<\/li>\n        <li><strong>Weird output<\/strong> \u2192 binary vs text mismatch<\/li>\n      <\/ul>\n    <\/section>\n\n    <section class=\"card\">\n      <h2>10. Summary<\/h2>\n\n      <p>\n        These controllers provide the non-secure IP transport layer of MyURemote.\n      <\/p>\n\n      <p>\n        They allow full control over:\n      <\/p>\n\n      <ul>\n        <li>raw TCP communication<\/li>\n        <li>plain HTTP request construction<\/li>\n      <\/ul>\n\n      <p>\n        They are fundamental building blocks for custom device integrations.\n      <\/p>\n    <\/section>\n\n    <div class=\"footer\">\n      MyURemote \u2014 Non-secure IP transport controllers.\n    <\/div>\n\n  <\/main>\n<\/body>\n<\/html>\n","protected":false},"excerpt":{"rendered":"<p>Network TCP\/IP &#038; HTTP Controllers \u2013 MyURemote Network TCP\/IP &#038; HTTP Controllers MyURemote provides two generic controllers for non-secure IP-based integrations: Network TCP\/IP Controller \u2192 raw socket transport (ip.js) Network HTTP Post-Put-Get Controller \u2192 plain HTTP builder (post.js) These controllers define how commands are transported, not what they mean. Command semantics are defined by your [&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-252","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\/252","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=252"}],"version-history":[{"count":3,"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/pages\/252\/revisions"}],"predecessor-version":[{"id":262,"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/pages\/252\/revisions\/262"}],"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=252"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}