A Raspberry Pi based smart home