anchor.diff:  
   
   do_create_device(#state{topology = Topology}, Rec) ->
  -    Map = to_map(device, Rec#device{id = gen_uid(), status = <<"">>, lastUpdate = 0, positionId = 0}),
  +    Map = to_map(device, Rec#device{id = gen_id(), status = <<"">>, lastUpdate = 0, positionId = 0}),
       Callback = fun(Worker) ->
                          mc_worker_api:insert(Worker, ?COLLECTION_DEVICES, Map)
                  end,
  
positive.code:        <<"attributes">> => Rec#position.attributes
       }.
  
  gen_uid() -> bson:unixtime_to_secs(bson:timenow()).
  
  hash(V) -> em_password:hash(V).
  
  
  %%test() ->
  
negative.code:       };
  from_map(device, Map) ->
      #device{
         id = objectid_to_id(maps:get(<<"_id">>, Map, 0)),
         name = maps:get(<<"name">>, Map, <<"">>),
         uniqueId = maps:get(<<"uniqueId">>, Map, <<"">>),
         status = maps:get(<<"status">>, Map, <<"">>),
  