Time series analysis and anomaly detection for trustworthy smart homes