add function gethostabledeviec
need to be refactored the choose the least energy usage device