Smart home technology for telemedicine and emergency management