Merged
Conversation
The latest version has to be defined at the end, otherwise previous versions are not detected (see VuePress documentation).
ThingSet will not be used via plain LoRa, but only via LoRaWAN instead.
Rationale: "node" can easily be confused with IoT sensor nodes. The term "object" corresponds to the JSON definition, which helps with understanding.
Rationale: Most programming languages and databases don't allow a dash in variable / time series names. This change allows to keep the name consistent accross all applications.
- Use "data item" for leaf nodes where actual data is stored - Use "data set" for a data object referencing other nodes for publication - Use "group" instead of categories
Contributor
Author
|
Ping @b0661, @luizvilla, @light411 |
b0661
reviewed
Jul 27, 2021
| | ID | Name | Description | | ||
| |------|------------|-------------| | ||
| | 0x10 | Time_s | Unix timestamp in seconds since Jan 01, 1970 | | ||
| | 0x17 | .name | Endpoint used by binary protocol to determine names from IDs | |
Contributor
Author
There was a problem hiding this comment.
An endpoint is a specific type of data object / path which is used for a request (like in RESTful APIs). It's slightly different from a generic data object name, so I'd like to keep this here.
b0661
reviewed
Jul 27, 2021
Rationale: This term makes more clear that the subset does not contain the actual data, but just defines a subset of all data items, referenced by an array of data item names.
Contributor
Author
|
Going to merge this spec update now, as the library has been updated in parallel already. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR suggests some breaking changes for the ThingSet protocol which try to solve issues that occured during the development of gateways to map ThingSet with MQTT and HTTP.
Preview: libre.solar/thingset/branch/v0.4/
Non-breaking changes
Nomenclature update
These updates try to enhance consistency and understanding of the protocol concepts.
Bat_V) are called data items.x-in order to distinguish them from paths or data sets..) are introduced, which are used to configure e.g. the publication frequency of groups or data sets.Other updates/improvements
outputgroup was split intomeasandstate. However, adapting this structure is not mandatory.Breaking changes
Statements now contain the path
Previously, a binary publication message only contained the hash sign followed by the payload data. Published messages (now called statements) have been extended to contain the path, e.g.
meas:This is necessary for better integration with MQTT. It allows to have separate topics for static data, dynamic measurement data and event-driven data, which can be sent in very different periods.
GET requests in binary mode do not contain payload anymore
Previously, the payload behind the endpoint/path was used for device discovery (e.g. to get all data objects below a specific path or return name:value maps instead of id:value maps).
However, CoAP and HTTP requests do not allow any payload.
In order to make ThingSet more compatible, the FETCH request is used for device discovery instead.
The
nameidcommand in binary mode has been removedInstead, ID / name mapping is done via normal data items stored under the fixed path
.names. This allows for better compatibility with other protocols aswell.Some IDs are reserved
For LoRaWAN and CAN some IDs need to be known in advance in order to retrieve further device information. The IDs from
0x10to0x20are now reserved for these purposes. In addition to that, IDs >0x8000are reserved for control purposes.