add new api to retrieve last value of give device.