A power management solution for Bluetooth low energy in smart homes of internet of things