fix device

This commit is contained in:
anlicheng 2023-09-14 16:36:42 +08:00
parent 0fb00a87a9
commit 19803549ad
2 changed files with 4 additions and 1 deletions

View File

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

View File

@ -53,7 +53,7 @@
{
"key": "device_status",
"value": NewStatus, 0: 离线, 1: 在线, 2: 未知
"value": NewStatus, 0: 离线, 1: 在线
"unit": 0,
"type": <<"DI">>,
"name": "设备状态",