A system for assisted living and home automation