[wundergroundupdatereceiver] Add "Outdoor" to humidity (#12977)

* [wundergroundupdatereceiver] Add "Outdoor" to humidity
* [wundergroundupdatereceiver] Missing units in description and patterns
* [wundergroundupdatereceiver] Replace "weather station" with device
The request sender is not necessarily a weather station

Signed-off-by: Daniel Demus <daniel-github@demus.dk>
This commit is contained in:
Daniel Demus 2022-06-21 12:30:46 +02:00 committed by GitHub
parent 66b191c04e
commit 9d679ba555
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 63 additions and 62 deletions

View File

@ -107,20 +107,20 @@ Additionally there is a receipt timestamp and a trigger channel.
#### Metadata channel-types:
| Request parameter | Channel type id | Type | Label | Description | Group |
|-------------------|------------------------------|----------------------|-----------------------------------|-----------------------------------------------------------------------------------------------------|-------------|
| dateutc | dateutc | String | Last Updated | The date and time of the last update in UTC as submitted by the weather station. This can be 'now'. | Metadata |
| softwaretype | softwaretype | String | Software Type | A software type string from the weather station | Metadata |
| rtfreq | realtime-frequency | Number | Realtime Frequency | How often does the weather station submit measurements | Metadata |
|-------------------|------------------------------|----------------------|-----------------------------------|--------------------------------------------------------------------------------------------|-------------|
| dateutc | dateutc | String | Last Updated | The date and time of the last update in UTC as submitted by the device. This can be 'now'. | Metadata |
| softwaretype | softwaretype | String | Software Type | A software type string from the device | Metadata |
| rtfreq | realtime-frequency | Number | Realtime Frequency | How often does the device submit measurements | Metadata |
| lowbatt | system:low-battery | Switch | Low Battery | Low battery warning with possible values on (low battery) and off (battery ok) | Metadata |
#### Synthetic channel-types. These are programmatically added:
| Channel type id | Type | Channel type | Label | Description | Group |
|------------------------|----------------------|--------------|--------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| dateutc-datetime | dateutc-datetime | state | Last Updated as DateTime | The date and time of the last update in UTC as submitted by the weather station converted to a DateTime value. In case of 'now', the current time is used. | Metadata |
|------------------------|----------------------|--------------|--------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------|----------|
| dateutc-datetime | dateutc-datetime | state | Last Updated as DateTime | The date and time of the last update in UTC as submitted by the device converted to a DateTime value. In case of 'now', the current time is used. | Metadata |
| last-received-datetime | DateTime | state | Last Received | The date and time of the last update. | Metadata |
| last-query-state | String | state | The last query | The part of the last query after the first unurlencoded '?' | Metadata |
| last-query-trigger | String | trigger | The last query | The part of the last query after the first unurlencoded '?' | Metadata |
| last-query-state | String | state | The last query | The query part of the last request from the device | Metadata |
| last-query-trigger | String | trigger | The last query | The query part of the last request from the device | Metadata |
The trigger channel's payload is the last querystring, so the following dsl rule script would send the measurements on to wunderground.com:

View File

@ -72,7 +72,7 @@ public class WundergroundUpdateReceiverBindingConstants {
public static final String PRESSURE_GROUP = "pressure";
public static final String POLLUTION_GROUP = "pollution";
// Known or observed request paramters received from weather stations submitting to wunderground.com
// Known or observed request paramters received from devices submitting to wunderground.com
public static final String DATEUTC = "dateutc";
public static final String SOFTWARE_TYPE = "softwaretype";
public static final String LOW_BATTERY = "lowbatt";

View File

@ -166,10 +166,10 @@ public class WundergroundUpdateReceiverHandler extends BaseThingHandler {
private DateTimeType safeResolvUtcDateTime(String dateUtc) {
if (!dateUtc.isEmpty() && !NOW.equals(dateUtc)) {
try {
// Supposedly the format is "yyyy-MM-dd hh:mm:ss" from the weather station
// Supposedly the format is "yyyy-MM-dd hh:mm:ss" from the device
return new DateTimeType(ZonedDateTime.parse(dateUtc.replace(" ", "T") + "Z"));
} catch (Exception ex) {
logger.warn("The weather station is submitting unparsable datetime values: {}", dateUtc);
logger.warn("The device is submitting unparsable datetime values: {}", dateUtc);
}
}
return new DateTimeType();

View File

@ -5,7 +5,7 @@
<name>Wunderground Update Receiver Binding</name>
<description>
This binding enables acting as a receiver of updates from weather stations that post measurements to
This binding enables acting as a receiver of updates from devices that post measurements to
https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php.
</description>
</binding:binding>

View File

@ -1,7 +1,7 @@
# binding
binding.wundergroundupdatereceiver.name = Wunderground Update Receiver Binding
binding.wundergroundupdatereceiver.description = This binding enables acting as a receiver of updates from weather stations that post measurements to https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php.
binding.wundergroundupdatereceiver.description = This binding enables acting as a receiver of updates from devices that post measurements to https://rtupdate.wunderground.com/weatherstation/updateweatherstation.php.
# thing types
@ -45,24 +45,24 @@ channel-type.wundergroundupdatereceiver.carbon-monoxide.description = Carbon Mon
channel-type.wundergroundupdatereceiver.clouds.label = Cloud Cover
channel-type.wundergroundupdatereceiver.clouds.description = METAR style cloud cover.
channel-type.wundergroundupdatereceiver.dateutc-datetime.label = Last Updated as DateTime
channel-type.wundergroundupdatereceiver.dateutc-datetime.description = The date and time of the last update in UTC as submitted by the weather station converted to a DateTime value. In case of 'now', the current time is used.
channel-type.wundergroundupdatereceiver.dateutc-datetime.description = The date and time of the last update in UTC as submitted by the device converted to a DateTime value. In case of 'now', the current time is used.
channel-type.wundergroundupdatereceiver.dateutc-datetime.state.pattern = %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
channel-type.wundergroundupdatereceiver.dateutc.label = Last Updated
channel-type.wundergroundupdatereceiver.dateutc.description = The date and time of the last update in UTC as submitted by the weather station. This can be 'now'.
channel-type.wundergroundupdatereceiver.dateutc.description = The date and time of the last update in UTC as submitted by the device. This can be 'now'.
channel-type.wundergroundupdatereceiver.dew-point.label = Dew Point
channel-type.wundergroundupdatereceiver.dew-point.description = Outdoor dew point.
channel-type.wundergroundupdatereceiver.elemental-carbon.label = Elemental Carbon
channel-type.wundergroundupdatereceiver.elemental-carbon.description = Elemental Carbon, PM2.5 µG/m3.
channel-type.wundergroundupdatereceiver.humidity.label = Humidity
channel-type.wundergroundupdatereceiver.humidity.description = Humidity in %.
channel-type.wundergroundupdatereceiver.humidity.label = Outdoor Humidity
channel-type.wundergroundupdatereceiver.humidity.description = Outdoor humidity in %.
channel-type.wundergroundupdatereceiver.indoor-humidity.label = Indoor Humidity
channel-type.wundergroundupdatereceiver.indoor-humidity.description = Indoor humidity in %.
channel-type.wundergroundupdatereceiver.indoor-temperature.label = Indoor Temperature
channel-type.wundergroundupdatereceiver.indoor-temperature.description = Indoor temperature.
channel-type.wundergroundupdatereceiver.last-query-state.label = The last query
channel-type.wundergroundupdatereceiver.last-query-state.description = The part of the last query after the first unurlencoded '?'
channel-type.wundergroundupdatereceiver.last-query-state.description = The query part of the last request from the device
channel-type.wundergroundupdatereceiver.last-query-trigger.label = The last query
channel-type.wundergroundupdatereceiver.last-query-trigger.description = The part of the last query after the first unurlencoded '?'
channel-type.wundergroundupdatereceiver.last-query-trigger.description = The query part of the last request from the device
channel-type.wundergroundupdatereceiver.last-received-datetime.label = Last Received
channel-type.wundergroundupdatereceiver.last-received-datetime.description = The date and time of the last update.
channel-type.wundergroundupdatereceiver.last-received-datetime.state.pattern = %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
@ -101,17 +101,17 @@ channel-type.wundergroundupdatereceiver.rain-yearly.description = Rain since the
channel-type.wundergroundupdatereceiver.rain.label = Hourly Rain
channel-type.wundergroundupdatereceiver.rain.description = Rain over the past hour.
channel-type.wundergroundupdatereceiver.realtime-frequency.label = Realtime Frequency
channel-type.wundergroundupdatereceiver.realtime-frequency.description = How often does the weather station submit measurements
channel-type.wundergroundupdatereceiver.realtime-frequency.description = How often does the device submit measurements
channel-type.wundergroundupdatereceiver.so4-ion.label = SO4 ion
channel-type.wundergroundupdatereceiver.so4-ion.description = SO4 ion (sulfate, not adjusted for ammonium ion) µG/m3.
channel-type.wundergroundupdatereceiver.softwaretype.label = Software Type
channel-type.wundergroundupdatereceiver.softwaretype.description = A software type string from the weather station
channel-type.wundergroundupdatereceiver.softwaretype.description = A software type string from the device
channel-type.wundergroundupdatereceiver.soil-moisture.label = Soil Moisture
channel-type.wundergroundupdatereceiver.soil-moisture.description = Soil moisture in %.
channel-type.wundergroundupdatereceiver.soil-temperature.label = Soil Temperature
channel-type.wundergroundupdatereceiver.soil-temperature.description = Soil temperature.
channel-type.wundergroundupdatereceiver.solarradiation.label = Solar Radiation
channel-type.wundergroundupdatereceiver.solarradiation.description = Solar radiation
channel-type.wundergroundupdatereceiver.solarradiation.description = Solar radiation, W/m2
channel-type.wundergroundupdatereceiver.sulfur-dioxide-trace-levels.label = Sulfur Dioxide Trace Levels
channel-type.wundergroundupdatereceiver.sulfur-dioxide-trace-levels.description = Sulfur Dioxide, trace levels ppb.
channel-type.wundergroundupdatereceiver.sulfur-dioxide.label = Sulfur Dioxide
@ -121,7 +121,7 @@ channel-type.wundergroundupdatereceiver.total-reactive-nitrogen.description = To
channel-type.wundergroundupdatereceiver.uv.label = UV Index
channel-type.wundergroundupdatereceiver.uv.description = UV index.
channel-type.wundergroundupdatereceiver.visibility.label = Visibility
channel-type.wundergroundupdatereceiver.visibility.description = Visibility.
channel-type.wundergroundupdatereceiver.visibility.description = Visibility in nautical miles.
channel-type.wundergroundupdatereceiver.wind-chill.label = Wind Chill
channel-type.wundergroundupdatereceiver.wind-chill.description = The apparent wind chill temperature.
channel-type.wundergroundupdatereceiver.wind-direction-avg-2min.label = Wind Direction 2min Average

View File

@ -19,7 +19,7 @@
<channel-type id="dateutc" advanced="true">
<item-type>String</item-type>
<label>Last Updated</label>
<description>The date and time of the last update in UTC as submitted by the weather station. This can be 'now'.</description>
<description>The date and time of the last update in UTC as submitted by the device. This can be 'now'.</description>
<category>Time</category>
<tags>
<tag>Point</tag>
@ -30,8 +30,9 @@
<channel-type id="dateutc-datetime" advanced="true">
<item-type>DateTime</item-type>
<label>Last Updated as DateTime</label>
<description>The date and time of the last update in UTC as submitted by the weather station converted to a DateTime
value. In case of 'now', the current time is used.</description>
<description>The date and time of the last update in UTC as submitted by the device converted to a DateTime
value. In
case of 'now', the current time is used.</description>
<category>Time</category>
<tags>
<tag>Point</tag>
@ -126,8 +127,8 @@
<channel-type id="humidity">
<item-type>Number:Dimensionless</item-type>
<label>Humidity</label>
<description>Humidity in %.</description>
<label>Outdoor Humidity</label>
<description>Outdoor humidity in %.</description>
<category>Humidity</category>
<tags>
<tag>Measurement</tag>
@ -157,7 +158,7 @@
<tag>Measurement</tag>
<tag>Temperature</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="wind-chill" advanced="true">
@ -182,7 +183,7 @@
<tag>Measurement</tag>
<tag>Temperature</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<!-- for sensors 2,3,4 use soiltemp2f, soiltemp3f, and soiltemp4f -->
@ -195,7 +196,7 @@
<tag>Measurement</tag>
<tag>Temperature</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="rain">
@ -303,13 +304,13 @@
<channel-type id="solarradiation">
<item-type>Number:Intensity</item-type>
<label>Solar Radiation</label>
<description>Solar radiation</description>
<description>Solar radiation in W/m2.</description>
<category>Sun</category>
<tags>
<tag>Measurement</tag>
<tag>Light</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="uv">
@ -332,7 +333,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.3f NM"/>
</channel-type>
<!-- Pollution Fields: -->
@ -344,7 +345,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="nitrogen-dioxide-measured" advanced="true">
@ -355,7 +356,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="nitrogen-dioxide-nox-no" advanced="true">
@ -366,7 +367,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="nitrogen-dioxide-noy-no" advanced="true">
@ -377,7 +378,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="nitrogen-oxides" advanced="true">
@ -388,7 +389,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="total-reactive-nitrogen" advanced="true">
@ -399,7 +400,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="no3-ion" advanced="true">
@ -410,7 +411,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-type id="so4-ion" advanced="true">
@ -421,7 +422,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-type id="sulfur-dioxide" advanced="true">
@ -432,7 +433,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="sulfur-dioxide-trace-levels" advanced="true">
@ -443,7 +444,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="carbon-monoxide" advanced="true">
@ -454,7 +455,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="carbon-monoxide-trace-levels" advanced="true">
@ -465,7 +466,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="elemental-carbon" advanced="true">
@ -476,7 +477,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-type id="organic-carbon" advanced="true">
@ -487,7 +488,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-type id="black-carbon" advanced="true">
@ -498,7 +499,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-type id="aethalometer" advanced="true">
@ -509,7 +510,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-type id="pm2_5-mass" advanced="true">
@ -520,7 +521,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-type id="pm10-mass" advanced="true">
@ -531,7 +532,7 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.2f %unit%"/>
</channel-type>
<channel-type id="ozone" advanced="true">
@ -542,13 +543,13 @@
<tags>
<tag>Measurement</tag>
</tags>
<state readOnly="true"/>
<state readOnly="true" pattern="%.0f %unit%"/>
</channel-type>
<channel-type id="softwaretype" advanced="true">
<item-type>String</item-type>
<label>Software Type</label>
<description>A software type string from the weather station</description>
<description>A software type string from the device</description>
<category>Text</category>
<state readOnly="true"/>
</channel-type>
@ -556,7 +557,7 @@
<channel-type id="realtime-frequency" advanced="true">
<item-type>Number</item-type>
<label>Realtime Frequency</label>
<description>How often does the weather station submit measurements</description>
<description>How often does the device submit measurements</description>
<category>Number</category>
<state readOnly="true" pattern="%.0f"/>
</channel-type>
@ -565,7 +566,7 @@
<item-type>String</item-type>
<kind>state</kind>
<label>The last query</label>
<description>The part of the last query after the first unurlencoded '?'</description>
<description>The query part of the last request from the device</description>
<state readOnly="true"/>
</channel-type>
@ -573,7 +574,7 @@
<item-type>String</item-type>
<kind>trigger</kind>
<label>The last query</label>
<description>The part of the last query after the first unurlencoded '?'</description>
<description>The query part of the last request from the device</description>
<event/>
</channel-type>

View File

@ -28,7 +28,7 @@
The wunderground.com update api requires a station id, that is defined for the WeatherUnderground
account measurements are to be submitted to.<br />
<br />
In this binding it is used to identify a unique thing, so each weather-station or
In this binding it is used to identify a unique thing, so each device or
other apparatus submitting measurements can have a separate id, but if you don't intend to forward
the observations to wunderground.com, this value can be any non-blank string.
]]>