diff --git a/apps/iot/src/iot_device.erl b/apps/iot/src/iot_device.erl index 6f766ea..57bd8a9 100644 --- a/apps/iot/src/iot_device.erl +++ b/apps/iot/src/iot_device.erl @@ -179,6 +179,9 @@ code_change(_OldVsn, StateName, State = #state{}, _Extra) -> %%%=================================================================== -spec report_event(DeviceUUID :: binary(), NewStatus :: integer()) -> no_return(). +report_event(DeviceUUID, ?DEVICE_UNKNOWN) -> + lager:notice("[iot_device] device_uuid: ~p, status: unknown, not report", [DeviceUUID]), + ok; report_event(DeviceUUID, NewStatus) when is_binary(DeviceUUID), is_integer(NewStatus) -> %% 设备的状态信息上报给中电 Timestamp = iot_util:timestamp_of_seconds(), diff --git a/docs/north_data.md b/docs/north_data.md index c03e9fc..cf848ff 100644 --- a/docs/north_data.md +++ b/docs/north_data.md @@ -53,7 +53,7 @@ { "key": "device_status", - "value": NewStatus, 0: 离线, 1: 在线, 2: 未知 + "value": NewStatus, 0: 离线, 1: 在线 "unit": 0, "type": <<"DI">>, "name": "设备状态",