基本说明
<p><strong>1. 命令和应答采用json格式。</strong></p>
<p><strong>2. 后续命令说明json格式为了方便展示没有压缩,为了节省流量,生产环境最好使用压缩后的json。</strong></p>
<ul>
<li>
<p>没有压缩例子</p>
<pre><code>{
&quot;method&quot;: &quot;getDevInfo&quot;,
&quot;frameId&quot;: &quot;1745396239780&quot;
}</code></pre>
</li>
<li>压缩例子
<pre><code>{&quot;method&quot;:&quot;getDevInfo&quot;,&quot;frameId&quot;:&quot;1745396239780&quot;}</code></pre></li>
</ul>
<p><strong>3. json命令和应答中:</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>method</td>
<td>string</td>
<td>命令名称</td>
</tr>
<tr>
<td>result</td>
<td>string</td>
<td>返回结果。ok-成功;其他-具体失败原因</td>
</tr>
<tr>
<td>imei</td>
<td>string</td>
<td>设备imei</td>
</tr>
<tr>
<td>frameId</td>
<td>string</td>
<td>应答同命令frameId</td>
</tr>
<tr>
<td>timestamp</td>
<td>int</td>
<td>秒级时间戳,WiFi款不支持</td>
</tr>
</tbody>
</table>
<p><strong>4. json命令和应答例子</strong></p>
<ul>
<li>
<p>命令例子</p>
<pre><code>{
&quot;method&quot;: &quot;getDevInfo&quot;,
&quot;frameId&quot;: &quot;1745396239780&quot;
}</code></pre>
</li>
<li>应答例子
<pre><code>{
&quot;method&quot;: &quot;getDevInfo&quot;,
&quot;result&quot;: &quot;ok&quot;,
&quot;version&quot;: &quot;SWITCH-EC618X-R24-O-V4.0.8&quot;,
&quot;slotAmount&quot;: 1,
&quot;phaseAmount&quot;: 1,
&quot;imei&quot;: &quot;1745396239780&quot;,
&quot;frameId&quot;: &quot;1745396239780&quot;,
&quot;timestamp&quot;: 1745396759
}</code></pre></li>
</ul>