Closed sonologic closed 11 years ago
I guess this was proposed by Eike Frost who is also a member in the same hackspace as I am. We deprecated this approach in favor of the specs laid out in issue #6
Can somebody add enums with allowed values for the units? The specs file is here.
The new specs define a whole bunch of sensor types with a straightforwarded structure. The interests of all the hackerspaces should be met with those.
We updated it with some sensors; since you asked for a spec here is what we used:
I've tried to use the same format you used for temp; though I have a suggestion for future revisions of the specification: maybe disassociate the value of the measurement from its units (such as, say, {'temp': {'outside': [23.7, 'C'] } }
IMHO this would make sense since this is an API and should be easily machine-readable; making the values floats, integers, etc. and specifying the units separately would make it a whole lot easier for consumers of the API to use this data (for instance in charting) without reparsing the strings into its components.