def getDevicesById(self): # , query):
        """
        rows = self.camera_collection.get(query)
        devices_by_id = {}
        for row in rows:
            row.pop("classname")
            device = DataModel.RTSPCameraDevice(**row)
            devices_by_id[device._id] = device
        return devices_by_id
        """
        rows = self.camera_collection.get()
        devices_by_id = {}
        for row in rows:
            classname=row.pop("classname")
            if (classname == "RTSPCameraRow"):
                device = DataModel.RTSPCameraDevice(**row)
            elif (classname == "USBCameraRow"):
                device = DataModel.USBCameraDevice(**row)
            else:
                device = None
            if (device):
                devices_by_id[device._id] = device
        return devices_by_id