Home Assistant Dialogue
W3C TPAC 2023 Breakout Session
Ege Korkan, Josh Cohen,
Michael McCool, Cristiano Aguzzi
Before we start!
2
3
Agenda
Logistics
Who can scribe?
Please join IRC and then type present+
https://irc.w3.org/?channels=%23wot-home-assistant
Use q+ when you want to speak
The minutes will be public
Event Details: https://www.w3.org/events/meetings/c13a3ae8-979c-4157-9c74-b28aba314878/
Introduce Yourself
After talking, please put your name in IRC, together with your affiliation
Goal
Discuss how WoT can work with Home Assistant (and similar) smart home gateways/ecosystems
Short Introduction to Web of Things
Short Introduction to Home Assistant
What is “Home Assistant”
Home Assistant Integrations
Home Assistant Dashboard
LIFX Bulbs
ESP32 DHT11 Temp Sensor
WeMo Plugs
Scenes
ESP Scene Selector
Example
DIY ESPHome Scene Selector
Build: HA/ESPhome Scene Button
ID: widget2
Ready for Bed: Short press = RED scene
Ready to Sleep: Long Press =LIGHTS OUT
Binary Sensor: Push button
ESP32 Microcontroller
3D Printed Case
Home Assistant ESPHome Panel
After Creating device, click edit to config
Line | Comment |
53 | Switch on MCU GPIO Pin 5 |
57 | Debounce! |
58 | On_click handler |
59-68 | Short press |
69-78 | Long Press |
Previous Relevant Experience
TDs for Northbound REST API of Home Assistant
Integration Scenarios
Integration not
A full rewrite of the architecture is pretty unlikely, no matter how amazing WoT is or can be. What can be easy paths forward for such platforms in general? What can be our strategy?
List of Scenarios
Integration Scenarios
W3C WoT
Home Assistant
ESPhome
Temp sensor
Scene button
W3C WoT
LifX
Couch light
Desk light
WeMo
AC switch
Xbox switch
W3C WoT
WoT Siren
WoT dashboard
Southbound Integration
WoT works well for cases where there is manual configuration overhead due to lack of standardized data model
HTTP (e.g. Philips Hue, other gateways)
MQTT (NCD sensors)
Modbus devices
and more
Different Ways of Southbound
This can also support directories and introduction mechanisms defined in WoT Discovery
Note: There are different levels of maturity for a HA integration
Annotating Events
ktk: Filtering based on events and annotating the events
Northbound Integration
McCool’s work
We can generate TDs for the northbound REST API. This implies that TDs need to be to flexible enough to describe such APIs
https://github.com/w3c/wot-testing/blob/main/data/input_2022/TD/intel-wot-ha/TDs/sensor.ncd1_temperature_1.td.jsonld
Event Annotation
It can be done on top of the northbound integration where the annotated TDs can be consumed by a triple store
ESPHome Integration
ESPHome uses a YAML file to configure the device and this results in e.g. MQTT topics. We can predict those topics and generate a TD accordingly.
Once we generate those TDs, the southbound integration can happen
Business Case
For manufacturers
Instead of multiple integrations to different platforms, they need to write a TM themselves and the gateways consume them
What is Next?
To discuss offline
The discussion will continue in WoT CG meetings (office hours, internal meetings)
Please join or give us your contact information
Outreach
Any other inputs?
Meeting Minutes
Participants Consolidation
Notes
Triplestore integration: https://www.youtube.com/watch?v=VqSf-z30x-M
“Web of Things is not a protocol” is not well understood. It is not a protocol, it is a data model
Use Cases document is not well advertised
Backup