diff --git a/apps/iot/src/iot_host.erl b/apps/iot/src/iot_host.erl index bf15cc3..55e28a9 100644 --- a/apps/iot/src/iot_host.erl +++ b/apps/iot/src/iot_host.erl @@ -384,7 +384,7 @@ code_change(_OldVsn, StateName, State = #state{}, _Extra) -> convert_fields(#{<<"key">> := Key, <<"value">> := Value, <<"unit">> := Unit}) -> #{Key => jiffy:encode(#{<<"value">> => Value, <<"unit">> => Unit}, [force_utf8])}; convert_fields(#{<<"key">> := Key, <<"value">> := Value}) -> - #{Key => Value}. + #{Key => #{<<"value">> => Value}}. %% 获取到分发的路由 router_uuid(#{<<"device_uuid">> := DeviceUUID}, _) when is_binary(DeviceUUID), DeviceUUID /= <<>> -> diff --git a/config/sys-dev.config b/config/sys-dev.config index ca70363..dcf9faf 100644 --- a/config/sys-dev.config +++ b/config/sys-dev.config @@ -52,7 +52,7 @@ [ {host, "39.98.184.67"}, {port, 8086}, - {token, <<"VlBhRqHguo7exc9C8DR2ol7JV8Gumc5MhGaPhd7Rr9UGhqAZET67tmI0CedIfpc1Tg-MaLwPcwzg_1iYZtvsZw==">>} + {token, <<"0DGZaV_wk6OCt_Bazk5W_9L3Zo-y-bGzwPS6NDGAqy7iSzPVTgC0paINNJ6V3y3Eo_JYfWAHhXI8OZTDnW3IRQ==">>} ] }