<svg viewBox="0 0 680 630" width="100%" xmlns="http://www.w3.org/2000/svg" role="img" aria-label="one-modbus system architecture">
  <title>one-modbus architecture</title>
  <desc>Core engine via Modbus RTU splits into three paths: direct local, via protocol converter, and DTU with sub-paths</desc>
  <defs>
    <marker id="a" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M2 1L8 5L2 9" fill="none" stroke="#888" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></marker>
    <marker id="b" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M2 1L8 5L2 9" fill="none" stroke="#BA7517" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></marker>
    <marker id="c" viewBox="0 0 10 10" refX="8" refY="5" markerWidth="6" markerHeight="6" orient="auto-start-reverse"><path d="M2 1L8 5L2 9" fill="none" stroke="#185FA5" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></marker>
  </defs>

  <!-- Notification Layer -->
  <rect x="60" y="30" width="560" height="90" rx="16" fill="#EEEDFE" stroke="#534AB7" stroke-width="0.5"/>
  <rect x="80" y="46" width="110" height="28" rx="8" fill="#CECBF6"/>
  <text x="135" y="60" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="13" font-weight="500" fill="#3C3489">Notification</text>
  <text x="135" y="102" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="12" fill="#534AB7" font-weight="500">Outbound</text>
  <text x="260" y="80" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="13" fill="#3C3489">WeChat Work Bot</text>
  <text x="400" y="80" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="13" fill="#3C3489">WeChat Alert</text>
  <text x="530" y="80" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="13" fill="#3C3489">Email · Reports</text>
  <line x1="340" y1="120" x2="340" y2="150" stroke="#888" stroke-width="1.5" marker-end="url(#a)"/>

  <!-- Service Layer -->
  <rect x="60" y="155" width="560" height="90" rx="16" fill="#E6F1FB" stroke="#378ADD" stroke-width="0.5"/>
  <rect x="80" y="171" width="100" height="28" rx="8" fill="#B5D4F4"/>
  <text x="130" y="185" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="13" font-weight="500" fill="#185FA5">Service Layer</text>
  <text x="130" y="227" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="12" fill="#378ADD" font-weight="500">HTTP</text>
  <text x="260" y="205" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="13" fill="#185FA5">REST API · File Server</text>
  <text x="450" y="205" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="13" fill="#185FA5">Charts · OTA Update</text>
  <line x1="340" y1="245" x2="340" y2="273" stroke="#888" stroke-width="1.5" marker-end="url(#a)"/>

  <!-- Core Engine -->
  <rect x="60" y="280" width="560" height="90" rx="16" fill="#E1F5EE" stroke="#1D9E75" stroke-width="0.5"/>
  <rect x="80" y="296" width="100" height="28" rx="8" fill="#9FE1CB"/>
  <text x="130" y="310" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="13" font-weight="500" fill="#0F6E56">Core Engine</text>
  <text x="130" y="352" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="12" fill="#1D9E75" font-weight="500">Engine</text>
  <text x="260" y="330" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="13" fill="#0F6E56">Modbus RTU Collection · Batch Read</text>
  <text x="480" y="330" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="13" fill="#0F6E56">SQLite Storage · Excel Config</text>

  <!-- Modbus RTU label -->
  <rect x="300" y="393" width="80" height="20" rx="4" fill="#9FE1CB"/>
  <text x="340" y="403" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="11" font-weight="500" fill="#0F6E56">Modbus RTU</text>

  <!-- Three-way split -->
  <line x1="340" y1="370" x2="340" y2="390" stroke="#888" stroke-width="1.5"/>
  <line x1="340" y1="390" x2="110" y2="430" stroke="#888" stroke-width="1.5" marker-end="url(#a)"/>
  <line x1="340" y1="390" x2="300" y2="430" stroke="#BA7517" stroke-width="1.5" marker-end="url(#b)"/>
  <line x1="340" y1="390" x2="570" y2="430" stroke="#185FA5" stroke-width="1.5" marker-end="url(#c)"/>

  <text x="105" y="420" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="10" fill="#5F5E5A">Direct</text>
  <text x="300" y="420" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="10" fill="#854F0B">Indirect</text>
  <text x="575" y="420" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="10" fill="#185FA5">Remote</text>

  <!-- Column 1: Direct Modbus RTU -->
  <rect x="40" y="440" width="165" height="55" rx="12" fill="#F1EFE8" stroke="#888" stroke-width="0.5"/>
  <rect x="50" y="450" width="132" height="24" rx="6" fill="#D3D1C7"/>
  <text x="116" y="462" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="11" font-weight="500" fill="#5F5E5A">Direct Modbus Devices</text>
  <text x="122" y="480" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="10" fill="#5F5E5A">PLC · Meter · Sensor</text>

  <!-- Column 2: Protocol Converter -->
  <rect x="230" y="440" width="190" height="70" rx="12" fill="#FAEEDA" stroke="#BA7517" stroke-width="0.5" stroke-dasharray="4,3"/>
  <rect x="245" y="448" width="90" height="24" rx="6" fill="#FAC775"/>
  <text x="290" y="460" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="11" font-weight="500" fill="#633806">Protocol Converter</text>
  <text x="325" y="480" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="9" fill="#854F0B">e.g. Siemens PPI · Mitsubishi</text>
  <text x="325" y="497" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="9" fill="#854F0B">→ Modbus RTU</text>
  <line x1="285" y1="510" x2="285" y2="525" stroke="#BA7517" stroke-width="1" marker-end="url(#b)"/>
  <rect x="230" y="530" width="190" height="40" rx="10" fill="#FCEBEB" stroke="#A32D2D" stroke-width="0.5" stroke-dasharray="4,3"/>
  <text x="325" y="550" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="10" fill="#791F1F">Non-Modbus Devices</text>

  <!-- Column 3: DTU -->
  <rect x="465" y="440" width="195" height="60" rx="12" fill="#E6F1FB" stroke="#378ADD" stroke-width="0.5"/>
  <rect x="500" y="448" width="60" height="24" rx="6" fill="#B5D4F4"/>
  <text x="530" y="460" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="11" font-weight="500" fill="#185FA5">DTU</text>
  <text x="560" y="482" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="9" fill="#185FA5">4G/Ethernet Remote</text>

  <line x1="530" y1="500" x2="530" y2="515" stroke="#185FA5" stroke-width="1"/>
  <line x1="530" y1="515" x2="510" y2="535" stroke="#185FA5" stroke-width="1" marker-end="url(#c)"/>
  <line x1="530" y1="515" x2="555" y2="535" stroke="#BA7517" stroke-width="1" marker-end="url(#b)"/>

  <text x="488" y="528" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="8" fill="#185FA5">Direct</text>
  <text x="575" y="528" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="8" fill="#854F0B">Indirect</text>

  <rect x="445" y="540" width="130" height="38" rx="10" fill="#D3F0F0" stroke="#0F6E56" stroke-width="0.5" stroke-dasharray="4,3"/>
  <text x="510" y="559" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="10" fill="#0F6E56">Remote Modbus Dev</text>

  <rect x="585" y="540" width="80" height="38" rx="8" fill="#FAEEDA" stroke="#BA7517" stroke-width="0.5" stroke-dasharray="3,2"/>
  <text x="625" y="549" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="9" fill="#633806">Protocol</text>
  <text x="625" y="565" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="9" fill="#633806">Converter</text>

  <line x1="625" y1="578" x2="625" y2="590" stroke="#BA7517" stroke-width="1" marker-end="url(#b)"/>

  <rect x="585" y="595" width="80" height="20" rx="6" fill="#FCEBEB" stroke="#A32D2D" stroke-width="0.5" stroke-dasharray="3,2"/>
  <text x="625" y="605" text-anchor="middle" dominant-baseline="central" font-family="sans-serif" font-size="8" fill="#791F1F">Non-Modbus</text>
</svg>