fixed bad sql method name
added device type to replicate detail panel
made changes