diff --git a/apps/iot/src/iot_host2.erl b/apps/iot/src/iot_host2.erl index 34b5b90..c33d814 100644 --- a/apps/iot/src/iot_host2.erl +++ b/apps/iot/src/iot_host2.erl @@ -302,7 +302,10 @@ handle_event(cast, {handle_message, #{<<"method">> := <<"inform">>, <<"params">> #{<<"at">> := At, <<"services">> := ServiceInforms} -> lists:foreach(fun(#{<<"props">> := Props, <<"name">> := Name, <<"version">> := Version, <<"version_copy">> := VersionCopy, <<"status">> := Status}) -> %% props 主机id:场景id:微服务id - [_, SceneId, MicroId] = binary:split(Props, <<":">>, [global]), + [_, SceneId0, MicroId0] = binary:split(Props, <<":">>, [global]), + SceneId = binary_to_integer(SceneId0), + MicroId = binary_to_integer(MicroId0), + micro_inform_log:insert(#{ <<"host_id">> => HostId, <<"scene_id">> => SceneId,