Generates a unique id for a power meter in a thread-safe way. Contains a mutable database for name mappings.