]> git.basschouten.com Git - openhab-addons.git/commitdiff
[wundergroundupdatereceiver] Add "Outdoor" to humidity (#12977)
authorDaniel Demus <daniel-github@demus.dk>
Tue, 21 Jun 2022 10:30:46 +0000 (12:30 +0200)
committerGitHub <noreply@github.com>
Tue, 21 Jun 2022 10:30:46 +0000 (12:30 +0200)
* [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>
bundles/org.openhab.binding.wundergroundupdatereceiver/README.md
bundles/org.openhab.binding.wundergroundupdatereceiver/src/main/java/org/openhab/binding/wundergroundupdatereceiver/internal/WundergroundUpdateReceiverBindingConstants.java
bundles/org.openhab.binding.wundergroundupdatereceiver/src/main/java/org/openhab/binding/wundergroundupdatereceiver/internal/WundergroundUpdateReceiverHandler.java
bundles/org.openhab.binding.wundergroundupdatereceiver/src/main/resources/OH-INF/binding/binding.xml
bundles/org.openhab.binding.wundergroundupdatereceiver/src/main/resources/OH-INF/i18n/wundergroundupdatereceiver.properties
bundles/org.openhab.binding.wundergroundupdatereceiver/src/main/resources/OH-INF/thing/channel-types.xml
bundles/org.openhab.binding.wundergroundupdatereceiver/src/main/resources/OH-INF/thing/thing-types.xml

index 1ff4297ff3c4e92adfc8220faf027d51ad4e5fee..d2ee15fe85bb03c61ce947a220c74bdf463e072f 100644 (file)
@@ -106,21 +106,21 @@ 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    | 
-| lowbatt           | system:low-battery           | Switch               | Low Battery                       | Low battery warning with possible values on (low battery) and off (battery ok)                      | Metadata    |
+| 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 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 | 
-| 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 |
+|  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 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 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:
 
index 471edeb95ca1c875295031ea2fc4e39b34503feb..2dd0e685b1827c6e47ee2afa54a5764d1c85f13c 100644 (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";
index a0d8ca45146a2a26370c6225cd117147bfda690d..82e828fe6b55d67d458c9a265c6590e4fe6d2685 100644 (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();
index b1c162a66435dbd72ccb1a42fa4190d566f2de40..578705b0548b51b4a44a16e81e3fcd1f74ee5f5a 100644 (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>
index 9c733d6c9917558f9e763a6b3d54e6de448179ff..2fae057492cadd475044e1ac019f6d5e27b24958 100644 (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
index 08ef9a745d6387d9eb5452efd1dad5bd14888db3..2797867b5cdef217dad4541d43daddbabb14a8e2 100644 (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>
 
        <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>
                        <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">
                        <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 -->
                        <tag>Measurement</tag>
                        <tag>Temperature</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.1f %unit%"/>
        </channel-type>
 
        <channel-type id="rain">
        <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">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.3f NM"/>
        </channel-type>
 
        <!-- Pollution Fields: -->
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
 
        <channel-type id="nitrogen-dioxide-measured" advanced="true">
                <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">
                <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">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
 
        <channel-type id="nitrogen-oxides" advanced="true">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
 
        <channel-type id="total-reactive-nitrogen" advanced="true">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
 
        <channel-type id="no3-ion" advanced="true">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.2f %unit%"/>
        </channel-type>
 
        <channel-type id="so4-ion" advanced="true">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.2f %unit%"/>
        </channel-type>
 
        <channel-type id="sulfur-dioxide" advanced="true">
                <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">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
 
        <channel-type id="carbon-monoxide" advanced="true">
                <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">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.0f %unit%"/>
        </channel-type>
 
        <channel-type id="elemental-carbon" advanced="true">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.2f %unit%"/>
        </channel-type>
 
        <channel-type id="organic-carbon" advanced="true">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.2f %unit%"/>
        </channel-type>
 
        <channel-type id="black-carbon" advanced="true">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.2f %unit%"/>
        </channel-type>
 
        <channel-type id="aethalometer" advanced="true">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.2f %unit%"/>
        </channel-type>
 
        <channel-type id="pm2_5-mass" advanced="true">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.2f %unit%"/>
        </channel-type>
 
        <channel-type id="pm10-mass" advanced="true">
                <tags>
                        <tag>Measurement</tag>
                </tags>
-               <state readOnly="true"/>
+               <state readOnly="true" pattern="%.2f %unit%"/>
        </channel-type>
 
        <channel-type id="ozone" advanced="true">
                <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>
        <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>
                <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>
 
                <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>
 
index aee394e4bbe081df2ed8f65c02282004252a6efe..1e86328afa2759556b36f23803711fd3d1f83abd 100644 (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.
                                ]]>