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),