fix host
This commit is contained in:
parent
98746b99ac
commit
c1b3191b9c
@ -400,7 +400,9 @@ handle_event(cast, {handle, {data, Data}}, ?STATE_ACTIVATED, State = #state{aes
|
||||
{keep_state, State};
|
||||
|
||||
%% ping的数据是通过aes加密后的,因此需要在有会话的情况下才行
|
||||
handle_event(cast, {handle, {ping, CipherMetric}}, ?STATE_ACTIVATED, State = #state{uuid = UUID, name = Name, aes = AES, has_session = true}) ->
|
||||
handle_event(cast, {handle, {ping, CipherMetric}}, ?STATE_ACTIVATED, State = #state{uuid = UUID, name = Name, aes = AES,
|
||||
heartbeat_counter = HeartbeatCounter, has_session = true}) ->
|
||||
|
||||
MetricsInfo = iot_cipher_aes:decrypt(AES, CipherMetric),
|
||||
case catch jiffy:decode(MetricsInfo, [return_maps]) of
|
||||
Metrics when is_map(Metrics) ->
|
||||
@ -411,10 +413,10 @@ handle_event(cast, {handle, {ping, CipherMetric}}, ?STATE_ACTIVATED, State = #st
|
||||
|
||||
%% 检测消息是否需要报警
|
||||
iot_watchdog:detection(UUID, Name, Metrics),
|
||||
{keep_state, State#state{metrics = Metrics}};
|
||||
{keep_state, State#state{metrics = Metrics, heartbeat_counter = HeartbeatCounter + 1}};
|
||||
Other ->
|
||||
lager:warning("[iot_host] host_id: ~p, ping is invalid json: ~p", [UUID, Other]),
|
||||
{keep_state, State}
|
||||
{keep_state, State#state{heartbeat_counter = HeartbeatCounter + 1}}
|
||||
end;
|
||||
|
||||
handle_event(cast, {handle, {inform, Info0}}, ?STATE_ACTIVATED, State = #state{uuid = UUID, host_id = HostId, aes = AES, has_session = true}) ->
|
||||
|
||||
@ -6,16 +6,15 @@
|
||||
14 10404 垃圾溢满
|
||||
12 22503 后厨非标着装
|
||||
15 23104 动火离人
|
||||
16 22706 强弱电间违规进入
|
||||
16 22715 强弱电间违规进入
|
||||
17 20863 作业人员抽烟监测
|
||||
18 20864 作业人员手机使用监测
|
||||
19 23105 挡鼠板监测
|
||||
20 23106 垃圾桶加盖
|
||||
21 22714 配电间人员进入监测
|
||||
```
|
||||
|
||||
1、鼠类检测 0508103010001050300001 朴苑餐厅
|
||||
2、异物占道 0512104030001050400003 行政楼B楼
|
||||
3、垃圾溢满 0507106030001050600003 朴苑3舍
|
||||
4、后厨非标着装 0500000000001022700537 监控摄像头532(诚苑餐厅 北侧)
|
||||
5、动火离人 0500000000001022700538 监控摄像头533(诚苑餐厅 北侧)
|
||||
5、动火离人 0500000000001022700538 监控摄像头533(诚苑餐厅 北侧)
|
||||
Loading…
x
Reference in New Issue
Block a user