Undo device add if the setup fails
Make value argument to tdSetDeviceParameter always be a str