<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <appSettings>
    <add key="ComPort" value="COM3" />
    <add key="BaudRate" value="9600" />
    <add key="DataBits" value="8" />
    <add key="Parity" value="None" />
    <add key="StopBits" value="One" />

    <add key="DeviceId" value="WB1" />
    <add key="DeviceKey" value="PASTE-DEVICE-KEY-FROM-ADMIN-PANEL" />
    <add key="CloudEndpoint" value="https://yourdomain.isv.com.sg/api/live_weight_post.php" />
    <add key="PostIntervalMs" value="500" />

    <!-- Cable unplugged / indicator off: after this long with no valid reading the agent stops sending the old weight and tells the
         cloud "no signal" (the web app then shows Offline). 0 = disable (only for an indicator that sends on change). -->
    <add key="StaleDataTimeoutMs" value="3000" />
    <!-- Port open but silent this long -> the agent closes and reopens the COM port by itself (handles a replugged cable/adapter). -->
    <add key="PortReopenAfterSilenceMs" value="15000" />

    <add key="LocalHttpPort" value="8090" />

    <!-- CCTV capture (optional) - leave CameraCaptureEnabled false until you've
         verified the RTSP path works for your camera model via Camera Settings. -->
    <add key="CameraCaptureEnabled" value="false" />
    <add key="CloudBaseUrl" value="https://yourdomain.isv.com.sg/webapp/public" />
    <add key="FfmpegPath" value="ffmpeg.exe" />
    <!-- ffmpeg.exe must be installed and either on PATH or this set to its full path,
         e.g. C:\ffmpeg\bin\ffmpeg.exe - download from https://ffmpeg.org/download.html -->
    <add key="CameraPollIntervalMs" value="2000" />
  </appSettings>
</configuration>
