M2M communications and internet of things as pillars of smart city initiatives