The critical requirements for devices connected in Internet of Things (IoT) are long battery life, long coverage range, and low deployment cost. In our previous work, we developed cognitive controller for controlling the HVAC of non-domestic building using short range communication in an unlicensed spectrum (915 MHz). In this work, we have upgraded our cognitive controller with recently developed long range communication (LoRa) technology and compared it with short range RF communication in an indoor building. The comparison is made in terms of battery life, coverage range, control accuracy and memory size. The effect of changing the transmission power of LoRa on battery consumption of the sensor node is also evaluated. Results show that coverage range of LoRa is 60.4% more than short range communication inside a building.