This paper proposes an IoT based solution to automate smart lighting in large public spaces. The proposed solution aims to optimize power efficiency and cost effectiveness while providing an automated solution. The system makes use of devices that can detect Wi-Fi signals (Wi-Fi sniffers) from mobile devices. Continuously monitoring the smart devices (connected to a wireless network) in the vicinity makes it possible to estimate the position and number of people in an area based on the range of the device and use this to control the lighting.