Scrum Master + Data Engineer in a manufacturing company Working with • data and people Focus on • Agile/Engineering culture • Streaming process • IoT applications • Data visualization Shuhsi Lin sucitw gmail.com https://medium.com/@suci/
• Introduction of home-assistant ◦ Basic concept and Architecture • How to build your home automation system ◦ Environment setup/Configuration/Possible scenarios • Explore Your Data ◦ Data, libary, and examples • Summary What I Will Share Today 3
Pi • Compare ecosystems for Amazon Alexa/ Google home/ Apple HomePod/ Mi home ….. • Too many source code What I Will not Focus ( aka I don’t really know) 4
on) Commands (ex, turn light on) Home Automation: Start from a hub User Information Commands State • Light = on ◦ Brightness: 120 ◦ Color: Yellow • Sensor value ◦ Temperature: 32 oC • Switch ◦ Power: turn_on Event • State of switch has changed ◦ Off -> on • Motion detected • Remote control TV
Information (ex, light is on) Commands (ex, turn light on) Information Commands Information Commands Information Commands Home Automation Smart Home Rules (Configuration) Home Control, Automation & the Smart Home
data •More scenarios •Privacy and trust •Easy to use Challenges 14 https:/ /www.home-assistant.io/blog/2014/12/26/home-control-home-automation-and-the-smart-home/
◦ 2 weeks release cycle ◦ Chatrooms, forums, videos • Supported many and many devices • Configuration-based ◦ Automation with no code change • Cross platforms • Local or remote and cloud is optional
• Integration/Components (> 1400) Responsible for a specific domain within Home Assistant. ◦ Interact with an Internet-of-Things domain ▪ MQTT, Zwave, Zigbee ▪ Lights (Hue, Tradfri) ▪ Sensors ◦ Respond to events that happen within Home Assistant ▪ Small pieces of home automation logic or involve services that do common tasks within your house. ▪ ex, device_sun_light_trigger component Wording in HA Event Bus: facilitates the firing and listening of events -- the beating heart of Home Assistant. State Machine: keeps track of the states of things and fires a state_changed event when a state has been changed. Service Registry: listens on the event bus for call_service events and allows other code to register services. Timer: sends a time_changed event every 1 second on the event bus
Information (ex, light is on) Commands (ex, turn light on) Information Commands Information Commands Information Commands Home Automation Smart Home Rules (Configuration) Home Control, Automation & the Smart Home
set state Event Bus Service Registry Timer listen for events/ fire event state_changed events call event listeners time_changed events publish service call service modified from (component_interaction) https:/ /developers.home-assistant.io/docs/en/architecture_index.html ...
Mossbian (Chinese) 4. Hass.io use this • HA UI • Ready to use (integrated 3rd part applications) • Easy to install and update (ResinOS and Docker) • Easy to extend by Hass.io add-ons (Goolge Assistant...) Home Assistant
Home Assistant) b. Home Assistant, (2) 遙控小米開關與條件式自動化 (Internet of Things, Home Assistant) c. Home Assistant, (3) 安裝 InfluxDB 與 Grafana 套件 (Internet of Things, Home Assistant) d. Home Assistant, (4) 安裝 Mosquitto 套件與建立 MQTT 開關 (Internet of Things, Home Assistant) More Step by Step!! • 新手上路 Home Assistant 中文文檔
Entity States event_id last_changed last_updated created context_id context_user_id events states services context context_id user_id recorder_runs refresh_token_id not stored in their own table https://data.home-assistant.io/docs/data_context https://data.home-assistant.io/docs/data_recorder_runs run_id start end closed_incorrect created
users ▪ Quick start on Ubuntu ▪ Docker • kylerw/hass-data-detective • Jupyter notebooks for Home Assistant ◦ DataExploration-1 and -2 • HASS-data-detective/notebooks • Sample data HASS Data Detective Home Assistant notebooks Explore Your Data More Possibilities • AI in smart home ◦ To learn when to switch on the lights in the living room
things (so far) • Home assistant ◦ as a Developer ◦ as a User • Hassio ( + Raspberry Pi) • Home assistant cloud • Try it with blog tutorials • Play data from HA Take Home Messages
• https://www.home-assistant.io/getting-started/ • https://www.hachina.io/ (Chinese!) • https://home-assistant.cc (Another Chinese!) • https://zhuanlan.zhihu.com/c_138110024 知乎:智能家居从零开始( Home Assistant) • Xiaomi Smart Home Ecosystem list VIDEOS, TALKS, WORKSHOPS AND ALIKE • Paulus Schoutsen - Awaken your home: Python and the Internet of Things - PyCon 2016 • Automating your Home with Home Assistant: Python’s Answer to the Internet of Things Hassio • https://www.home-assistant.io/hassio/ • https://www.home-assistant.io/blog/2017/07/25/introducing-hassio/ Google Home • https://www.home-assistant.io/components/google_assistant/ (components/) • https://www.home-assistant.io/cloud/google_assistant/ (via HA cloud) • https://www.youtube.com/watch?v=NfyavpAg4as with google assistant Data Science with HA • https://data.home-assistant.io/ Smart Home • 智慧家庭實驗室 林祐祺 References not HA, but python with IoT • Homekit with Python • IoT in Home – Building a Toilet Vacancy Indicator • ….