fixed proper closing of PiHome to close socket and stop Xbee as well