System design of the internet of things for residential smart grid