Recognition and handling of Outdoor series tag models #45
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.
Includes new and updated API methods for querying a tag's capabilities.
Also introduces a "secondary" temperature sensor (
tag.hasSecondaryTempSensor()
,tag.secondarytempSensor
) for those tags that can use and make available the readings from more than one temperature sensor. Currently only the "Thermocouple" model in the Outdoor series does this: the one treated primary is the external probe, and the secondary is the on-board chip. Note that although in theory the "GE Protimeter" model in the Outdoor series also measures temperature both from an (optional) external DS18B20 probe and with an on-board chip, only one reading is available (the probe if activated, and the internal on-board chip otherwise).Temperature, moisture, and humidity sensors now have a (readonly)
probeType
property. For temperature sensors, it will giveDS18B20
orThermocouple
orInternal
; for moisture sensorsBLDXXXX
or 'Internal; and
Internalif an external probe is unsupported by the tag for the respective sensor. Also, he
probeDisconnected` property will be present and have a boolean value for sensors for which an external probe is supported and for which its connection status can be detected. (The latter is currently true only for the "Basic" model in the Outdoor series.)Finally, this also deprecates
tag.isHTU()
from the API. The name of this method was originally borrowed from the Wireless Sensor Tags Web SDK code, where the meaning was never made explicit. It was used both for querying precision of temperature reading and having a humidity sensor. Until the arrival of the Outdoor tag models, these used to be synonymous (tags with 8bit precision temperature did not have a humidity sensor). Now, however, the Outdoor tag models all support high-precision temperature reading (even if less than 13bit), yet only one of them can also measure humidity/moisture. We have been using (and documenting)tag.isHTU()
in the semantics of having high-precision temperature, whereas in the vendor's Web SDK it is now resigned to querying for presence of a humidity sensor. To fully disambiguate, we are now deprecatingtag.isHTU()
; it is for now an alias for the preferabletag.canHighPrecTemp()
, and will be removed from the API in a later version.See #44 for further context and considerations that formed the basis for this implementation. The original issue report is #36.