//[Route("RoomDetail/RoomDetail/{roomID}")]
        public IActionResult RoomDetail(String roomID)
        {
            ViewData["roomID"] = roomID;
            //get sensor and device list
            SensorsController       sensorsController = new SensorsController();
            List <SensorsListModel> sensorsList       = sensorsController.GetSensorsListByRoomid(roomID);
            DevicesController       DevicesController = new DevicesController();
            List <DevicesListModel> devicesList       = DevicesController.GetDevicesListByRoomid(roomID);

            //power list
            List <DailyUsageModel>      dailyUsageModelList = devicesPowerUseOutputUtil.Dailyusage();
            List <MongoDevicesPowerUse> totalPowerUsageList = devicesPowerUseOutputUtil.getPowerUseList();

            double totalPowerUsage = 0;//total power usage of this room

            foreach (MongoDevicesPowerUse mpu in totalPowerUsageList)
            {
                if (mpu.roomId == roomID)
                {
                    totalPowerUsage += mpu.power_used;
                }
            }

            double monthPowerUsage = 0;//total power usage of this room

            foreach (DailyUsageModel dum in dailyUsageModelList)
            {
                if (dum.roomId == roomID)
                {
                    monthPowerUsage += dum.power_used;
                }
            }
            double thisMonthAcUsage = getRoomACPowerUse(roomID);

            //double monthPowerUsage = devicesPowerUseOutputUtil.getTotalPowerUse();//all device this month usage
            ViewData["monthPowerUsage"]  = Math.Round(monthPowerUsage, 2, MidpointRounding.AwayFromZero);
            ViewData["totalPowerUsage"]  = Math.Round(totalPowerUsage, 2, MidpointRounding.AwayFromZero);
            ViewData["thisMonthAcUsage"] = Math.Round(thisMonthAcUsage, 2, MidpointRounding.AwayFromZero);

            //get room model
            var collection = dBManger.DataBase.GetCollection <MongoRoomModel>("ROOM");
            var roomList   = collection.Find(x => x.roomId == roomID).ToList();

            //Debug.WriteLine("roomList list = " + roomList.ToJson().ToString());
            if (roomList.Count > 0)
            {
                ViewData["roomModel"] = roomList[0];
            }
            else
            {
                ViewData["roomModel"] = new MongoRoomModel();
            }


            //Debug.WriteLine("Devices list = " + deviceslist.ToJson().ToString());
            ViewData["sensorsList"] = sensorsList;
            ViewData["devicesList"] = devicesList;
            //ViewData["powerUsageList"] = totalPowerUsageList;

            //Debug.WriteLine("powerUsageList list = " + powerUsageList.ToJson().ToString());
            return(View());
        }