gjr80 / weewx-gw1000

A WeeWX driver based on the Ecowitt LAN/Wi-Fi Gateway API
GNU General Public License v3.0
62 stars 9 forks source link

Rationalisation of soil temperature support #47

Closed gjr80 closed 2 years ago

gjr80 commented 3 years ago

The GW1000 API documentation has long included support for 16 discrete soil temperature sensors under the CMD_GW1000_LIVEDATA API command. Despite no such sensor being publicly released, support for these sensors was and is included in the GW1000 driver. This support consisted of the ability to extract the relevant sensor data from the CMD_GW1000_LIVEDATA API command response and map to an appropriate WeeWX field (soilTempx).

A dedicated soil temperature sensor, the WN34S, has subsequently been released along with the WN34 and WN34L (Note, this sensor family is referred to as the WH34 in the API documentation and that nomenclature is currently used in the GW1000 driver). However, instead of using the previously allocated 16 soil temperature ‘addresses’ allocated in the API documentation the WN34S uses a separate address space. Furthermore, the WH34S shares eight ‘addresses’ with the WN34L meaning the GW1000 supports a maximum of eight total WN34L or WH34S of any mix. Also, the API provides no (known) way to discriminate between a WN34S and a WN34L.

Whilst the GW1000 driver includes support for the decoding of WN34S/L sensors the mapping is to WeeWX fields tempx (the WeeWX soilTempx fields are still currently mapped from the original 16 soil temperature ’addresses’). This can be overcome by the user creating a custom mapping to override the default mapping; but perhaps there is a better way, in particular a better default mapping.

Also, based on the API documentation the current driver uses the WH34 nomenclature not WN34. This is largely internal but it does manifest itself externally through in the default mapping. This discrepancy should be corrected, though it will have an impact on users already using WN34S/L sensors.

gjr80 commented 2 years ago

WN34/WH34 nomenclature issue fixed in v0.5.0.

The issue of mapping remains, given current API capabilities it is not possible to discriminate between soil and liquid temperature sensors. Until this changes the user will need to map WH34 sensors manually. A wiki page would be appropriate.

gjr80 commented 2 years ago

Wiki now includes a page covering changes to WN34 sensor support along with a note regarding WN34S/WN34L discrimination