diff --git a/apps/iot/src/http_handler/http_host_handler.erl b/apps/iot/src/http_handler/http_host_handler.erl index 411f179..2ea3246 100644 --- a/apps/iot/src/http_handler/http_host_handler.erl +++ b/apps/iot/src/http_handler/http_host_handler.erl @@ -112,7 +112,8 @@ handle_request("POST", "/host/activate", _, #{<<"uuid">> := UUID, <<"auth">> := lager:debug("[host_handler] activate host_id: ~p, failed with reason: ~p", [UUID, Reason]), {ok, 200, iot_util:json_error(400, <<"host not found">>)}; {ok, Pid} when is_pid(Pid) -> - case iot_host:has_session(Pid) of + %% 激活的话不管是否存在会话都需要通知 + case iot_host:has_session(Pid) or Auth of true -> lager:debug("[host_handler] activate host_id: ~p, start", [UUID]), {ok, Assoc} = iot_host:make_assoc(Pid), diff --git a/docs/host-mqtt-jiaohu.md b/docs/host-mqtt-jiaohu.md index d7261b6..e939b6a 100644 --- a/docs/host-mqtt-jiaohu.md +++ b/docs/host-mqtt-jiaohu.md @@ -110,7 +110,6 @@ t = 8 [ { "service_name": "从该设备端的哪个服务采集的数据", - "node_name": "节点名称", insert到influxdb的时候就是表名 "at": int, 精确到毫秒 // 该微服务采集的数据,是一个包含map的列表类型,map的内容可以由微服务自己指定 // 目前一般的格式是"metric-name": $value样式的数据