fix
This commit is contained in:
parent
85214a89c9
commit
8deb048b67
@ -386,8 +386,9 @@ handle_event(cast, {handle, {feedback_result, Info0}}, ?STATE_SESSION, State = #
|
|||||||
end,
|
end,
|
||||||
{keep_state, State};
|
{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),
|
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
|
case catch jiffy:decode(EventText, [return_maps]) of
|
||||||
#{<<"event_type">> := ?EVENT_DEVICE, <<"params">> := #{<<"device_uuid">> := DeviceUUID, <<"status">> := Status}} ->
|
#{<<"event_type">> := ?EVENT_DEVICE, <<"params">> := #{<<"device_uuid">> := DeviceUUID, <<"status">> := Status}} ->
|
||||||
DevicePid = iot_device:get_pid(DeviceUUID),
|
DevicePid = iot_device:get_pid(DeviceUUID),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user