Modify addDevice to support a name field