{"id":140,"date":"2026-02-13T00:45:42","date_gmt":"2026-02-13T00:45:42","guid":{"rendered":"https:\/\/www.myuremote.com\/website\/?page_id=140"},"modified":"2026-09-24T15:04:19","modified_gmt":"2026-09-24T15:04:19","slug":"mac-addresses-handling","status":"publish","type":"page","link":"https:\/\/www.myuremote.com\/website\/docs\/technical\/mac-addresses-handling\/","title":{"rendered":"MAC Addresses handling"},"content":{"rendered":"\n<section style=\"max-width:1000px;margin:0 auto;padding:26px 18px;line-height:1.6;\">\n\n  <header style=\"margin-bottom:18px;\">\n    <h1 style=\"font-size:clamp(26px,4vw,38px);line-height:1.15;margin:0;\">\n      Concepts \u2013 Why MyURemote Handles MAC Addresses (WOL &amp; Device Identity)\n    <\/h1>\n\n    <p style=\"margin:10px 0 0 0;max-width:940px;\">\n      This page explains <strong>why<\/strong> MAC address handling exists in MyURemote and how it fits the overall architecture.\n      It is written as a technical reference for integrators and advanced users who want a solid mental model,\n      without going into implementation-level code details.\n    <\/p>\n\n    <p style=\"margin:10px 0 0 0;max-width:940px;opacity:.85;\">\n      Key idea: <strong>Wake-on-LAN reliability comes from preserving and reusing all known valid MAC candidates.<\/strong>\n    <\/p>\n  <\/header>\n\n  <hr style=\"opacity:.25;margin:18px 0;\">\n\n  <section>\n    <h2>1. The real problem MyURemote solves<\/h2>\n\n    <p>\n      MyURemote controls devices that often behave like embedded appliances, not clean network services.\n      A universal remote experience requires deterministic behaviour even when devices are:\n    <\/p>\n\n    <ul>\n      <li>in standby, where TCP\/HTTP\/WebSocket control may no longer be available<\/li>\n      <li>slow to boot or slow to rejoin the network<\/li>\n      <li>reachable only after specific startup phases<\/li>\n      <li>equipped with multiple network interfaces such as Ethernet, Wi-Fi, Wi-Fi Direct or Always-On adapters<\/li>\n      <li>temporarily absent from discovery while still being wakeable by Wake-on-LAN<\/li>\n    <\/ul>\n\n    <p style=\"opacity:.85;\">\n      For many TVs and receivers, the first command is not \u201cvolume up\u201d or \u201cinput HDMI1\u201d.\n      The first command is: <strong>make the device become alive<\/strong>.\n    <\/p>\n  <\/section>\n\n  <hr style=\"opacity:.25;margin:18px 0;\">\n\n  <section>\n    <h2>2. Why MAC addresses matter<\/h2>\n\n    <p>\n      IP addresses are routing addresses and can change through DHCP, network changes or interface changes.\n      Wake-on-LAN, however, is based on the network interface&#8217;s MAC address.\n    <\/p>\n\n    <pre style=\"background:#f6f7f9;border:1px solid rgba(0,0,0,.08);padding:12px;border-radius:12px;overflow:auto;\"><code>configured device \u2192 known MAC candidate(s) \u2192 WOL broadcast<\/code><\/pre>\n\n    <p>\n      Modern TVs often expose more than one MAC-like network identity. Depending on brand, firmware and active interface,\n      discovery may reveal Ethernet, Wi-Fi, P2P, Always-On or other addresses.\n    <\/p>\n\n    <p style=\"opacity:.85;\">\n      MyURemote therefore does not assume that one discovery result is permanently authoritative.\n    <\/p>\n  <\/section>\n\n  <hr style=\"opacity:.25;margin:18px 0;\">\n\n  <section>\n    <h2>3. Why \u201cjust pick one MAC\u201d is fragile<\/h2>\n\n    <p>\n      In real installations, discovery is opportunistic. A scan can return a different subset of addresses depending on\n      the TV state, firmware, active interface and network timing.\n    <\/p>\n\n    <ul>\n      <li><strong>Samsung:<\/strong> may expose several network-related addresses.<\/li>\n      <li><strong>LG:<\/strong> may expose several MAC candidates through different discovery data.<\/li>\n      <li><strong>Firmware changes:<\/strong> can change which fields or interfaces are visible.<\/li>\n      <li><strong>Discovery timing:<\/strong> can temporarily return fewer candidates than a previous scan.<\/li>\n      <li><strong>Standby behaviour:<\/strong> can change which interface remains capable of receiving WOL.<\/li>\n    <\/ul>\n\n    <p style=\"opacity:.85;\">\n      For this reason MyURemote now keeps the <strong>complete known candidate set<\/strong> instead of learning and storing a single \u201cbest\u201d MAC.\n    <\/p>\n  <\/section>\n\n  <hr style=\"opacity:.25;margin:18px 0;\">\n\n  <section>\n    <h2>4. The current MyURemote WOL contract<\/h2>\n\n    <p>\n      iOS and Android follow the same platform-independent contract:\n    <\/p>\n\n    <ul>\n      <li><strong>Collect all candidates<\/strong> discovered for the configured device\/IP.<\/li>\n      <li><strong>Merge, do not replace<\/strong>: a later incomplete discovery must not erase previously known candidates.<\/li>\n      <li><strong>Synchronize all candidates<\/strong> to the MyURemote database.<\/li>\n      <li><strong>Seed all database candidates<\/strong> back into local native storage when the remote starts.<\/li>\n      <li><strong>Send WOL to all valid candidates<\/strong>, with a short interval between packets.<\/li>\n      <li><strong>No best-MAC learning<\/strong>: MyURemote no longer waits after every candidate to decide which one \u201cwon\u201d.<\/li>\n    <\/ul>\n\n    <p style=\"opacity:.85;\">\n      The reliability strategy is deliberately simple: <strong>preserve every known valid candidate and try them all.<\/strong>\n    <\/p>\n  <\/section>\n\n  <hr style=\"opacity:.25;margin:18px 0;\">\n\n  <section>\n    <h2>5. Where MAC data lives<\/h2>\n\n    <h3 style=\"margin-top:14px;\">5.1 Local native storage<\/h3>\n\n    <p style=\"margin:0 0 8px 0;\">\n      Each iOS or Android device keeps a local candidate set per IP address. This is the runtime source used by native WOL.\n    <\/p>\n\n    <pre style=\"background:#f6f7f9;border:1px solid rgba(0,0,0,.08);padding:12px;border-radius:12px;overflow:auto;\"><code>context_&lt;ip&gt; = {\n    \"AA:BB:CC:DD:EE:01\": \"wlanMacAddress\",\n    \"AA:BB:CC:DD:EE:02\": \"db\",\n    \"AA:BB:CC:DD:EE:03\": \"MACAddress\"\n}<\/code><\/pre>\n\n    <p>\n      The context label explains where a candidate came from. It no longer determines a \u201cbest-first\u201d order.\n    <\/p>\n\n    <h3 style=\"margin-top:14px;\">5.2 Shared database storage<\/h3>\n\n    <p style=\"margin:0 0 8px 0;\">\n      The backend stores the complete MAC candidate list for each configured user device:\n    <\/p>\n\n    <pre style=\"background:#f6f7f9;border:1px solid rgba(0,0,0,.08);padding:12px;border-radius:12px;overflow:auto;\"><code>param_name  = wol_macs\nparam_value = [\"AA:BB:CC:DD:EE:01\",\"AA:BB:CC:DD:EE:02\",...]\nparam_type  = extender<\/code><\/pre>\n\n    <p style=\"opacity:.85;\">\n      The database is shared memory between MyURemote clients. Native WOL remains LAN-local and does not call the database directly.\n    <\/p>\n  <\/section>\n\n  <hr style=\"opacity:.25;margin:18px 0;\">\n\n  <section>\n    <h2>6. Why the WebView is the synchronization bridge<\/h2>\n\n    <p>\n      MyURemote deliberately separates authenticated online configuration from local device execution.\n      The WebView has the authenticated MyURemote session; the native layer has the local networking capabilities.\n    <\/p>\n\n    <p>The WebView therefore performs both synchronization directions:<\/p>\n\n    <ul>\n      <li><strong>Local \u2192 database:<\/strong> read all native MAC candidates and merge them into <code>wol_macs<\/code>.<\/li>\n      <li><strong>Database \u2192 local:<\/strong> read <code>wol_macs<\/code> and seed every candidate into native storage.<\/li>\n    <\/ul>\n\n    <p style=\"opacity:.85;\">\n      Native iOS\/Android code never needs to authenticate directly against the MyURemote backend.\n    <\/p>\n  <\/section>\n\n  <hr style=\"opacity:.25;margin:18px 0;\">\n\n  <section>\n    <h2>7. Practical dataflow<\/h2>\n\n    <ol style=\"margin-top:10px;\">\n      <li>\n        <strong>Startup \/ seeding:<\/strong>\n        the frontend reads previously known <code>wol_macs<\/code> from the database and merges them into native storage.\n      <\/li>\n      <li>\n        <strong>Discovery:<\/strong>\n        native discovery may find additional MAC candidates and merges them into the local candidate set.\n      <\/li>\n      <li>\n        <strong>Sync:<\/strong>\n        the frontend reads the local candidate set and merges it back into the database.\n      <\/li>\n      <li>\n        <strong>Wake phase:<\/strong>\n        native WOL sends a magic packet to every known valid candidate, typically about 150 ms apart.\n      <\/li>\n    <\/ol>\n\n    <pre style=\"background:#f6f7f9;border:1px solid rgba(0,0,0,.08);padding:12px;border-radius:12px;overflow:auto;\"><code>DB wol_macs\n      \u2193\nstartup seed\n      \u2193\nlocal candidate set\n      \u2195\nnative discovery\n      \u2193\nfrontend sync\n      \u2193\nDB wol_macs\n\nKEY_POWERON \u2192 MAC 1 \u2192 ~150 ms \u2192 MAC 2 \u2192 ~150 ms \u2192 MAC 3 \u2192 ...<\/code><\/pre>\n  <\/section>\n\n  <hr style=\"opacity:.25;margin:18px 0;\">\n\n  <section>\n    <h2>8. Why this is more robust than \u201cbest MAC\u201d learning<\/h2>\n\n    <h3 style=\"margin-top:14px;\">8.1 No false certainty<\/h3>\n    <p>\n      A TV can expose different interfaces at different times. Preserving all candidates avoids tying WOL reliability to one historical result.\n    <\/p>\n\n    <h3 style=\"margin-top:14px;\">8.2 Discovery may be incomplete without losing knowledge<\/h3>\n    <p>\n      New discovery data is merged. If a scan temporarily returns only one address, older known candidates remain available.\n    <\/p>\n\n    <h3 style=\"margin-top:14px;\">8.3 New devices can wake a TV immediately<\/h3>\n    <p>\n      A newly installed MyURemote client can receive the shared <code>wol_macs<\/code> list at startup and use it before local discovery has run.\n    <\/p>\n\n    <h3 style=\"margin-top:14px;\">8.4 iOS and Android use the same semantics<\/h3>\n    <p>\n      The native WOL transport can differ internally by platform or SDK, but the candidate-set contract remains identical.\n    <\/p>\n  <\/section>\n\n  <hr style=\"opacity:.25;margin:18px 0;\">\n\n  <section>\n    <h2>9. Platform notes<\/h2>\n\n    <ul>\n      <li><strong>Samsung:<\/strong> the SmartView integration can use its native Wake-on-LAN helper.<\/li>\n      <li><strong>LG \/ generic WOL:<\/strong> MyURemote can generate and broadcast the standard WOL magic packet itself.<\/li>\n      <li><strong>Standby matters:<\/strong> TVs may take time to enter or leave the network state in which WOL works reliably.<\/li>\n      <li><strong>Power cycling can matter:<\/strong> some TVs can recover their standby network behaviour after a full power cycle.<\/li>\n    <\/ul>\n\n    <p style=\"opacity:.85;\">\n      A single failed wake attempt does not automatically mean that MAC synchronization is wrong; the TV&#8217;s standby network state is part of the real-world system.\n    <\/p>\n  <\/section>\n\n  <hr style=\"opacity:.25;margin:18px 0;\">\n\n  <section>\n    <h2>10. Summary<\/h2>\n\n    <ul>\n      <li>Wake-on-LAN requires MAC addresses, and modern devices may expose several candidates.<\/li>\n      <li>MyURemote stores and preserves the complete known candidate set.<\/li>\n      <li>Local native storage is the runtime candidate source.<\/li>\n      <li>The database stores <code>wol_macs<\/code> as shared persistent memory between clients.<\/li>\n      <li>The WebView synchronizes local \u2194 database because it owns the authenticated session.<\/li>\n      <li>A newly logged-in device can be seeded from the database before discovery runs.<\/li>\n      <li>Power On sends WOL to all known valid candidates with a short interval between packets.<\/li>\n      <li>The old <code>best MAC<\/code> \/ learning architecture is no longer part of the current contract.<\/li>\n    <\/ul>\n\n    <p style=\"opacity:.85;margin-top:10px;\">\n      Bottom line: <strong>MyURemote makes \u201cPower On\u201d resilient by keeping shared MAC knowledge instead of betting on one address.<\/strong>\n    <\/p>\n  <\/section>\n\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>Concepts \u2013 Why MyURemote Handles MAC Addresses (WOL &amp; Device Identity) This page explains why MAC address handling exists in MyURemote and how it fits the overall architecture. It is written as a technical reference for integrators and advanced users who want a solid mental model, without going into implementation-level code details. Key idea: Wake-on-LAN [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":144,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-140","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\/140","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=140"}],"version-history":[{"count":2,"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/pages\/140\/revisions"}],"predecessor-version":[{"id":291,"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/pages\/140\/revisions\/291"}],"up":[{"embeddable":true,"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/pages\/144"}],"wp:attachment":[{"href":"https:\/\/www.myuremote.com\/website\/wp-json\/wp\/v2\/media?parent=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}