Web Things
Mozilla has been working on a new IoT spec called Web Things API. It's a spec meant to provide a common language between devices and gateways (blog post) (we already implement a few specs with similar goals like ZigBee, Z-Wave, HomeKit). This spec is slightly different in that it is a lot more web-native: it's based on JSON sent over websockets or REST APIs. Devices consist of attributes, actions and trigger events that one can listen to (example).
Standardizations of IoT is important. It allows Home Assistant to stop chasing proprietary APIs to integrate and instead focusing on building cool stuff on top of standardized APIs like UI, automations, visualizations and machine learning.
Here are a few things that make the Web Things API a great candidate for us to integrate with:
- It is based on JSON which is human readable. This makes it easy for our developers, which are mainly hobbyists, to learn, interact and build on top of it.
- It uses REST and WebSockets to communicate the JSON, two well established methods of communication within Home Assistant.
- It is easily extensible via JSON schemas.
- The spec is still in draft, meaning we can get involved and make sure our use cases are covered.
I've had a talk with the team at Mozilla that is working on this and they are excited to see Home Assistant get involved.
So this is not so much an RFC as to what to do for Home Assistant but instead a call to see who is interested to get involved help shape the future of the open home 👍
I'm interested in following this topic
I'm in :)
This looks very interesting!
Another potential benefit I see, especially with something like Hass.IO, is the ability to pull out the proprietary IoT stacks from the homeassistant core and make them addons. The addons host up a WebThings server on top of ZWave, Zigbee, etc and talk to hass over websockets.
This lets us:
- As @balloob says, Standardize and stabilize these APIs, to focus on a better user experience instead of IoT details
- Version and distribute these components independent of the main homeassistant release
- Slim down the Hass.IO builds and image size by quite a bit
Just an update on this, we have introduced a device registry that holds entities. This will better map to the data model as set forth by Web Things.
Has there been any progress on this? I have some custom sensors being served via an RPi and the WebThings works great, but there appears to be no way to connect it to HomeAssistant. Still
First step for an integration is done: https://github.com/fabaff/webthing-ws
Thanks I see it has moved upstream to:
https://github.com/home-assistant-ecosystem/webthing-ws
What's missing now ?
This architecture issue is old, stale, and possibly obsolete. Things changed a lot over the years. Additionally, we have been moving to discussions for these architectural discussions.
For that reason, I'm going to close this issue.
../Frenck