From 8deb048b6758b46e5afb21a3fc28a0b2786bca7d Mon Sep 17 00:00:00 2001 From: anlicheng Date: Thu, 17 Aug 2023 16:29:00 +0800 Subject: [PATCH] fix --- apps/iot/src/iot_host.erl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apps/iot/src/iot_host.erl b/apps/iot/src/iot_host.erl index 8daeda6..91d509c 100644 --- a/apps/iot/src/iot_host.erl +++ b/apps/iot/src/iot_host.erl @@ -386,8 +386,9 @@ handle_event(cast, {handle, {feedback_result, Info0}}, ?STATE_SESSION, State = # end, {keep_state, State}; -handle_event(cast, {handle, {event, Event0}}, ?STATE_SESSION, State = #state{aes = AES}) -> +handle_event(cast, {handle, {event, Event0}}, ?STATE_SESSION, State = #state{uuid = UUID, aes = AES}) -> EventText = iot_cipher_aes:decrypt(AES, Event0), + lager:debug("[iot_host] uuid: ~p, get event: ~p", [UUID, EventText]), case catch jiffy:decode(EventText, [return_maps]) of #{<<"event_type">> := ?EVENT_DEVICE, <<"params">> := #{<<"device_uuid">> := DeviceUUID, <<"status">> := Status}} -> DevicePid = iot_device:get_pid(DeviceUUID),