以太网温湿锁控
<p><strong>上报字段说明:</strong></p>
<table>
<thead>
<tr>
<th>KEY</th>
<th>名称</th>
<th>范围/阈值</th>
<th>指令集</th>
<th>示例</th>
<th>数据类型</th>
<th>上报频率</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>11</td>
<td>锁状态</td>
<td>true/false</td>
<td>command/sync</td>
<td>"11" : true</td>
<td>bool</td>
<td>触发或heartt配置的心跳时间</td>
</tr>
<tr>
<td>51</td>
<td>ip地址(hex)</td>
<td>0x00~0xff 拼接4个</td>
<td>sync</td>
<td>"51" : "c0a81f12"</td>
<td>string</td>
<td>heartt配置的心跳时间</td>
</tr>
<tr>
<td>16</td>
<td>温度</td>
<td>-40.0 ~ +85.0 ℃</td>
<td>sync</td>
<td>"16" : 25.03</td>
<td>flaot</td>
<td>heartt配置的心跳时间</td>
</tr>
<tr>
<td>17</td>
<td>湿度</td>
<td>0 ~ 100 %</td>
<td>sync</td>
<td>"17" : 50</td>
<td>int</td>
<td>heartt配置的心跳时间</td>
</tr>
<tr>
<td>23</td>
<td>温度报警</td>
<td>0:恢复,1:高温,2:低温</td>
<td>alarm</td>
<td></td>
<td>int</td>
<td>触发上报</td>
</tr>
<tr>
<td>53</td>
<td>湿度报警</td>
<td>0:恢复,1:高湿,2:低湿</td>
<td>alarm</td>
<td></td>
<td>int</td>
<td>触发上报</td>
</tr>
</tbody>
</table>
<pre><code class="language-json">//上报topic:/xm/sh/response/mqtt/1510100110127410/1023/v2
//内容:
{
&quot;header&quot; : {
&quot;timeStamp&quot; : &quot;&quot;
},
&quot;payload&quot; : {
&quot;devices&quot; : [ {
&quot;nodeid&quot; : &quot;000&quot;,
&quot;action&quot; : &quot;sync&quot;,
&quot;serviceid&quot; : &quot;10230102&quot;,
&quot;params&quot; : {
&quot;51&quot; : &quot;c0a81f12&quot;,
&quot;16&quot; : 20.05,
&quot;17&quot; : 50,
&quot;11&quot; : true
}
} ]
}
}</code></pre>
<p><strong>下发参数说明:</strong></p>
<table>
<thead>
<tr>
<th>KEY</th>
<th>名称</th>
<th>范围/阈值</th>
<th>指令集</th>
<th>示例</th>
<th>数据类型</th>
<th>上报频率</th>
<th>备注</th>
</tr>
</thead>
<tbody>
<tr>
<td>11</td>
<td>锁状态</td>
<td>true/false</td>
<td>command</td>
<td>bool</td>
<td>云端控制指令</td>
</tr>
<tr>
<td>heartt</td>
<td>心跳时间</td>
<td>5 ~ 65535 秒</td>
<td>writeconfig/readconfig</td>
<td>int</td>
<td>云端配置指令</td>
<td>状态上报时间</td>
</tr>
<tr>
<td>temp_max</td>
<td>温度最大值</td>
<td>-40.0 ~ +85.0</td>
<td>writeconfig/readconfig</td>
<td>float</td>
<td>云端配置指令</td>
</tr>
<tr>
<td>temp_min</td>
<td>温度最小值</td>
<td>-40.0 ~ +85.0</td>
<td>writeconfig/readconfig</td>
<td>float</td>
<td>云端配置指令</td>
</tr>
<tr>
<td>temp_back</td>
<td>温度报警回差</td>
<td>0 ~ 85.0</td>
<td>writeconfig/readconfig</td>
<td>float</td>
<td>云端配置指令</td>
</tr>
<tr>
<td>humi_max</td>
<td>湿度最大值</td>
<td>0 ~ 100</td>
<td>writeconfig/readconfig</td>
<td>int</td>
<td>云端配置指令</td>
</tr>
<tr>
<td>humi_min</td>
<td>湿度最小值</td>
<td>0 ~ 100</td>
<td>writeconfig/readconfig</td>
<td>int</td>
<td>云端配置指令</td>
</tr>
<tr>
<td>humi_back</td>
<td>湿度报警回差</td>
<td>0 ~ 100</td>
<td>writeconfig/readconfig</td>
<td>int</td>
<td>云端配置指令</td>
</tr>
</tbody>
</table>
<pre><code class="language-json">//写配置
{
&quot;header&quot;: {
&quot;timeStamp&quot;: &quot;&quot;
},
&quot;payload&quot;: {
&quot;devices&quot;: [
{
&quot;action&quot;: &quot;writeconfig&quot;,
&quot;params&quot;: {
&quot;temp_max&quot;: 30,
&quot;temp_min&quot;: -20.05,
&quot;humi_max&quot;: 80
}
}
]
}
}
//读配置
{
&quot;header&quot;: {
&quot;timeStamp&quot;: &quot;&quot;
},
&quot;payload&quot;: {
&quot;devices&quot;: [
{
&quot;action&quot;: &quot;readconfig&quot;,
&quot;params&quot;: {
&quot;temp_max&quot;: 0,
&quot;temp_min&quot;: 0,
&quot;humi_max&quot;: 0
}
}
]
}
}</code></pre>