Intel - Home Assistant examples and README #294
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I have been working on a project to extract information from the Home Assistant RESTful API and express access to various Home Assistant "entities" as WoT TDs. This PR includes six example TDs generated this way.
This has not been completely successful because of the way the Home Assistant API mixes data and metadata. The API does not really include ALL the metadata needed to generate a TD, some of it is implicit in the Home Assistant documentation, some is not exposed through the API, some is inconsistently exposed (such as the device categories, sometimes an entity is only defined as a "sensor", and "binary_sensors" might use different values for on-off depending on their device category, etc. etc.). Also, some things like events need JSON RPC and Web Sockets which WoT does not do yet.
In the long run a Home Assistant "add-on" is probably needed to do this properly...
Good news is HA uses bearer tokens so this adds a test for that security mechanism. Bad news is HA requires bearer tokens even if you are using plain HTTP (which is pointless), and it only has a primitive mechanism to limit scopes (so if I open up my HA to a tester, I have to open ALL devices on that instance, not just specific ones; there are "groups" under development in HA but they aren't enforced yet).
See the README.md for more details.