Application of an integrated PHY and MAC layer model for half-duplex IEEE 802.15.4 networks to smart grids