心跳包协议
<p><strong>接口描述:</strong></p>
<ul>
<li>当设备定时唤醒或被人为唤醒后,设备将自主发送心跳,并将当前自检数据上传到第三方平台。</li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<p><strong>指令代码</strong></p>
<ul>
<li>129</li>
</ul>
<p><strong>推送示例</strong></p>
<pre><code>{
&quot;CMD&quot;:&quot;129&quot;,
&quot;Timestamp&quot;:&quot;1589173507551&quot;,
&quot;Sign&quot;:&quot;BB71141840B07D7E59578971B064B711&quot;,
&quot;Data&quot;:{
&quot;DevSN&quot;: &quot;FFFFFFFFFFFFFFFF&quot;,
&quot;DevPower&quot;: 100,
&quot;LockStatus&quot;: 1,
&quot;DevType&quot;: 1,
&quot;SpaceEmpty&quot;: 1,
&quot;ErrCode&quot; : &quot;0000000000010110&quot;,
&quot;OptOrder&quot;: &quot;00000000&quot;
}
}</code></pre>
<p><strong>返回参数说明</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>CMD</td>
<td>string</td>
<td>指令类别</td>
</tr>
<tr>
<td>Timestamp</td>
<td>string</td>
<td>时间戳</td>
</tr>
<tr>
<td>Sign</td>
<td>签名</td>
<td>PID+Timestamp+Key的MD5加密,后同</td>
</tr>
<tr>
<td>Data</td>
<td>对象</td>
<td>具体数据</td>
</tr>
<tr>
<td>-DevSN</td>
<td>String</td>
<td>设备序列号</td>
</tr>
<tr>
<td>-DevPower</td>
<td>int</td>
<td>电量:1-100%</td>
</tr>
<tr>
<td>-LockStatus</td>
<td>int</td>
<td>设备状态:</td>
</tr>
</tbody>
</table>
<p>0:上电初始化<br />
1:车位锁上升到位<br />
2:车位锁下降到位<br />
3:车位锁上升错误<br />
4:车位锁下降错误<br />
5:车位锁正在动作,还未到位<br />
6: 车位锁上升开关错误<br />
7: 车位锁下降开关错误 |
| -DevType | int | 设备类别::<br />
2:常降车位锁<br />
1:常升车位锁 |
| -SpaceEmpty | int | 车位状态:<br />
1:车位上有车<br />
0:车位上无车 |</p>
<p><strong>接口描述:</strong></p>
<ul>
<li>当设备定时唤醒或被人为唤醒后,设备将自主发送心跳,并将当前自检数据上传到第三方平台。</li>
</ul>
<p><strong>请求方式:</strong></p>
<ul>
<li>POST</li>
</ul>
<p><strong>指令代码</strong></p>
<ul>
<li>129</li>
</ul>
<p><strong>推送示例</strong></p>
<pre><code>{
&quot;CMD&quot;:&quot;129&quot;,
&quot;Timestamp&quot;:&quot;1589173507551&quot;,
&quot;Sign&quot;:&quot;BB71141840B07D7E59578971B064B711&quot;,
&quot;Data&quot;:{
&quot;DevSN&quot;: &quot;FFFFFFFFFFFFFFFF&quot;,
&quot;DevPower&quot;: 100,
&quot;LockStatus&quot;: 1,
&quot;DevType&quot;: 1,
&quot;SpaceEmpty&quot;: 1,
&quot;ErrCode&quot; : &quot;0000000000010110&quot;,
&quot;OptOrder&quot;: &quot;00000000&quot;
}
}</code></pre>
<p><strong>返回参数说明</strong></p>
<table>
<thead>
<tr>
<th>参数名</th>
<th>类型</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>CMD</td>
<td>string</td>
<td>指令类别</td>
</tr>
<tr>
<td>Timestamp</td>
<td>string</td>
<td>时间戳</td>
</tr>
<tr>
<td>Sign</td>
<td>签名</td>
<td>PID+Timestamp+Key的MD5加密,后同</td>
</tr>
<tr>
<td>Data</td>
<td>对象</td>
<td>具体数据</td>
</tr>
<tr>
<td>-DevSN</td>
<td>String</td>
<td>设备序列号</td>
</tr>
<tr>
<td>-DevPower</td>
<td>int</td>
<td>电量:1-100%</td>
</tr>
<tr>
<td>-LockStatus</td>
<td>int</td>
<td>设备状态: 0:上电初始化 1:车位锁上升到位 2:车位锁下降到位 3:车位锁上升错误 4:车位锁下降错误 5:车位锁正在动作,还未到位 6: 车位锁上升开关错误 7: 车位锁下降开关错误</td>
</tr>
<tr>
<td>-DevType</td>
<td>int</td>
<td>设备类别:: 2:常降车位锁 1:常升车位锁</td>
</tr>
<tr>
<td>-SpaceEmpty</td>
<td>int</td>
<td>车位状态: 1:车位上有车 0:车位上无车</td>
</tr>
<tr>
<td>-ErrCode</td>
<td>string</td>
<td>错误号,每字符代表一种错误,具体请详阅《错误号说明》</td>
</tr>
<tr>
<td>-OptOrder</td>
<td>string</td>
<td>当前开关锁业务流水,8位数字</td>
</tr>
</tbody>
</table>