The Internet of Things is a growing technology which makes use of smart objects where connection and communication between the smart objects took place. IoT is used in many application areas like entertainment, medical, transport, agriculture, security, E-health, etc. even though there are many issues in IoT, one of the main issues during recent years is power management. The need for power management in smart homes focuses on reducing electricity cost and avoiding the high peak demand problems. For reducing electricity cost, another source of power can be used. The most preferable primary power unit will be solar power due to its availability in nature. This paper prioritizes the operation of power units. The proposed system consists of a controller, a photovoltaic system with battery, smart electrical appliance and smart communication network. The main use of the controller is to schedule the power units which may be solar power, battery power and grid supply. The proposed system uses Battery Energy Storage and Management (BESM) algorithm, which helped to reduce electricity cost. The smart controller works on BESM algorithm which picks up power units according to demand. There will be energy conversion from DC to AC so to improve quality of power, Selective Harmonic Elimination(SHE) method. This paper focuses on end user's income level and also the users' difficulty in managing power usage with time varying prices. The proposed system will consider environmental factors like room temperature, outside temperature and user habits like appliance usage frequency, appliance usage characteristics. © 2017 IEEE.