device id and sensor number selection, refactor to ajax only