[darksky] Remove DarkSky binding due to EOL of their API (#13037)

* Remove DarkSky binding due to EOL of their API

Signed-off-by: Christoph Weitkamp <github@christophweitkamp.de>
This commit is contained in:
Christoph Weitkamp 2022-12-21 17:24:57 +01:00 committed by GitHub
parent 324483d8e9
commit 528140d7ad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
30 changed files with 0 additions and 4979 deletions

View File

@ -62,7 +62,6 @@
/bundles/org.openhab.binding.daikin/ @caffineehacker
/bundles/org.openhab.binding.dali/ @rs22
/bundles/org.openhab.binding.danfossairunit/ @pravussum
/bundles/org.openhab.binding.darksky/ @cweitkamp
/bundles/org.openhab.binding.dbquery/ @lujop
/bundles/org.openhab.binding.deconz/ @openhab/add-ons-maintainers
/bundles/org.openhab.binding.denonmarantz/ @jwveldhuis

View File

@ -301,11 +301,6 @@
<artifactId>org.openhab.binding.danfossairunit</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.darksky</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.dbquery</artifactId>

View File

@ -1,13 +0,0 @@
This content is produced and maintained by the openHAB project.
* Project home: https://www.openhab.org
== Declared Project Licenses
This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.
== Source Code
https://github.com/openhab/openhab-addons

View File

@ -1,368 +0,0 @@
# Dark Sky Binding
This binding integrates the [Dark Sky API](https://darksky.net/dev/docs).
::: tip Note
The Dark Sky API service for existing customers will continue until the end of 2022.
They do no longer accept new signups.
:::
## Supported Things
There are two supported things.
### Dark Sky Account
First one is a bridge `weather-api` which represents the Dark Sky account.
The bridge holds the mandatory API key to access the Dark Sky API and several global configuration parameters.
If your system language is supported by the Dark Sky API it will be used as default language for the requested data.
### Current Weather And Forecast
The second thing `weather-and-forecast` supports the [current weather](https://darksky.net/dev/docs#forecast-request), hour-by-hour forecast for the next 48 hours and day-by-day forecast for the next week for a specific location.
It requires coordinates of the location of your interest.
You can add as many `weather-and-forecast` things for different locations to your setup as you like to observe.
Severe [weather alerts](https://darksky.net/dev/docs/sources) are available in the USA, Canada, Iceland, European Union member nations, and Israel.
## Discovery
If a system location is set, a "Local Weather And Forecast" (`weather-and-forecast`) thing will be automatically discovered for this location.
Once the system location will be changed, the background discovery updates the configuration of "Local Weather And Forecast" accordingly.
## Thing Configuration
### Dark Sky Account
| Parameter | Description |
|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| apikey | API key to access the Dark Sky API. **Mandatory** |
| refreshInterval | Specifies the refresh interval (in minutes). Optional, the default value is 60, the minimum value is 1. Note: when using a free API key (1000 calls/day), do not use an interval less than 2. |
| language | Language to be used by the Dark Sky API. Optional, valid values are: `ar`, `az`, `be`, `bg`, `bn`, `bs`, `ca`, `cs`, `da`, `de`, `el`, `en`, `eo`, `es`, `et`, `fi`, `fr`, `he`, `hi`, `hr`, `hu`, `id`, `is`, `it`, `ja`, `ka`, `ko`, `kn`, `kw`, `lv`, `mr`, `nb`, `nl`, `no`, `pa`, `pl`, `pt`, `ro`, `ru`, `sk`, `sl`, `sr`, `sv`, `ta`, `te`, `tet`, `tr`, `uk`, `x-pig-latin`, `zh`, `zh-tw`. |
### Current Weather And Forecast
| Parameter | Description |
|----------------|-------------------------------------------------------------------------------------------------------------------------------|
| location | Location of weather in geographical coordinates (latitude/longitude/altitude). **Mandatory** |
| forecastHours | Number of hours for hourly forecast. Optional, the default value is 24 (min="0", max="48", step="1"). |
| forecastDays | Number of days for daily forecast (including todays forecast). Optional, the default value is 8 (min="0", max="8", step="1"). |
| numberOfAlerts | Number of alerts to be shown. Optional, the default value is 0 (min="0", step="1"). |
Once one of the parameters `forecastHours`, `forecastDays` or `numberOfAlerts` will be changed, the available channel groups on the thing will be created or removed accordingly.
## Channels
### Current Weather
| Channel Group ID | Channel ID | Item Type | Description |
|------------------|----------------------|----------------------|-------------------------------------------------------------------------|
| current | time-stamp | DateTime | Time of data observation. |
| current | condition | String | Current weather condition. |
| current | icon | Image | Icon representing the current weather condition. |
| current | icon-id | String | Id of the icon representing the current weather condition. **Advanced** |
| current | temperature | Number:Temperature | Current temperature. |
| current | apparent-temperature | Number:Temperature | Current apparent temperature. |
| current | pressure | Number:Pressure | Current barometric pressure. |
| current | humidity | Number:Dimensionless | Current atmospheric humidity. |
| current | wind-speed | Number:Speed | Current wind speed. |
| current | wind-direction | Number:Angle | Current wind direction. |
| current | gust-speed | Number:Speed | Current gust speed. **Advanced** |
| current | cloudiness | Number:Dimensionless | Current cloudiness. |
| current | visibility | Number:Length | Current visibility. |
| current | rain | Number:Speed | Current rain intensity. |
| current | snow | Number:Speed | Current snow intensity. |
| current | precip-intensity | Number:Speed | Current precipitation intensity. |
| current | precip-probability | Number:Dimensionless | Current precipitation probability. |
| current | precip-type | String | Current precipitation type (Rain, Snow or Sleet). |
| current | uvindex | Number | Current UV index. |
| current | ozone | Number:ArealDensity | Current ozone. |
### Hourly Forecast
| Channel Group ID | Channel ID | Item Type | Description |
|-------------------------------------------------------|----------------------|----------------------|------------------------------------------------------|
| forecastHours01, forecastHours02, ... forecastHours48 | time-stamp | DateTime | Time of data forecasted. |
| forecastHours01, forecastHours02, ... forecastHours48 | condition | String | Forecast weather condition. |
| forecastHours01, forecastHours02, ... forecastHours48 | icon | Image | Icon representing the forecasted weather condition. |
| forecastHours01, forecastHours02, ... forecastHours48 | icon-id | String | Id of the forecasted weather condition. **Advanced** |
| forecastHours01, forecastHours02, ... forecastHours48 | temperature | Number:Temperature | Forecasted temperature. |
| forecastHours01, forecastHours02, ... forecastHours48 | apparent-temperature | Number:Temperature | Forecasted apparent temperature. |
| forecastHours01, forecastHours02, ... forecastHours48 | pressure | Number:Pressure | Forecasted barometric pressure. |
| forecastHours01, forecastHours02, ... forecastHours48 | humidity | Number:Dimensionless | Forecasted atmospheric humidity. |
| forecastHours01, forecastHours02, ... forecastHours48 | wind-speed | Number:Speed | Forecasted wind speed. |
| forecastHours01, forecastHours02, ... forecastHours48 | wind-direction | Number:Angle | Forecasted wind direction. |
| forecastHours01, forecastHours02, ... forecastHours48 | gust-speed | Number:Speed | Forecasted gust speed. **Advanced** |
| forecastHours01, forecastHours02, ... forecastHours48 | cloudiness | Number:Dimensionless | Forecasted cloudiness. |
| forecastHours01, forecastHours02, ... forecastHours48 | visibility | Number:Length | Forecasted visibility. |
| forecastHours01, forecastHours02, ... forecastHours48 | rain | Number:Speed | Forecasted rain intensity. |
| forecastHours01, forecastHours02, ... forecastHours48 | snow | Number:Speed | Forecasted snow intensity. |
| forecastHours01, forecastHours02, ... forecastHours48 | precip-intensity | Number:Speed | Forecasted precipitation intensity. |
| forecastHours01, forecastHours02, ... forecastHours48 | precip-probability | Number:Dimensionless | Forecasted precipitation probability. |
| forecastHours01, forecastHours02, ... forecastHours48 | precip-type | String | Forecasted precipitation type (Rain, Snow or Sleet). |
| forecastHours01, forecastHours02, ... forecastHours48 | uvindex | Number | Forecasted UV index. |
| forecastHours01, forecastHours02, ... forecastHours48 | ozone | Number:ArealDensity | Forecasted ozone. |
### Daily Forecast
| Channel Group ID | Channel ID | Item Type | Description |
|-----------------------------------------------------------------|--------------------------|----------------------|------------------------------------------------------|
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | time-stamp | DateTime | Time of data forecasted. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | condition | String | Forecast weather condition. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | icon | Image | Icon representing the forecasted weather condition. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | icon-id | String | Id of the forecasted weather condition. **Advanced** |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | min-temperature | Number:Temperature | Minimum forecasted temperature of a day. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | max-temperature | Number:Temperature | Maximum forecasted temperature of a day. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | min-apparent-temperature | Number:Temperature | Minimum forecasted apparent temperature of a day. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | max-apparent-temperature | Number:Temperature | Maximum forecasted apparent temperature of a day. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | pressure | Number:Pressure | Forecasted barometric pressure. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | humidity | Number:Dimensionless | Forecasted atmospheric humidity. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | wind-speed | Number:Speed | Forecasted wind speed. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | wind-direction | Number:Angle | Forecasted wind direction. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | gust-speed | Number:Speed | Forecasted gust speed. **Advanced** |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | cloudiness | Number:Dimensionless | Forecasted cloudiness. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | visibility | Number:Length | Forecasted visibility. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | rain | Number:Speed | Forecasted rain intensity. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | snow | Number:Speed | Forecasted snow intensity. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | precip-intensity | Number:Speed | Forecasted precipitation intensity. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | precip-probability | Number:Dimensionless | Forecasted precipitation probability. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | precip-type | String | Forecasted precipitation type (Rain, Snow or Sleet). |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | uvindex | Number | Forecasted UV index. |
| forecastToday, forecastTomorrow, forecastDay2, ... forecastDay7 | ozone | Number:ArealDensity | Forecasted ozone. |
### Severe Weather Alerts
| Channel Group ID | Channel ID | Item Type | Description |
|-----------------------|-------------|-----------|----------------------------------------------------------------------------------------------|
| alerts1, alerts2, ... | title | String | A brief description of the alert. |
| alerts1, alerts2, ... | description | String | A detailed description of the alert. |
| alerts1, alerts2, ... | severity | String | The severity of the alert. |
| alerts1, alerts2, ... | issued | DateTime | The time at which the alert was issued. |
| alerts1, alerts2, ... | expires | DateTime | The time at which the alert will expire. |
| alerts1, alerts2, ... | uri | String | An external URI that one may refer to for detailed information about the alert. **Advanced** |
## Trigger Channels
### Current Weather
| Channel Group ID | Channel ID | Description |
|------------------|---------------|-----------------------------------------|
| current | sunrise-event | Event for sunrise. Can trigger `START`. |
| current | sunset-event | Event for sunset. Can trigger `START`. |
### Configuration
**Offset:** For each trigger channel you can optionally configure an `offset` in minutes.
The `offset` must be configured in the channel properties for the corresponding thing.
The minimum allowed `offset` is -1440 and the maximum allowed `offset` is 1440.
If an `offset` is set, the event is moved forward or backward accordingly.
**Earliest / Latest:** For each trigger channel you can optionally configure the `earliest` and `latest` time of the day.
If sunset is at 17:40 but `earliest` is set to 18:00, the event is moved to 18:00.
OR
If sunset at is 22:10 but `latest` is set to 21:00, the event is moved to 21:00.
## Full Example
### Things
demo.things
```java
Bridge darksky:weather-api:api "Dark Sky Account" [apikey="AAA", refreshInterval=30, language="de"] {
Thing weather-and-forecast local "Local Weather And Forecast" [location="XXX,YYY", forecastHours=0, forecastDays=8, numberOfAlerts=1] {
Channels:
Type sunset-event : current#sunset-event [
earliest="18:00",
latest="21:00"
]
}
Thing weather-and-forecast miami "Weather And Forecast In Miami" [location="25.782403,-80.264563", forecastHours=24, forecastDays=0]
}
```
### Items
demo.items
```java
DateTime localLastMeasurement "Timestamp of last measurement [%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tS]" <time> { channel="darksky:weather-and-forecast:api:local:current#time-stamp" }
String localCurrentCondition "Current condition [%s]" <sun_clouds> { channel="darksky:weather-and-forecast:api:local:current#condition" }
Image localCurrentConditionIcon "Icon" { channel="darksky:weather-and-forecast:api:local:current#icon" }
Number:Temperature localCurrentTemperature "Current temperature [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:local:current#temperature" }
Number:Temperature localCurrentApparentTemperature "Current apparent temperature [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:local:current#apparent-temperature" }
Number:Pressure localCurrentPressure "Current barometric pressure [%.1f %unit%]" <pressure> { channel="darksky:weather-and-forecast:api:local:current#pressure" }
Number:Dimensionless localCurrentHumidity "Current atmospheric humidity [%d %unit%]" <humidity> { channel="darksky:weather-and-forecast:api:local:current#humidity" }
Number:Speed localCurrentWindSpeed "Current wind speed [%.1f km/h]" <wind> { channel="darksky:weather-and-forecast:api:local:current#wind-speed" }
Number:Angle localCurrentWindDirection "Current wind direction [%d %unit%]" <wind> { channel="darksky:weather-and-forecast:api:local:current#wind-direction" }
Number:Dimensionless localCurrentCloudiness "Current cloudiness [%d %unit%]" <clouds> { channel="darksky:weather-and-forecast:api:local:current#cloudiness" }
Number:Length localCurrentVisibility "Current visibility [%.1f %unit%]" <none> { channel="darksky:weather-and-forecast:api:local:current#visibility" }
Number:Speed localCurrentRainIntensity "Current rain intensity [%.2f mm/h]" <rain> { channel="darksky:weather-and-forecast:api:local:current#rain" }
Number:Speed localCurrentSnowIntensity "Current snow intensity [%.2f mm/h]" <snow> { channel="darksky:weather-and-forecast:api:local:current#snow" }
Number:Speed localCurrentPrecipitationIntensity "Current precipitation intensity [%.2f mm/h]" <rain> { channel="darksky:weather-and-forecast:api:local:current#precip-intensity" }
Number:Dimensionless localCurrentPrecipitationProbability "Current precipitation probability [%d %unit%]" <rain> { channel="darksky:weather-and-forecast:api:local:current#precip-probability" }
String localCurrentPrecipitationType "Current precipitation type [%s]" <rain> { channel="darksky:weather-and-forecast:api:local:current#precip-type" }
Number localCurrentUVIndex "Current UV index [%d]" <none> { channel="darksky:weather-and-forecast:api:local:current#uvindex" }
Number:ArealDensity localCurrentOzone "Current ozone [%.1f %unit%]" <none> { channel="darksky:weather-and-forecast:api:local:current#ozone" }
DateTime localSunrise "Sunrise [%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tS]" <sun> { channel="darksky:weather-and-forecast:api:local:current#sunrise" }
DateTime localSunset "Sunset [%1$tY-%1$tm-%1$tdT%1$tH:%1$tM:%1$tS]" <sun> { channel="darksky:weather-and-forecast:api:local:current#sunset" }
DateTime localDailyForecastTodayTimestamp "Timestamp of forecast [%1$tY-%1$tm-%1$td]" <time> { channel="darksky:weather-and-forecast:api:local:forecastToday#time-stamp" }
String localDailyForecastTodayCondition "Condition for today [%s]" <sun_clouds> { channel="darksky:weather-and-forecast:api:local:forecastToday#condition" }
Image localDailyForecastTodayConditionIcon "Icon" { channel="darksky:weather-and-forecast:api:local:forecastToday#icon" }
Number:Temperature localDailyForecastTodayMinTemperature "Minimum temperature for today [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:local:forecastToday#min-temperature" }
Number:Temperature localDailyForecastTodayMaxTemperature "Maximum temperature for today [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:local:forecastToday#max-temperature" }
Number:Temperature localDailyForecastTodayMinApparentTemperature "Minimum apparent temperature for today [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:local:forecastToday#min-apparent-temperature" }
Number:Temperature localDailyForecastTodayMaxApparentTemperature "Maximum apparent temperature for today [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:local:forecastToday#max-apparent-temperature" }
Number:Pressure localDailyForecastTodayPressure "Barometric pressure for today [%.1f %unit%]" <pressure> { channel="darksky:weather-and-forecast:api:local:forecastToday#pressure" }
Number:Dimensionless localDailyForecastTodayHumidity "Atmospheric humidity for today [%d %unit%]" <humidity> { channel="darksky:weather-and-forecast:api:local:forecastToday#humidity" }
Number:Speed localDailyForecastTodayWindSpeed "Wind speed for today [%.1f km/h]" <wind> { channel="darksky:weather-and-forecast:api:local:forecastToday#wind-speed" }
Number:Angle localDailyForecastTodayWindDirection "Wind direction for today [%d %unit%]" <wind> { channel="darksky:weather-and-forecast:api:local:forecastToday#wind-direction" }
Number:Dimensionless localDailyForecastTodayCloudiness "Cloudiness for today [%d %unit%]" <clouds> { channel="darksky:weather-and-forecast:api:local:forecastToday#cloudiness" }
Number:Speed localDailyForecastTodayRainIntensity "Rain intensity for today [%.2f mm/h]" <rain> { channel="darksky:weather-and-forecast:api:local:forecastToday#rain" }
Number:Speed localDailyForecastTodaySnowIntensity "Snow intensity for today [%.2f mm/h]" <snow> { channel="darksky:weather-and-forecast:api:local:forecastToday#snow" }
DateTime localDailyForecastTomorrowTimestamp "Timestamp of forecast [%1$tY-%1$tm-%1$td]" <time> { channel="darksky:weather-and-forecast:api:local:forecastTomorrow#time-stamp" }
String localDailyForecastTomorrowCondition "Condition for tomorrow [%s]" <sun_clouds> { channel="darksky:weather-and-forecast:api:local:forecastTomorrow#condition" }
Image localDailyForecastTomorrowConditionIcon "Icon" { channel="darksky:weather-and-forecast:api:local:forecastTomorrow#icon" }
Number:Temperature localDailyForecastTomorrowMinTemperature "Minimum temperature for tomorrow [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:local:forecastTomorrow#min-temperature" }
Number:Temperature localDailyForecastTomorrowMaxTemperature "Maximum temperature for tomorrow [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:local:forecastTomorrow#max-temperature" }
...
DateTime localDailyForecastDay2Timestamp "Timestamp of forecast [%1$tY-%1$tm-%1$td]" <time> { channel="darksky:weather-and-forecast:api:local:forecastDay2#time-stamp" }
String localDailyForecastDay2Condition "Condition in 2 days [%s]" <sun_clouds> { channel="darksky:weather-and-forecast:api:local:forecastDay2#condition" }
Image localDailyForecastDay2ConditionIcon "Icon" { channel="darksky:weather-and-forecast:api:local:forecastDay2#icon" }
Number:Temperature localDailyForecastDay2MinTemperature "Minimum temperature in 2 days [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:local:forecastDay2#min-temperature" }
Number:Temperature localDailyForecastDay2MaxTemperature "Maximum temperature in 2 days [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:local:forecastDay2#max-temperature" }
...
String localAlert1Title "Weather warning! [%s]" <error> { channel="darksky:weather-and-forecast:api:local:alerts1#title" }
String localAlert1Description "Description [%s]" <error> { channel="darksky:weather-and-forecast:api:local:alerts1#description" }
String localAlert1Severity "Severity [%s]" <error> { channel="darksky:weather-and-forecast:api:local:alerts1#severity" }
DateTime localAlert1Issued "Issued [%1$tY-%1$tm-%1$tdT%1$tH:%1$tM]" <time> { channel="darksky:weather-and-forecast:api:local:alerts1#issued" }
DateTime localAlert1Expires "Expires [%1$tY-%1$tm-%1$tdT%1$tH:%1$tM]" <time> { channel="darksky:weather-and-forecast:api:local:alerts1#expires" }
String miamiCurrentCondition "Current condition in Miami [%s]" <sun_clouds> { channel="darksky:weather-and-forecast:api:miami:current#condition" }
Image miamiCurrentConditionIcon "Icon" { channel="darksky:weather-and-forecast:api:miami:current#icon" }
Number:Temperature miamiCurrentTemperature "Current temperature in Miami [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:miami:current#temperature" }
...
String miamiHourlyForecast01Condition "Condition in Miami for the next hour [%s]" <sun_clouds> { channel="darksky:weather-and-forecast:api:miami:forecastHours01#condition" }
Image miamiHourlyForecast01ConditionIcon "Icon" { channel="darksky:weather-and-forecast:api:miami:forecastHours01#icon" }
Number:Temperature miamiHourlyForecast01Temperature "Temperature in Miami for the next hour [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:miami:forecastHours01#temperature" }
...
String miamiHourlyForecast02Condition "Condition in Miami for hours 1 to 2 [%s]" <sun_clouds> { channel="darksky:weather-and-forecast:api:miami:forecastHours02#condition" }
Image miamiHourlyForecast02ConditionIcon "Icon" { channel="darksky:weather-and-forecast:api:miami:forecastHours02#icon" }
Number:Temperature miamiHourlyForecast02Temperature "Temperature in Miami for hours 1 to 2 [%.1f %unit%]" <temperature> { channel="darksky:weather-and-forecast:api:miami:forecastHours02#temperature" }
...
```
### Sitemap
demo.sitemap
```perl
sitemap demo label="Dark Sky" {
Frame label="Local Weather Station" {
Text item=localStationId
Text item=localStationName
Mapview item=localStationLocation
}
Frame label="Current local weather" {
Text item=localLastMeasurement
Text item=localCurrentCondition
Image item=localCurrentConditionIcon
Text item=localCurrentTemperature
Text item=localCurrentApparentTemperature
Text item=localCurrentPressure
Text item=localCurrentHumidity
Text item=localCurrentWindSpeed
Text item=localCurrentWindDirection
Text item=localCurrentCloudiness
Text item=localCurrentVisibility
Text item=localCurrentRainIntensity
Text item=localCurrentSnowIntensity
Text item=localCurrentPrecipitationIntensity
Text item=localCurrentPrecipitationProbability
Text item=localCurrentPrecipitationType
Text item=localCurrentUVIndex
Text item=localCurrentOzone
Text item=localSunrise
Text item=localSunset
}
Frame label="Local forecast for today" {
Text item=localDailyForecastTodayTimestamp
Text item=localDailyForecastTodayCondition
Image item=localDailyForecastTodayConditionIcon
Text item=localDailyForecastTodayMinTemperature
Text item=localDailyForecastTodayMaxTemperature
Text item=localDailyForecastTodayMinApparentTemperature
Text item=localDailyForecastTodayMaxApparentTemperature
Text item=localDailyForecastTodayPressure
Text item=localDailyForecastTodayHumidity
Text item=localDailyForecastTodayWindSpeed
Text item=localDailyForecastTodayWindDirection
Text item=localDailyForecastTodayCloudiness
Text item=localDailyForecastTodayRainIntensity
Text item=localDailyForecastTodaySnowIntensity
}
Frame label="Local forecast for tomorrow" {
Text item=localDailyForecastTomorrowTimestamp
Text item=localDailyForecastTomorrowCondition
Image item=localDailyForecastTomorrowConditionIcon
Text item=localDailyForecastTomorrowMinTemperature
Text item=localDailyForecastTomorrowMaxTemperature
...
}
Frame label="Local forecast in 2 days" {
Text item=localDailyForecastDay2Timestamp
Text item=localDailyForecastDay2Condition
Image item=localDailyForecastDay2ConditionIcon
Text item=localDailyForecastDay2MinTemperature
Text item=localDailyForecastDay2MaxTemperature
...
}
Frame label="Severe weather alerts" {
Text item=localAlert1Title
Text item=localAlert1Description
Text item=localAlert1Severity
Text item=localAlert1Issued
Text item=localAlert1Expires
}
Frame label="Current weather in Miami" {
Text item=miamiCurrentCondition
Image item=miamiCurrentConditionIcon
Text item=miamiCurrentTemperature
...
}
Frame label="Forecast in Miami for the next hour" {
Text item=miamiHourlyForecast01Condition
Image item=miamiHourlyForecast01ConditionIcon
Text item=miamiHourlyForecast01Temperature
...
}
Frame label="Forecast weather in Miami for the hours 1 to 2" {
Text item=miamiHourlyForecast02Condition
Image item=miamiHourlyForecast02ConditionIcon
Text item=miamiHourlyForecast02Temperature
...
}
}
```
### Events
```php
rule "example trigger rule"
when
Channel "darksky:weather-and-forecast:api:local:current#sunrise-event" triggered START or
Channel "darksky:weather-and-forecast:api:local:current#sunset-event" triggered START
then
...
end
```
[![Powered by Dark Sky](https://darksky.net/dev/img/attribution/poweredby-oneline.png)](https://darksky.net/poweredby/)

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>4.0.0-SNAPSHOT</version>
</parent>
<artifactId>org.openhab.binding.darksky</artifactId>
<name>openHAB Add-ons :: Bundles :: Dark Sky Binding</name>
</project>

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.darksky-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>
<feature name="openhab-binding-darksky" description="Dark Sky Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.darksky/${project.version}</bundle>
</feature>
</features>

View File

@ -1,95 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.core.thing.ThingTypeUID;
import org.openhab.core.thing.type.ChannelGroupTypeUID;
/**
* The {@link DarkSkyBindingConstants} class defines common constants, which are used across the whole binding.
*
* @author Christoph Weitkamp - Initial contribution
*/
@NonNullByDefault
public class DarkSkyBindingConstants {
public static final String BINDING_ID = "darksky";
public static final String API = "api";
public static final String LOCAL = "local";
// Bridge
public static final ThingTypeUID THING_TYPE_WEATHER_API = new ThingTypeUID(BINDING_ID, "weather-api");
// Thing
public static final ThingTypeUID THING_TYPE_WEATHER_AND_FORECAST = new ThingTypeUID(BINDING_ID,
"weather-and-forecast");
// List of all properties
public static final String CONFIG_API_KEY = "apikey";
public static final String CONFIG_LANGUAGE = "language";
public static final String CONFIG_LOCATION = "location";
// Channel group types
public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_HOURLY_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
"hourlyForecast");
public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_DAILY_FORECAST = new ChannelGroupTypeUID(BINDING_ID,
"dailyForecast");
public static final ChannelGroupTypeUID CHANNEL_GROUP_TYPE_ALERTS = new ChannelGroupTypeUID(BINDING_ID, "alerts");
// List of all channel groups
public static final String CHANNEL_GROUP_CURRENT_WEATHER = "current";
public static final String CHANNEL_GROUP_FORECAST_TODAY = "forecastToday";
public static final String CHANNEL_GROUP_FORECAST_TOMORROW = "forecastTomorrow";
public static final String CHANNEL_GROUP_ALERTS = "alerts";
// List of all channels
public static final String CHANNEL_TIME_STAMP = "time-stamp";
public static final String CHANNEL_CONDITION = "condition";
public static final String CHANNEL_CONDITION_ICON = "icon";
public static final String CHANNEL_CONDITION_ICON_ID = "icon-id";
public static final String CHANNEL_TEMPERATURE = "temperature";
public static final String CHANNEL_MIN_TEMPERATURE = "min-temperature";
public static final String CHANNEL_MAX_TEMPERATURE = "max-temperature";
public static final String CHANNEL_APPARENT_TEMPERATURE = "apparent-temperature";
public static final String CHANNEL_MIN_APPARENT_TEMPERATURE = "min-apparent-temperature";
public static final String CHANNEL_MAX_APPARENT_TEMPERATURE = "max-apparent-temperature";
public static final String CHANNEL_PRESSURE = "pressure";
public static final String CHANNEL_HUMIDITY = "humidity";
public static final String CHANNEL_WIND_SPEED = "wind-speed";
public static final String CHANNEL_WIND_DIRECTION = "wind-direction";
public static final String CHANNEL_GUST_SPEED = "gust-speed";
public static final String CHANNEL_CLOUDINESS = "cloudiness";
public static final String CHANNEL_VISIBILITY = "visibility";
public static final String CHANNEL_RAIN = "rain";
public static final String CHANNEL_SNOW = "snow";
public static final String CHANNEL_PRECIPITATION_INTENSITY = "precip-intensity";
public static final String CHANNEL_PRECIPITATION_PROBABILITY = "precip-probability";
public static final String CHANNEL_PRECIPITATION_TYPE = "precip-type";
public static final String CHANNEL_UVINDEX = "uvindex";
public static final String CHANNEL_OZONE = "ozone";
public static final String CHANNEL_SUNRISE = "sunrise";
public static final String CHANNEL_SUNSET = "sunset";
public static final String CHANNEL_ALERT_TITLE = "title";
public static final String CHANNEL_ALERT_ISSUED = "issued";
public static final String CHANNEL_ALERT_EXPIRES = "expires";
public static final String CHANNEL_ALERT_DESCRIPTION = "description";
public static final String CHANNEL_ALERT_SEVERITY = "severity";
public static final String CHANNEL_ALERT_URI = "uri";
public static final String TRIGGER_SUNRISE = CHANNEL_GROUP_CURRENT_WEATHER + "#sunrise-event";
public static final String TRIGGER_SUNSET = CHANNEL_GROUP_CURRENT_WEATHER + "#sunset-event";
public static final String EVENT_START = "START";
}

View File

@ -1,41 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.config;
import java.util.Collections;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.darksky.internal.handler.DarkSkyAPIHandler;
/**
* The {@link DarkSkyAPIConfiguration} is the class used to match the {@link DarkSkyAPIHandler}s configuration.
*
* @author Christoph Weitkamp - Initial contribution
*/
@NonNullByDefault
public class DarkSkyAPIConfiguration {
// supported languages (see https://darksky.net/dev/docs#forecast-request)
public static final Set<String> SUPPORTED_LANGUAGES = Collections.unmodifiableSet(Stream.of("ar", "az", "be", "bg",
"bn", "bs", "ca", "cs", "da", "de", "el", "en", "eo", "es", "et", "fi", "fr", "he", "hi", "hr", "hu", "id",
"is", "it", "ja", "ka", "kn", "ko", "kw", "lv", "mr", "nb", "nl", "no", "pa", "pl", "pt", "ro", "ru", "sk",
"sl", "sr", "sv", "ta", "te", "tet", "tr", "uk", "x-pig-latin", "zh", "zh-tw").collect(Collectors.toSet()));
public @Nullable String apikey;
public int refreshInterval = 60;
public @Nullable String language;
}

View File

@ -1,103 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.config;
import java.time.Duration;
import java.util.regex.Pattern;
import java.util.regex.PatternSyntaxException;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The {@link DarkSkyChannelConfiguration} is the class used to match the sunrise and sunset event configuration.
*
* @author Christoph Weitkamp - Initial contribution
*/
@NonNullByDefault
public class DarkSkyChannelConfiguration {
private final Logger logger = LoggerFactory.getLogger(DarkSkyChannelConfiguration.class);
private static final Pattern HHMM_PATTERN = Pattern.compile("^([0-1][0-9]|2[0-3])(:[0-5][0-9])$");
private static final String TIME_SEPARATOR = ":";
private int offset;
private @Nullable String earliest;
private @Nullable String latest;
public int getOffset() {
return offset;
}
public void setOffset(int offset) {
this.offset = offset;
}
public @Nullable String getEarliest() {
return earliest;
}
public long getEarliestInMinutes() {
return getMinutesFromTime(earliest);
}
public void setEarliest(String earliest) {
this.earliest = earliest;
}
public @Nullable String getLatest() {
return latest;
}
public long getLatestInMinutes() {
return getMinutesFromTime(latest);
}
public void setLatest(String latest) {
this.latest = latest;
}
@Override
public String toString() {
return String.format("[offset=%d, earliest='%s', latest='%s']", offset, earliest, latest);
}
/**
* Parses a hh:mm string and returns the minutes.
*/
private long getMinutesFromTime(@Nullable String configTime) {
String time = configTime;
if (time != null && !(time = time.trim()).isEmpty()) {
try {
if (!HHMM_PATTERN.matcher(time).matches()) {
throw new NumberFormatException();
} else {
String[] splittedConfigTime = time.split(TIME_SEPARATOR);
if (splittedConfigTime.length < 2) {
throw new NumberFormatException();
}
int hour = Integer.parseInt(splittedConfigTime[0]);
int minutes = Integer.parseInt(splittedConfigTime[1]);
return Duration.ofMinutes(minutes).plusHours(hour).toMinutes();
}
} catch (PatternSyntaxException | NumberFormatException | ArithmeticException ex) {
logger.warn("Cannot parse channel configuration '{}' to hour and minutes, use pattern hh:mm, ignoring!",
time);
}
}
return 0;
}
}

View File

@ -1,30 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.config;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.openhab.binding.darksky.internal.handler.DarkSkyWeatherAndForecastHandler;
/**
* The {@link DarkSkyWeatherAndForecastConfiguration} is the class used to match the
* {@link DarkSkyWeatherAndForecastHandler}s configuration.
*
* @author Christoph Weitkamp - Initial contribution
*/
@NonNullByDefault
public class DarkSkyWeatherAndForecastConfiguration {
public @NonNullByDefault({}) String location;
public int forecastHours;
public int forecastDays;
public int numberOfAlerts;
}

View File

@ -1,62 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.connection;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
/**
* The {@link DarkSkyCommunicationException} is a communication exception for the connections to Dark Sky API.
*
* @author Christoph Weitkamp - Initial contribution
*/
@NonNullByDefault
public class DarkSkyCommunicationException extends RuntimeException {
private static final long serialVersionUID = 1L;
/**
* Constructs a new exception with null as its detail message.
*/
public DarkSkyCommunicationException() {
super();
}
/**
* Constructs a new exception with the specified detail message.
*
* @param message Detail message
*/
public DarkSkyCommunicationException(@Nullable String message) {
super(message);
}
/**
* Constructs a new exception with the specified cause.
*
* @param cause The cause
*/
public DarkSkyCommunicationException(@Nullable Throwable cause) {
super(cause);
}
/**
* Constructs a new exception with the specified detail message and cause.
*
* @param message Detail message
* @param cause The cause
*/
public DarkSkyCommunicationException(@Nullable String message, @Nullable Throwable cause) {
super(message, cause);
}
}

View File

@ -1,62 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.connection;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
/**
* The {@link DarkSkyConfigurationException} is a configuration exception for the connections to Dark Sky API.
*
* @author Christoph Weitkamp - Initial contribution
*/
@NonNullByDefault
public class DarkSkyConfigurationException extends IllegalArgumentException {
private static final long serialVersionUID = 1L;
/**
* Constructs a new exception with null as its detail message.
*/
public DarkSkyConfigurationException() {
super();
}
/**
* Constructs a new exception with the specified detail message.
*
* @param message Detail message
*/
public DarkSkyConfigurationException(@Nullable String message) {
super(message);
}
/**
* Constructs a new exception with the specified cause.
*
* @param cause The cause
*/
public DarkSkyConfigurationException(@Nullable Throwable cause) {
super(cause);
}
/**
* Constructs a new exception with the specified detail message and cause.
*
* @param message Detail message
* @param cause The cause
*/
public DarkSkyConfigurationException(@Nullable String message, @Nullable Throwable cause) {
super(message, cause);
}
}

View File

@ -1,227 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.connection;
import static java.util.stream.Collectors.joining;
import static org.eclipse.jetty.http.HttpMethod.GET;
import static org.eclipse.jetty.http.HttpStatus.*;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.nio.charset.StandardCharsets;
import java.util.HashMap;
import java.util.Locale;
import java.util.Map;
import java.util.concurrent.ExecutionException;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jetty.client.HttpClient;
import org.eclipse.jetty.client.HttpResponseException;
import org.eclipse.jetty.client.api.ContentResponse;
import org.openhab.binding.darksky.internal.config.DarkSkyAPIConfiguration;
import org.openhab.binding.darksky.internal.handler.DarkSkyAPIHandler;
import org.openhab.binding.darksky.internal.model.DarkSkyJsonWeatherData;
import org.openhab.core.cache.ByteArrayFileCache;
import org.openhab.core.cache.ExpiringCacheMap;
import org.openhab.core.io.net.http.HttpUtil;
import org.openhab.core.library.types.PointType;
import org.openhab.core.library.types.RawType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.Gson;
import com.google.gson.JsonSyntaxException;
/**
* The {@link DarkSkyConnection} is responsible for handling the connections to Dark Sky API.
*
* @author Christoph Weitkamp - Initial contribution
*/
@NonNullByDefault
public class DarkSkyConnection {
private final Logger logger = LoggerFactory.getLogger(DarkSkyConnection.class);
private static final String PNG_CONTENT_TYPE = "image/png";
private static final String PARAM_EXCLUDE = "exclude";
private static final String PARAM_UNITS = "units";
private static final String PARAM_LANG = "lang";
// Current weather data (see https://darksky.net/dev/docs#forecast-request)
private static final String WEATHER_URL = "https://api.darksky.net/forecast/%s/%f,%f";
// Weather icons (see https://darksky.net/dev/docs/faq#icons)
private static final String ICON_URL = "https://darksky.net/images/weather-icons/%s.png";
private final DarkSkyAPIHandler handler;
private final HttpClient httpClient;
private static final ByteArrayFileCache IMAGE_CACHE = new ByteArrayFileCache("org.openhab.binding.darksky");
private final ExpiringCacheMap<String, String> cache;
private final Gson gson = new Gson();
public DarkSkyConnection(DarkSkyAPIHandler handler, HttpClient httpClient) {
this.handler = handler;
this.httpClient = httpClient;
DarkSkyAPIConfiguration config = handler.getDarkSkyAPIConfig();
cache = new ExpiringCacheMap<>(TimeUnit.MINUTES.toMillis(config.refreshInterval));
}
/**
* Requests the current weather data for the given location (see https://darksky.net/dev/docs#forecast-request).
*
* @param location location represented as {@link PointType}
* @return the current weather data
* @throws JsonSyntaxException
* @throws DarkSkyCommunicationException
* @throws DarkSkyConfigurationException
*/
public synchronized @Nullable DarkSkyJsonWeatherData getWeatherData(@Nullable PointType location)
throws JsonSyntaxException, DarkSkyCommunicationException, DarkSkyConfigurationException {
if (location == null) {
throw new DarkSkyConfigurationException("@text/offline.conf-error-missing-location");
}
DarkSkyAPIConfiguration config = handler.getDarkSkyAPIConfig();
String apikey = config.apikey;
if (apikey == null || (apikey = apikey.trim()).isEmpty()) {
throw new DarkSkyConfigurationException("@text/offline.conf-error-missing-apikey");
}
String url = String.format(Locale.ROOT, WEATHER_URL, apikey, location.getLatitude().doubleValue(),
location.getLongitude().doubleValue());
return gson.fromJson(getResponseFromCache(buildURL(url, getRequestParams(config))),
DarkSkyJsonWeatherData.class);
}
/**
* Downloads the icon for the given icon id (see https://darksky.net/dev/docs/faq#icons).
*
* @param iconId the id of the icon
* @return the weather icon as {@link RawType}
*/
public static @Nullable RawType getWeatherIcon(String iconId) {
if (iconId.isEmpty()) {
throw new IllegalArgumentException("Cannot download weather icon as icon id is null.");
}
return downloadWeatherIconFromCache(String.format(ICON_URL, iconId));
}
private static @Nullable RawType downloadWeatherIconFromCache(String url) {
if (IMAGE_CACHE.containsKey(url)) {
try {
return new RawType(IMAGE_CACHE.get(url), PNG_CONTENT_TYPE);
} catch (IOException e) {
LoggerFactory.getLogger(DarkSkyConnection.class).trace("Failed to download the content of URL '{}'",
url, e);
}
} else {
RawType image = downloadWeatherIcon(url);
if (image != null) {
IMAGE_CACHE.put(url, image.getBytes());
return image;
}
}
return null;
}
private static @Nullable RawType downloadWeatherIcon(String url) {
return HttpUtil.downloadImage(url);
}
private Map<String, String> getRequestParams(DarkSkyAPIConfiguration config) {
Map<String, String> params = new HashMap<>();
params.put(PARAM_EXCLUDE, "minutely,flags");
// params.put(PARAM_EXTEND, "hourly");
params.put(PARAM_UNITS, "si");
String language = config.language;
if (language != null && !(language = language.trim()).isEmpty()) {
params.put(PARAM_LANG, language.toLowerCase());
}
return params;
}
private String buildURL(String url, Map<String, String> requestParams) {
return requestParams.entrySet().stream().map(e -> e.getKey() + "=" + encodeParam(e.getValue()))
.collect(joining("&", url + "?", ""));
}
private String encodeParam(String value) {
try {
return URLEncoder.encode(value, StandardCharsets.UTF_8.name());
} catch (UnsupportedEncodingException e) {
logger.debug("UnsupportedEncodingException occurred during execution: {}", e.getLocalizedMessage(), e);
return "";
}
}
private @Nullable String getResponseFromCache(String url) {
return cache.putIfAbsentAndGet(url, () -> getResponse(url));
}
private String getResponse(String url) {
try {
if (logger.isTraceEnabled()) {
logger.trace("Dark Sky request: URL = '{}'", uglifyApikey(url));
}
ContentResponse contentResponse = httpClient.newRequest(url).method(GET).timeout(10, TimeUnit.SECONDS)
.send();
int httpStatus = contentResponse.getStatus();
String content = contentResponse.getContentAsString();
logger.trace("Dark Sky response: status = {}, content = '{}'", httpStatus, content);
switch (httpStatus) {
case OK_200:
return content;
case BAD_REQUEST_400:
case UNAUTHORIZED_401:
case NOT_FOUND_404:
logger.debug("Dark Sky server responded with status code {}: {}", httpStatus, content);
throw new DarkSkyConfigurationException(content);
default:
logger.debug("Dark Sky server responded with status code {}: {}", httpStatus, content);
throw new DarkSkyCommunicationException(content);
}
} catch (ExecutionException e) {
String errorMessage = e.getLocalizedMessage();
logger.trace("Exception occurred during execution: {}", errorMessage, e);
if (e.getCause() instanceof HttpResponseException) {
logger.debug("Dark Sky server responded with status code {}: Invalid API key.", UNAUTHORIZED_401);
throw new DarkSkyConfigurationException("@text/offline.conf-error-invalid-apikey", e.getCause());
} else {
throw new DarkSkyCommunicationException(errorMessage, e.getCause());
}
} catch (TimeoutException e) {
logger.debug("Exception occurred during execution: {}", e.getLocalizedMessage(), e);
throw new DarkSkyCommunicationException(e.getLocalizedMessage(), e.getCause());
} catch (InterruptedException e) {
logger.debug("Execution interrupted: {}", e.getLocalizedMessage(), e);
Thread.currentThread().interrupt();
throw new DarkSkyCommunicationException(e.getLocalizedMessage(), e.getCause());
}
}
private String uglifyApikey(String url) {
return url.replaceAll("(appid=)+\\w+", "appid=*****");
}
}

View File

@ -1,136 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.discovery;
import static org.openhab.binding.darksky.internal.DarkSkyBindingConstants.*;
import java.util.Date;
import java.util.Map;
import java.util.Objects;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.darksky.internal.handler.DarkSkyAPIHandler;
import org.openhab.binding.darksky.internal.handler.DarkSkyWeatherAndForecastHandler;
import org.openhab.core.config.discovery.AbstractDiscoveryService;
import org.openhab.core.config.discovery.DiscoveryResultBuilder;
import org.openhab.core.i18n.LocaleProvider;
import org.openhab.core.i18n.LocationProvider;
import org.openhab.core.i18n.TranslationProvider;
import org.openhab.core.library.types.PointType;
import org.openhab.core.thing.ThingUID;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The {@link DarkSkyDiscoveryService} creates things based on the configured location.
*
* @author Christoph Weitkamp - Initial Contribution
*/
@NonNullByDefault
public class DarkSkyDiscoveryService extends AbstractDiscoveryService {
private final Logger logger = LoggerFactory.getLogger(DarkSkyDiscoveryService.class);
private static final int DISCOVERY_TIMEOUT_SECONDS = 2;
private static final int DISCOVERY_INTERVAL_SECONDS = 60;
private @Nullable ScheduledFuture<?> discoveryJob;
private final LocationProvider locationProvider;
private @Nullable PointType previousLocation;
private final DarkSkyAPIHandler bridgeHandler;
/**
* Creates a DarkSkyLocationDiscoveryService.
*/
public DarkSkyDiscoveryService(DarkSkyAPIHandler bridgeHandler, LocationProvider locationProvider,
LocaleProvider localeProvider, TranslationProvider i18nProvider) {
super(DarkSkyWeatherAndForecastHandler.SUPPORTED_THING_TYPES, DISCOVERY_TIMEOUT_SECONDS);
this.bridgeHandler = bridgeHandler;
this.locationProvider = locationProvider;
this.localeProvider = localeProvider;
this.i18nProvider = i18nProvider;
activate(null);
}
@Override
protected void activate(@Nullable Map<String, Object> configProperties) {
super.activate(configProperties);
}
@Override
public void deactivate() {
removeOlderResults(new Date().getTime(), bridgeHandler.getThing().getUID());
super.deactivate();
}
@Override
protected void startScan() {
logger.debug("Start manual Dark Sky Location discovery scan.");
scanForNewLocation();
}
@Override
protected synchronized void stopScan() {
logger.debug("Stop manual Dark Sky Location discovery scan.");
super.stopScan();
}
@Override
protected void startBackgroundDiscovery() {
if (discoveryJob == null || discoveryJob.isCancelled()) {
logger.debug("Start Dark Sky Location background discovery job at interval {} s.",
DISCOVERY_INTERVAL_SECONDS);
discoveryJob = scheduler.scheduleWithFixedDelay(this::scanForNewLocation, 0, DISCOVERY_INTERVAL_SECONDS,
TimeUnit.SECONDS);
}
}
@Override
protected void stopBackgroundDiscovery() {
if (discoveryJob != null && !discoveryJob.isCancelled()) {
logger.debug("Stop Dark Sky Location background discovery job.");
if (discoveryJob.cancel(true)) {
discoveryJob = null;
}
}
}
private void scanForNewLocation() {
PointType currentLocation = locationProvider.getLocation();
if (currentLocation == null) {
logger.debug("Location is not set -> Will not provide any discovery results.");
} else if (!Objects.equals(currentLocation, previousLocation)) {
logger.debug("Location has been changed from {} to {} -> Creating new discovery results.", previousLocation,
currentLocation);
createResults(currentLocation);
previousLocation = currentLocation;
} else {
createResults(currentLocation);
}
}
private void createResults(PointType location) {
String locationString = location.toFullString();
ThingUID bridgeUID = bridgeHandler.getThing().getUID();
createWeatherAndForecastResult(locationString, bridgeUID);
}
private void createWeatherAndForecastResult(String location, ThingUID bridgeUID) {
thingDiscovered(DiscoveryResultBuilder.create(new ThingUID(THING_TYPE_WEATHER_AND_FORECAST, bridgeUID, LOCAL))
.withLabel("Local weather and forecast").withProperty(CONFIG_LOCATION, location)
.withRepresentationProperty(CONFIG_LOCATION).withBridge(bridgeUID).build());
}
}

View File

@ -1,118 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.factory;
import static org.openhab.binding.darksky.internal.DarkSkyBindingConstants.*;
import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Map;
import java.util.Set;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jetty.client.HttpClient;
import org.openhab.binding.darksky.internal.discovery.DarkSkyDiscoveryService;
import org.openhab.binding.darksky.internal.handler.DarkSkyAPIHandler;
import org.openhab.binding.darksky.internal.handler.DarkSkyWeatherAndForecastHandler;
import org.openhab.core.config.discovery.DiscoveryService;
import org.openhab.core.i18n.LocaleProvider;
import org.openhab.core.i18n.LocationProvider;
import org.openhab.core.i18n.TranslationProvider;
import org.openhab.core.io.net.http.HttpClientFactory;
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingTypeUID;
import org.openhab.core.thing.ThingUID;
import org.openhab.core.thing.binding.BaseThingHandlerFactory;
import org.openhab.core.thing.binding.ThingHandler;
import org.openhab.core.thing.binding.ThingHandlerFactory;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
/**
* The {@link DarkSkyHandlerFactory} is responsible for creating things and thing handlers.
*
* @author Christoph Weitkamp - Initial contribution
*/
@NonNullByDefault
@Component(service = ThingHandlerFactory.class, configurationPid = "binding.darksky")
public class DarkSkyHandlerFactory extends BaseThingHandlerFactory {
private static final Set<ThingTypeUID> SUPPORTED_THING_TYPES_UIDS = Collections
.unmodifiableSet(Stream
.concat(DarkSkyAPIHandler.SUPPORTED_THING_TYPES.stream(),
DarkSkyWeatherAndForecastHandler.SUPPORTED_THING_TYPES.stream())
.collect(Collectors.toSet()));
private final Map<ThingUID, ServiceRegistration<?>> discoveryServiceRegs = new HashMap<>();
private final HttpClient httpClient;
private final LocaleProvider localeProvider;
private final LocationProvider locationProvider;
private final TranslationProvider i18nProvider;
@Activate
public DarkSkyHandlerFactory(final @Reference HttpClientFactory httpClientFactory,
final @Reference LocaleProvider localeProvider, final @Reference LocationProvider locationProvider,
final @Reference TranslationProvider i18nProvider) {
this.httpClient = httpClientFactory.getCommonHttpClient();
this.localeProvider = localeProvider;
this.locationProvider = locationProvider;
this.i18nProvider = i18nProvider;
}
@Override
public boolean supportsThingType(ThingTypeUID thingTypeUID) {
return SUPPORTED_THING_TYPES_UIDS.contains(thingTypeUID);
}
@Override
protected @Nullable ThingHandler createHandler(Thing thing) {
ThingTypeUID thingTypeUID = thing.getThingTypeUID();
if (THING_TYPE_WEATHER_API.equals(thingTypeUID)) {
DarkSkyAPIHandler handler = new DarkSkyAPIHandler((Bridge) thing, httpClient, localeProvider);
// register discovery service
DarkSkyDiscoveryService discoveryService = new DarkSkyDiscoveryService(handler, locationProvider,
localeProvider, i18nProvider);
discoveryServiceRegs.put(handler.getThing().getUID(), bundleContext
.registerService(DiscoveryService.class.getName(), discoveryService, new Hashtable<>()));
return handler;
} else if (THING_TYPE_WEATHER_AND_FORECAST.equals(thingTypeUID)) {
return new DarkSkyWeatherAndForecastHandler(thing);
}
return null;
}
@Override
protected synchronized void removeHandler(ThingHandler thingHandler) {
if (thingHandler instanceof DarkSkyAPIHandler) {
ServiceRegistration<?> serviceReg = discoveryServiceRegs.remove(thingHandler.getThing().getUID());
if (serviceReg != null) {
// remove discovery service, if bridge handler is removed
DarkSkyDiscoveryService discoveryService = (DarkSkyDiscoveryService) bundleContext
.getService(serviceReg.getReference());
serviceReg.unregister();
if (discoveryService != null) {
discoveryService.deactivate();
}
}
}
}
}

View File

@ -1,187 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.handler;
import static org.openhab.binding.darksky.internal.DarkSkyBindingConstants.*;
import java.util.Collections;
import java.util.Set;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.eclipse.jetty.client.HttpClient;
import org.openhab.binding.darksky.internal.config.DarkSkyAPIConfiguration;
import org.openhab.binding.darksky.internal.connection.DarkSkyConnection;
import org.openhab.core.config.core.Configuration;
import org.openhab.core.i18n.LocaleProvider;
import org.openhab.core.thing.Bridge;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingStatus;
import org.openhab.core.thing.ThingStatusDetail;
import org.openhab.core.thing.ThingTypeUID;
import org.openhab.core.thing.binding.BaseBridgeHandler;
import org.openhab.core.thing.binding.ThingHandler;
import org.openhab.core.types.Command;
import org.openhab.core.types.RefreshType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* The {@link DarkSkyAPIHandler} is responsible for accessing the Dark Sky API.
*
* @author Christoph Weitkamp - Initial contribution
*/
@NonNullByDefault
public class DarkSkyAPIHandler extends BaseBridgeHandler {
private final Logger logger = LoggerFactory.getLogger(DarkSkyAPIHandler.class);
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = Collections.singleton(THING_TYPE_WEATHER_API);
private static final long INITIAL_DELAY_IN_SECONDS = 15;
private @Nullable ScheduledFuture<?> refreshJob;
private final HttpClient httpClient;
private final LocaleProvider localeProvider;
private @NonNullByDefault({}) DarkSkyConnection connection;
// keeps track of the parsed config
private @NonNullByDefault({}) DarkSkyAPIConfiguration config;
public DarkSkyAPIHandler(Bridge bridge, HttpClient httpClient, LocaleProvider localeProvider) {
super(bridge);
this.httpClient = httpClient;
this.localeProvider = localeProvider;
}
@Override
public void initialize() {
logger.debug("Initialize Dark Sky API handler '{}'.", getThing().getUID());
config = getConfigAs(DarkSkyAPIConfiguration.class);
boolean configValid = true;
if (config.apikey == null || config.apikey.trim().isEmpty()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"@text/offline.conf-error-missing-apikey");
configValid = false;
}
int refreshInterval = config.refreshInterval;
if (refreshInterval < 1) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"@text/offline.conf-error-not-supported-refreshInterval");
configValid = false;
}
String language = config.language;
if (language != null && !(language = language.trim()).isEmpty()) {
if (!DarkSkyAPIConfiguration.SUPPORTED_LANGUAGES.contains(language.toLowerCase())) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"@text/offline.conf-error-not-supported-language");
configValid = false;
}
} else {
language = localeProvider.getLocale().getLanguage();
if (DarkSkyAPIConfiguration.SUPPORTED_LANGUAGES.contains(language)) {
logger.debug("Language set to '{}'.", language);
Configuration editConfig = editConfiguration();
editConfig.put(CONFIG_LANGUAGE, language);
updateConfiguration(editConfig);
}
}
if (configValid) {
connection = new DarkSkyConnection(this, httpClient);
updateStatus(ThingStatus.UNKNOWN);
ScheduledFuture<?> localRefreshJob = refreshJob;
if (localRefreshJob == null || localRefreshJob.isCancelled()) {
logger.debug("Start refresh job at interval {} min.", refreshInterval);
refreshJob = scheduler.scheduleWithFixedDelay(this::updateThings, INITIAL_DELAY_IN_SECONDS,
TimeUnit.MINUTES.toSeconds(refreshInterval), TimeUnit.SECONDS);
}
}
}
@Override
public void dispose() {
logger.debug("Dispose Dark Sky API handler '{}'.", getThing().getUID());
ScheduledFuture<?> localRefreshJob = refreshJob;
if (localRefreshJob != null && !localRefreshJob.isCancelled()) {
logger.debug("Stop refresh job.");
if (localRefreshJob.cancel(true)) {
refreshJob = null;
}
}
}
@Override
public void handleCommand(ChannelUID channelUID, Command command) {
if (command instanceof RefreshType) {
scheduler.schedule(this::updateThings, INITIAL_DELAY_IN_SECONDS, TimeUnit.SECONDS);
} else {
logger.debug("The Dark Sky binding is a read-only binding and cannot handle command '{}'.", command);
}
}
@Override
public void childHandlerInitialized(ThingHandler childHandler, Thing childThing) {
scheduler.schedule(() -> {
updateThing((DarkSkyWeatherAndForecastHandler) childHandler, childThing);
determineBridgeStatus();
}, INITIAL_DELAY_IN_SECONDS, TimeUnit.SECONDS);
}
@Override
public void childHandlerDisposed(ThingHandler childHandler, Thing childThing) {
determineBridgeStatus();
}
private void determineBridgeStatus() {
ThingStatus status = ThingStatus.OFFLINE;
for (Thing thing : getThing().getThings()) {
if (ThingStatus.ONLINE.equals(thing.getStatus())) {
status = ThingStatus.ONLINE;
break;
}
}
updateStatus(status);
}
private void updateThings() {
ThingStatus status = ThingStatus.OFFLINE;
for (Thing thing : getThing().getThings()) {
if (ThingStatus.ONLINE.equals(updateThing((DarkSkyWeatherAndForecastHandler) thing.getHandler(), thing))) {
status = ThingStatus.ONLINE;
}
}
updateStatus(status);
}
private ThingStatus updateThing(@Nullable DarkSkyWeatherAndForecastHandler handler, Thing thing) {
if (handler != null && connection != null) {
handler.updateData(connection);
return thing.getStatus();
} else {
logger.debug("Cannot update weather data of thing '{}' as location handler is null.", thing.getUID());
return ThingStatus.OFFLINE;
}
}
public DarkSkyAPIConfiguration getDarkSkyAPIConfig() {
return config;
}
}

View File

@ -1,873 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.handler;
import static org.openhab.binding.darksky.internal.DarkSkyBindingConstants.*;
import static org.openhab.core.library.unit.MetricPrefix.*;
import static org.openhab.core.library.unit.SIUnits.*;
import static org.openhab.core.library.unit.Units.*;
import java.time.Instant;
import java.time.ZoneId;
import java.time.ZonedDateTime;
import java.time.format.DateTimeFormatter;
import java.time.temporal.ChronoUnit;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ScheduledFuture;
import java.util.concurrent.TimeUnit;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import javax.measure.Unit;
import org.eclipse.jdt.annotation.NonNullByDefault;
import org.eclipse.jdt.annotation.Nullable;
import org.openhab.binding.darksky.internal.config.DarkSkyChannelConfiguration;
import org.openhab.binding.darksky.internal.config.DarkSkyWeatherAndForecastConfiguration;
import org.openhab.binding.darksky.internal.connection.DarkSkyCommunicationException;
import org.openhab.binding.darksky.internal.connection.DarkSkyConfigurationException;
import org.openhab.binding.darksky.internal.connection.DarkSkyConnection;
import org.openhab.binding.darksky.internal.model.DarkSkyCurrentlyData;
import org.openhab.binding.darksky.internal.model.DarkSkyDailyData.DailyData;
import org.openhab.binding.darksky.internal.model.DarkSkyHourlyData.HourlyData;
import org.openhab.binding.darksky.internal.model.DarkSkyJsonWeatherData;
import org.openhab.binding.darksky.internal.model.DarkSkyJsonWeatherData.AlertsData;
import org.openhab.core.library.types.DateTimeType;
import org.openhab.core.library.types.DecimalType;
import org.openhab.core.library.types.PointType;
import org.openhab.core.library.types.QuantityType;
import org.openhab.core.library.types.RawType;
import org.openhab.core.library.types.StringType;
import org.openhab.core.thing.Channel;
import org.openhab.core.thing.ChannelGroupUID;
import org.openhab.core.thing.ChannelUID;
import org.openhab.core.thing.Thing;
import org.openhab.core.thing.ThingStatus;
import org.openhab.core.thing.ThingStatusDetail;
import org.openhab.core.thing.ThingStatusInfo;
import org.openhab.core.thing.ThingTypeUID;
import org.openhab.core.thing.binding.BaseThingHandler;
import org.openhab.core.thing.binding.ThingHandlerCallback;
import org.openhab.core.thing.binding.builder.ChannelBuilder;
import org.openhab.core.thing.binding.builder.ThingBuilder;
import org.openhab.core.thing.type.ChannelGroupTypeUID;
import org.openhab.core.thing.type.ChannelKind;
import org.openhab.core.types.Command;
import org.openhab.core.types.RefreshType;
import org.openhab.core.types.State;
import org.openhab.core.types.UnDefType;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import com.google.gson.JsonSyntaxException;
/**
* The {@link DarkSkyWeatherAndForecastHandler} is responsible for handling commands, which are sent to one of the
* channels.
*
* @author Christoph Weitkamp - Initial contribution
*/
@NonNullByDefault
public class DarkSkyWeatherAndForecastHandler extends BaseThingHandler {
private final Logger logger = LoggerFactory.getLogger(DarkSkyWeatherAndForecastHandler.class);
public static final Set<ThingTypeUID> SUPPORTED_THING_TYPES = Collections
.singleton(THING_TYPE_WEATHER_AND_FORECAST);
private static final String PRECIP_TYPE_SNOW = "snow";
private static final String PRECIP_TYPE_RAIN = "rain";
private static final String CHANNEL_GROUP_HOURLY_FORECAST_PREFIX = "forecastHours";
private static final String CHANNEL_GROUP_DAILY_FORECAST_PREFIX = "forecastDay";
private static final String CHANNEL_GROUP_ALERTS_PREFIX = "alerts";
private static final Pattern CHANNEL_GROUP_HOURLY_FORECAST_PREFIX_PATTERN = Pattern
.compile(CHANNEL_GROUP_HOURLY_FORECAST_PREFIX + "([0-9]*)");
private static final Pattern CHANNEL_GROUP_DAILY_FORECAST_PREFIX_PATTERN = Pattern
.compile(CHANNEL_GROUP_DAILY_FORECAST_PREFIX + "([0-9]*)");
private static final Pattern CHANNEL_GROUP_ALERTS_PREFIX_PATTERN = Pattern
.compile(CHANNEL_GROUP_ALERTS_PREFIX + "([0-9]*)");
// keeps track of all jobs
private static final Map<String, Job> JOBS = new ConcurrentHashMap<>();
// keeps track of the parsed location
protected @Nullable PointType location;
// keeps track of the parsed counts
private int forecastHours = 24;
private int forecastDays = 8;
private int numberOfAlerts = 0;
private @Nullable DarkSkyChannelConfiguration sunriseTriggerChannelConfig;
private @Nullable DarkSkyChannelConfiguration sunsetTriggerChannelConfig;
private @Nullable DarkSkyJsonWeatherData weatherData;
public DarkSkyWeatherAndForecastHandler(Thing thing) {
super(thing);
}
@Override
public void initialize() {
logger.debug("Initialize DarkSkyWeatherAndForecastHandler handler '{}'.", getThing().getUID());
DarkSkyWeatherAndForecastConfiguration config = getConfigAs(DarkSkyWeatherAndForecastConfiguration.class);
boolean configValid = true;
if (config.location == null || config.location.trim().isEmpty()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"@text/offline.conf-error-missing-location");
configValid = false;
}
try {
location = new PointType(config.location);
} catch (IllegalArgumentException e) {
logger.warn("Error parsing 'location' parameter: {}", e.getMessage());
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"@text/offline.conf-error-parsing-location");
location = null;
configValid = false;
}
int newForecastHours = config.forecastHours;
if (newForecastHours < 0 || newForecastHours > 48) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"@text/offline.conf-error-not-supported-number-of-hours");
configValid = false;
}
int newForecastDays = config.forecastDays;
if (newForecastDays < 0 || newForecastDays > 8) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"@text/offline.conf-error-not-supported-number-of-days");
configValid = false;
}
int newNumberOfAlerts = config.numberOfAlerts;
if (newNumberOfAlerts < 0) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
"@text/offline.conf-error-not-supported-number-of-alerts");
configValid = false;
}
if (configValid) {
logger.debug("Rebuilding thing '{}'.", getThing().getUID());
List<Channel> toBeAddedChannels = new ArrayList<>();
List<Channel> toBeRemovedChannels = new ArrayList<>();
if (forecastHours != newForecastHours) {
logger.debug("Rebuilding hourly forecast channel groups.");
if (forecastHours > newForecastHours) {
for (int i = newForecastHours + 1; i <= forecastHours; ++i) {
toBeRemovedChannels.addAll(removeChannelsOfGroup(
CHANNEL_GROUP_HOURLY_FORECAST_PREFIX + ((i < 10) ? "0" : "") + Integer.toString(i)));
}
} else {
for (int i = forecastHours + 1; i <= newForecastHours; ++i) {
toBeAddedChannels.addAll(createChannelsForGroup(
CHANNEL_GROUP_HOURLY_FORECAST_PREFIX + ((i < 10) ? "0" : "") + Integer.toString(i),
CHANNEL_GROUP_TYPE_HOURLY_FORECAST));
}
}
forecastHours = newForecastHours;
}
if (forecastDays != newForecastDays) {
logger.debug("Rebuilding daily forecast channel groups.");
if (forecastDays > newForecastDays) {
if (newForecastDays < 1) {
toBeRemovedChannels.addAll(removeChannelsOfGroup(CHANNEL_GROUP_FORECAST_TODAY));
}
if (newForecastDays < 2) {
toBeRemovedChannels.addAll(removeChannelsOfGroup(CHANNEL_GROUP_FORECAST_TOMORROW));
}
for (int i = newForecastDays; i < forecastDays; ++i) {
toBeRemovedChannels.addAll(
removeChannelsOfGroup(CHANNEL_GROUP_DAILY_FORECAST_PREFIX + Integer.toString(i)));
}
} else {
if (forecastDays == 0 && newForecastDays > 0) {
toBeAddedChannels.addAll(createChannelsForGroup(CHANNEL_GROUP_FORECAST_TODAY,
CHANNEL_GROUP_TYPE_DAILY_FORECAST));
}
if (forecastDays <= 1 && newForecastDays > 1) {
toBeAddedChannels.addAll(createChannelsForGroup(CHANNEL_GROUP_FORECAST_TOMORROW,
CHANNEL_GROUP_TYPE_DAILY_FORECAST));
}
for (int i = (forecastDays < 2) ? 2 : forecastDays; i < newForecastDays; ++i) {
toBeAddedChannels.addAll(
createChannelsForGroup(CHANNEL_GROUP_DAILY_FORECAST_PREFIX + Integer.toString(i),
CHANNEL_GROUP_TYPE_DAILY_FORECAST));
}
}
forecastDays = newForecastDays;
}
if (numberOfAlerts != newNumberOfAlerts) {
logger.debug("Rebuilding alerts channel groups.");
if (numberOfAlerts > newNumberOfAlerts) {
for (int i = newNumberOfAlerts + 1; i <= numberOfAlerts; ++i) {
toBeRemovedChannels
.addAll(removeChannelsOfGroup(CHANNEL_GROUP_ALERTS_PREFIX + Integer.toString(i)));
}
} else {
for (int i = numberOfAlerts + 1; i <= newNumberOfAlerts; ++i) {
toBeAddedChannels.addAll(createChannelsForGroup(
CHANNEL_GROUP_ALERTS_PREFIX + Integer.toString(i), CHANNEL_GROUP_TYPE_ALERTS));
}
}
numberOfAlerts = newNumberOfAlerts;
}
ThingBuilder builder = editThing().withoutChannels(toBeRemovedChannels);
for (Channel channel : toBeAddedChannels) {
builder.withChannel(channel);
}
updateThing(builder.build());
Channel sunriseTriggerChannel = getThing().getChannel(TRIGGER_SUNRISE);
sunriseTriggerChannelConfig = (sunriseTriggerChannel == null) ? null
: sunriseTriggerChannel.getConfiguration().as(DarkSkyChannelConfiguration.class);
Channel sunsetTriggerChannel = getThing().getChannel(TRIGGER_SUNSET);
sunsetTriggerChannelConfig = (sunsetTriggerChannel == null) ? null
: sunsetTriggerChannel.getConfiguration().as(DarkSkyChannelConfiguration.class);
updateStatus(ThingStatus.UNKNOWN);
}
}
@Override
public void dispose() {
cancelAllJobs();
}
@Override
public void handleCommand(ChannelUID channelUID, Command command) {
if (command instanceof RefreshType) {
updateChannel(channelUID);
} else {
logger.debug("The Dark Sky binding is a read-only binding and cannot handle command '{}'.", command);
}
}
@Override
public void bridgeStatusChanged(ThingStatusInfo bridgeStatusInfo) {
if (ThingStatus.ONLINE.equals(bridgeStatusInfo.getStatus())
&& ThingStatusDetail.BRIDGE_OFFLINE.equals(getThing().getStatusInfo().getStatusDetail())) {
updateStatus(ThingStatus.ONLINE, ThingStatusDetail.NONE);
} else if (ThingStatus.OFFLINE.equals(bridgeStatusInfo.getStatus())
&& !ThingStatus.OFFLINE.equals(getThing().getStatus())) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.BRIDGE_OFFLINE);
}
}
/**
* Creates all {@link Channel}s for the given {@link ChannelGroupTypeUID}.
*
* @param channelGroupId the channel group id
* @param channelGroupTypeUID the {@link ChannelGroupTypeUID}
* @return a list of all {@link Channel}s for the channel group
*/
private List<Channel> createChannelsForGroup(String channelGroupId, ChannelGroupTypeUID channelGroupTypeUID) {
logger.debug("Building channel group '{}' for thing '{}'.", channelGroupId, getThing().getUID());
List<Channel> channels = new ArrayList<>();
ThingHandlerCallback callback = getCallback();
if (callback != null) {
for (ChannelBuilder channelBuilder : callback.createChannelBuilders(
new ChannelGroupUID(getThing().getUID(), channelGroupId), channelGroupTypeUID)) {
Channel newChannel = channelBuilder.build(),
existingChannel = getThing().getChannel(newChannel.getUID().getId());
if (existingChannel != null) {
logger.trace("Thing '{}' already has an existing channel '{}'. Omit adding new channel '{}'.",
getThing().getUID(), existingChannel.getUID(), newChannel.getUID());
continue;
}
channels.add(newChannel);
}
}
return channels;
}
/**
* Removes all {@link Channel}s of the given channel group.
*
* @param channelGroupId the channel group id
* @return a list of all {@link Channel}s in the given channel group
*/
private List<Channel> removeChannelsOfGroup(String channelGroupId) {
logger.debug("Removing channel group '{}' from thing '{}'.", channelGroupId, getThing().getUID());
return getThing().getChannelsOfGroup(channelGroupId);
}
/**
* Updates Dark Sky data for this location.
*
* @param connection {@link DarkSkyConnection} instance
*/
public void updateData(DarkSkyConnection connection) {
try {
if (requestData(connection)) {
updateChannels();
updateStatus(ThingStatus.ONLINE);
}
} catch (DarkSkyCommunicationException e) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, e.getLocalizedMessage());
} catch (DarkSkyConfigurationException e) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR, e.getLocalizedMessage());
}
}
/**
* Requests the data from Dark Sky API.
*
* @param connection {@link DarkSkyConnection} instance
* @return true, if the request for the Dark Sky data was successful
* @throws DarkSkyCommunicationException
* @throws DarkSkyConfigurationException
*/
private boolean requestData(DarkSkyConnection connection)
throws DarkSkyCommunicationException, DarkSkyConfigurationException {
logger.debug("Update weather and forecast data of thing '{}'.", getThing().getUID());
try {
weatherData = connection.getWeatherData(location);
return true;
} catch (JsonSyntaxException e) {
logger.debug("JsonSyntaxException occurred during execution: {}", e.getLocalizedMessage(), e);
return false;
}
}
/**
* Updates all channels of this handler from the latest Dark Sky data retrieved.
*/
private void updateChannels() {
for (Channel channel : getThing().getChannels()) {
ChannelUID channelUID = channel.getUID();
if (ChannelKind.STATE.equals(channel.getKind()) && channelUID.isInGroup() && channelUID.getGroupId() != null
&& isLinked(channelUID)) {
updateChannel(channelUID);
}
}
}
/**
* Updates the channel with the given UID from the latest Dark Sky data retrieved.
*
* @param channelUID UID of the channel
*/
private void updateChannel(ChannelUID channelUID) {
String channelGroupId = channelUID.getGroupId();
switch (channelGroupId) {
case CHANNEL_GROUP_CURRENT_WEATHER:
updateCurrentChannel(channelUID);
break;
case CHANNEL_GROUP_FORECAST_TODAY:
updateDailyForecastChannel(channelUID, 0);
break;
case CHANNEL_GROUP_FORECAST_TOMORROW:
updateDailyForecastChannel(channelUID, 1);
break;
default:
int i;
Matcher hourlyForecastMatcher = CHANNEL_GROUP_HOURLY_FORECAST_PREFIX_PATTERN.matcher(channelGroupId);
if (hourlyForecastMatcher.find() && (i = Integer.parseInt(hourlyForecastMatcher.group(1))) >= 1
&& i <= 48) {
updateHourlyForecastChannel(channelUID, i);
break;
}
Matcher dailyForecastMatcher = CHANNEL_GROUP_DAILY_FORECAST_PREFIX_PATTERN.matcher(channelGroupId);
if (dailyForecastMatcher.find() && (i = Integer.parseInt(dailyForecastMatcher.group(1))) > 1
&& i <= 8) {
updateDailyForecastChannel(channelUID, i);
break;
}
Matcher alertsMatcher = CHANNEL_GROUP_ALERTS_PREFIX_PATTERN.matcher(channelGroupId);
if (alertsMatcher.find() && (i = Integer.parseInt(alertsMatcher.group(1))) >= 1) {
updateAlertsChannel(channelUID, i);
break;
}
logger.warn("Unknown channel group '{}'. Cannot update channel '{}'.", channelGroupId, channelUID);
break;
}
}
/**
* Update the channel from the last Dark Sky data retrieved.
*
* @param channelUID the id identifying the channel to be updated
*/
private void updateCurrentChannel(ChannelUID channelUID) {
String channelId = channelUID.getIdWithoutGroup();
String channelGroupId = channelUID.getGroupId();
if (weatherData != null && weatherData.getCurrently() != null) {
DarkSkyCurrentlyData currentData = weatherData.getCurrently();
State state = UnDefType.UNDEF;
switch (channelId) {
case CHANNEL_TIME_STAMP:
state = getDateTimeTypeState(currentData.getTime());
break;
case CHANNEL_CONDITION:
state = getStringTypeState(currentData.getSummary());
break;
case CHANNEL_CONDITION_ICON:
state = getRawTypeState(DarkSkyConnection.getWeatherIcon(currentData.getIcon()));
break;
case CHANNEL_CONDITION_ICON_ID:
state = getStringTypeState(currentData.getIcon());
break;
case CHANNEL_TEMPERATURE:
state = getQuantityTypeState(currentData.getTemperature(), CELSIUS);
break;
case CHANNEL_APPARENT_TEMPERATURE:
state = getQuantityTypeState(currentData.getApparentTemperature(), CELSIUS);
break;
case CHANNEL_PRESSURE:
state = getQuantityTypeState(currentData.getPressure(), HECTO(PASCAL));
break;
case CHANNEL_HUMIDITY:
state = getQuantityTypeState(currentData.getHumidity() * 100, PERCENT);
break;
case CHANNEL_WIND_SPEED:
state = getQuantityTypeState(currentData.getWindSpeed(), METRE_PER_SECOND);
break;
case CHANNEL_WIND_DIRECTION:
state = getQuantityTypeState(currentData.getWindBearing(), DEGREE_ANGLE);
break;
case CHANNEL_GUST_SPEED:
state = getQuantityTypeState(currentData.getWindGust(), METRE_PER_SECOND);
break;
case CHANNEL_CLOUDINESS:
state = getQuantityTypeState(currentData.getCloudCover() * 100, PERCENT);
break;
case CHANNEL_VISIBILITY:
state = getQuantityTypeState(currentData.getVisibility(), KILO(METRE));
break;
case CHANNEL_RAIN:
state = getQuantityTypeState(
PRECIP_TYPE_RAIN.equals(currentData.getPrecipType()) ? currentData.getPrecipIntensity() : 0,
MILLIMETRE_PER_HOUR);
break;
case CHANNEL_SNOW:
state = getQuantityTypeState(
PRECIP_TYPE_SNOW.equals(currentData.getPrecipType()) ? currentData.getPrecipIntensity() : 0,
MILLIMETRE_PER_HOUR);
break;
case CHANNEL_PRECIPITATION_INTENSITY:
state = getQuantityTypeState(currentData.getPrecipIntensity(), MILLIMETRE_PER_HOUR);
break;
case CHANNEL_PRECIPITATION_PROBABILITY:
state = getQuantityTypeState(currentData.getPrecipProbability() * 100, PERCENT);
break;
case CHANNEL_PRECIPITATION_TYPE:
state = getStringTypeState(currentData.getPrecipType());
break;
case CHANNEL_UVINDEX:
state = getDecimalTypeState(currentData.getUvIndex());
break;
case CHANNEL_OZONE:
state = getQuantityTypeState(currentData.getOzone(), DOBSON_UNIT);
break;
case CHANNEL_SUNRISE:
case CHANNEL_SUNSET:
updateDailyForecastChannel(channelUID, 0);
return;
}
logger.debug("Update channel '{}' of group '{}' with new state '{}'.", channelId, channelGroupId, state);
updateState(channelUID, state);
} else {
logger.debug("No weather data available to update channel '{}' of group '{}'.", channelId, channelGroupId);
}
}
/**
* Update the channel from the last Dark Sky data retrieved.
*
* @param channelUID the id identifying the channel to be updated
* @param count
*/
private void updateHourlyForecastChannel(ChannelUID channelUID, int count) {
String channelId = channelUID.getIdWithoutGroup();
String channelGroupId = channelUID.getGroupId();
if (weatherData != null && weatherData.getHourly() != null
&& weatherData.getHourly().getData().size() > count) {
HourlyData forecastData = weatherData.getHourly().getData().get(count);
State state = UnDefType.UNDEF;
switch (channelId) {
case CHANNEL_TIME_STAMP:
state = getDateTimeTypeState(forecastData.getTime());
break;
case CHANNEL_CONDITION:
state = getStringTypeState(forecastData.getSummary());
break;
case CHANNEL_CONDITION_ICON:
state = getRawTypeState(DarkSkyConnection.getWeatherIcon(forecastData.getIcon()));
break;
case CHANNEL_CONDITION_ICON_ID:
state = getStringTypeState(forecastData.getIcon());
break;
case CHANNEL_TEMPERATURE:
state = getQuantityTypeState(forecastData.getTemperature(), CELSIUS);
break;
case CHANNEL_APPARENT_TEMPERATURE:
state = getQuantityTypeState(forecastData.getApparentTemperature(), CELSIUS);
break;
case CHANNEL_PRESSURE:
state = getQuantityTypeState(forecastData.getPressure(), HECTO(PASCAL));
break;
case CHANNEL_HUMIDITY:
state = getQuantityTypeState(forecastData.getHumidity() * 100, PERCENT);
break;
case CHANNEL_WIND_SPEED:
state = getQuantityTypeState(forecastData.getWindSpeed(), METRE_PER_SECOND);
break;
case CHANNEL_WIND_DIRECTION:
state = getQuantityTypeState(forecastData.getWindBearing(), DEGREE_ANGLE);
break;
case CHANNEL_GUST_SPEED:
state = getQuantityTypeState(forecastData.getWindGust(), METRE_PER_SECOND);
break;
case CHANNEL_CLOUDINESS:
state = getQuantityTypeState(forecastData.getCloudCover() * 100, PERCENT);
break;
case CHANNEL_VISIBILITY:
state = getQuantityTypeState(forecastData.getVisibility(), KILO(METRE));
break;
case CHANNEL_RAIN:
state = getQuantityTypeState(
PRECIP_TYPE_RAIN.equals(forecastData.getPrecipType()) ? forecastData.getPrecipIntensity()
: 0,
MILLIMETRE_PER_HOUR);
break;
case CHANNEL_SNOW:
state = getQuantityTypeState(
PRECIP_TYPE_SNOW.equals(forecastData.getPrecipType()) ? forecastData.getPrecipIntensity()
: 0,
MILLIMETRE_PER_HOUR);
break;
case CHANNEL_PRECIPITATION_INTENSITY:
state = getQuantityTypeState(forecastData.getPrecipIntensity(), MILLIMETRE_PER_HOUR);
break;
case CHANNEL_PRECIPITATION_PROBABILITY:
state = getQuantityTypeState(forecastData.getPrecipProbability() * 100, PERCENT);
break;
case CHANNEL_PRECIPITATION_TYPE:
state = getStringTypeState(forecastData.getPrecipType());
break;
case CHANNEL_UVINDEX:
state = getDecimalTypeState(forecastData.getUvIndex());
break;
case CHANNEL_OZONE:
state = getQuantityTypeState(forecastData.getOzone(), DOBSON_UNIT);
break;
}
logger.debug("Update channel '{}' of group '{}' with new state '{}'.", channelId, channelGroupId, state);
updateState(channelUID, state);
} else {
logger.debug("No weather data available to update channel '{}' of group '{}'.", channelId, channelGroupId);
}
}
/**
* Update the channel from the last Dark Sky data retrieved.
*
* @param channelUID the id identifying the channel to be updated
* @param count
*/
private void updateDailyForecastChannel(ChannelUID channelUID, int count) {
String channelId = channelUID.getIdWithoutGroup();
String channelGroupId = channelUID.getGroupId();
if (weatherData != null && weatherData.getDaily() != null && weatherData.getDaily().getData().size() > count) {
DailyData forecastData = weatherData.getDaily().getData().get(count);
State state = UnDefType.UNDEF;
switch (channelId) {
case CHANNEL_TIME_STAMP:
state = getDateTimeTypeState(forecastData.getTime());
break;
case CHANNEL_CONDITION:
state = getStringTypeState(forecastData.getSummary());
break;
case CHANNEL_CONDITION_ICON:
state = getRawTypeState(DarkSkyConnection.getWeatherIcon(forecastData.getIcon()));
break;
case CHANNEL_CONDITION_ICON_ID:
state = getStringTypeState(forecastData.getIcon());
break;
case CHANNEL_MIN_TEMPERATURE:
state = getQuantityTypeState(forecastData.getTemperatureMin(), CELSIUS);
break;
case CHANNEL_MAX_TEMPERATURE:
state = getQuantityTypeState(forecastData.getTemperatureMax(), CELSIUS);
break;
case CHANNEL_MIN_APPARENT_TEMPERATURE:
state = getQuantityTypeState(forecastData.getApparentTemperatureMin(), CELSIUS);
break;
case CHANNEL_MAX_APPARENT_TEMPERATURE:
state = getQuantityTypeState(forecastData.getApparentTemperatureMax(), CELSIUS);
break;
case CHANNEL_PRESSURE:
state = getQuantityTypeState(forecastData.getPressure(), HECTO(PASCAL));
break;
case CHANNEL_HUMIDITY:
state = getQuantityTypeState(forecastData.getHumidity() * 100, PERCENT);
break;
case CHANNEL_WIND_SPEED:
state = getQuantityTypeState(forecastData.getWindSpeed(), METRE_PER_SECOND);
break;
case CHANNEL_WIND_DIRECTION:
state = getQuantityTypeState(forecastData.getWindBearing(), DEGREE_ANGLE);
break;
case CHANNEL_GUST_SPEED:
state = getQuantityTypeState(forecastData.getWindGust(), METRE_PER_SECOND);
break;
case CHANNEL_CLOUDINESS:
state = getQuantityTypeState(forecastData.getCloudCover() * 100, PERCENT);
break;
case CHANNEL_VISIBILITY:
state = getQuantityTypeState(forecastData.getVisibility(), KILO(METRE));
break;
case CHANNEL_RAIN:
state = getQuantityTypeState(
PRECIP_TYPE_RAIN.equals(forecastData.getPrecipType()) ? forecastData.getPrecipIntensity()
: 0,
MILLIMETRE_PER_HOUR);
break;
case CHANNEL_SNOW:
state = getQuantityTypeState(
PRECIP_TYPE_SNOW.equals(forecastData.getPrecipType()) ? forecastData.getPrecipIntensity()
: 0,
MILLIMETRE_PER_HOUR);
break;
case CHANNEL_PRECIPITATION_INTENSITY:
state = getQuantityTypeState(forecastData.getPrecipIntensity(), MILLIMETRE_PER_HOUR);
break;
case CHANNEL_PRECIPITATION_PROBABILITY:
state = getQuantityTypeState(forecastData.getPrecipProbability() * 100, PERCENT);
break;
case CHANNEL_PRECIPITATION_TYPE:
state = getStringTypeState(forecastData.getPrecipType());
break;
case CHANNEL_UVINDEX:
state = getDecimalTypeState(forecastData.getUvIndex());
break;
case CHANNEL_OZONE:
state = getQuantityTypeState(forecastData.getOzone(), DOBSON_UNIT);
break;
case CHANNEL_SUNRISE:
state = getDateTimeTypeState(forecastData.getSunriseTime());
if (count == 0 && state instanceof DateTimeType) {
scheduleJob(TRIGGER_SUNRISE, applyChannelConfig(((DateTimeType) state).getZonedDateTime(),
sunriseTriggerChannelConfig));
}
break;
case CHANNEL_SUNSET:
state = getDateTimeTypeState(forecastData.getSunsetTime());
if (count == 0 && state instanceof DateTimeType) {
scheduleJob(TRIGGER_SUNSET, applyChannelConfig(((DateTimeType) state).getZonedDateTime(),
sunsetTriggerChannelConfig));
}
break;
}
logger.debug("Update channel '{}' of group '{}' with new state '{}'.", channelId, channelGroupId, state);
updateState(channelUID, state);
} else {
logger.debug("No weather data available to update channel '{}' of group '{}'.", channelId, channelGroupId);
}
}
/**
* Update the channel from the last Dark Sky data retrieved.
*
* @param channelUID the id identifying the channel to be updated
* @param count
*/
private void updateAlertsChannel(ChannelUID channelUID, int count) {
String channelId = channelUID.getIdWithoutGroup();
String channelGroupId = channelUID.getGroupId();
List<AlertsData> alerts = weatherData != null ? weatherData.getAlerts() : null;
State state = UnDefType.UNDEF;
if (alerts != null && alerts.size() > count) {
AlertsData alertsData = alerts.get(count - 1);
switch (channelId) {
case CHANNEL_ALERT_TITLE:
state = getStringTypeState(alertsData.title);
break;
case CHANNEL_ALERT_DESCRIPTION:
state = getStringTypeState(alertsData.description);
break;
case CHANNEL_ALERT_SEVERITY:
state = getStringTypeState(alertsData.severity);
break;
case CHANNEL_ALERT_ISSUED:
state = getDateTimeTypeState(alertsData.time);
break;
case CHANNEL_ALERT_EXPIRES:
state = getDateTimeTypeState(alertsData.expires);
break;
case CHANNEL_ALERT_URI:
state = getStringTypeState(alertsData.uri);
break;
}
logger.debug("Update channel '{}' of group '{}' with new state '{}'.", channelId, channelGroupId, state);
} else {
logger.debug("No data available to update channel '{}' of group '{}'.", channelId, channelGroupId);
}
updateState(channelUID, state);
}
private State getDateTimeTypeState(int value) {
return new DateTimeType(ZonedDateTime.ofInstant(Instant.ofEpochSecond(value), ZoneId.systemDefault()));
}
private State getDecimalTypeState(int value) {
return new DecimalType(value);
}
private State getRawTypeState(@Nullable RawType image) {
return (image == null) ? UnDefType.UNDEF : image;
}
private State getStringTypeState(@Nullable String value) {
return (value == null) ? UnDefType.UNDEF : new StringType(value);
}
private State getQuantityTypeState(double value, Unit<?> unit) {
return new QuantityType<>(value, unit);
}
/**
* Applies the given configuration to the given timestamp.
*
* @param dateTime timestamp represented as {@link ZonedDateTime}
* @param config {@link DarkSkyChannelConfiguration} instance
* @return the modified timestamp
*/
private ZonedDateTime applyChannelConfig(ZonedDateTime dateTime, @Nullable DarkSkyChannelConfiguration config) {
ZonedDateTime modifiedDateTime = dateTime;
if (config != null) {
if (config.getOffset() != 0) {
if (logger.isTraceEnabled()) {
logger.trace("Apply offset of {} min to timestamp '{}'.", config.getOffset(),
modifiedDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
}
modifiedDateTime = modifiedDateTime.plusMinutes(config.getOffset());
}
long earliestInMinutes = config.getEarliestInMinutes();
if (earliestInMinutes > 0) {
ZonedDateTime earliestDateTime = modifiedDateTime.truncatedTo(ChronoUnit.DAYS)
.plusMinutes(earliestInMinutes);
if (modifiedDateTime.isBefore(earliestDateTime)) {
if (logger.isTraceEnabled()) {
logger.trace("Use earliest timestamp '{}' instead of '{}'.",
earliestDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME),
modifiedDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
}
return earliestDateTime;
}
}
long latestInMinutes = config.getLatestInMinutes();
if (latestInMinutes > 0) {
ZonedDateTime latestDateTime = modifiedDateTime.truncatedTo(ChronoUnit.DAYS)
.plusMinutes(latestInMinutes);
if (modifiedDateTime.isAfter(latestDateTime)) {
if (logger.isTraceEnabled()) {
logger.trace("Use latest timestamp '{}' instead of '{}'.",
latestDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME),
modifiedDateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
}
return latestDateTime;
}
}
}
return modifiedDateTime;
}
/**
* Schedules or reschedules a job for the channel with the given id if the given timestamp is in the future.
*
* @param channelId id of the channel
* @param dateTime timestamp of the job represented as {@link ZonedDateTime}
*/
@SuppressWarnings("null")
private synchronized void scheduleJob(String channelId, ZonedDateTime dateTime) {
long delay = dateTime.toEpochSecond() - ZonedDateTime.now().toEpochSecond();
if (delay > 0) {
Job job = JOBS.get(channelId);
if (job == null || job.getFuture().isCancelled()) {
if (logger.isDebugEnabled()) {
logger.debug("Schedule job for '{}' in {} s (at '{}').", channelId, delay,
dateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
}
JOBS.put(channelId, new Job(channelId, delay));
} else {
if (delay != job.getDelay()) {
if (logger.isDebugEnabled()) {
logger.debug("Reschedule job for '{}' in {} s (at '{}').", channelId, delay,
dateTime.format(DateTimeFormatter.ISO_LOCAL_DATE_TIME));
}
job.getFuture().cancel(true);
JOBS.put(channelId, new Job(channelId, delay));
}
}
}
}
/**
* Cancels all jobs.
*/
private void cancelAllJobs() {
logger.debug("Cancel all jobs.");
JOBS.keySet().forEach(this::cancelJob);
}
/**
* Cancels the job for the channel with the given id.
*
* @param channelId id of the channel
*/
@SuppressWarnings("null")
private synchronized void cancelJob(String channelId) {
Job job = JOBS.remove(channelId);
if (job != null && !job.getFuture().isCancelled()) {
logger.debug("Cancel job for '{}'.", channelId);
job.getFuture().cancel(true);
}
}
/**
* Executes the job for the channel with the given id.
*
* @param channelId id of the channel
*/
private void executeJob(String channelId) {
logger.debug("Trigger channel '{}' with event '{}'.", channelId, EVENT_START);
triggerChannel(channelId, EVENT_START);
}
private final class Job {
private final long delay;
private final ScheduledFuture<?> future;
public Job(String event, long delay) {
this.delay = delay;
this.future = scheduler.schedule(() -> {
executeJob(event);
}, delay, TimeUnit.SECONDS);
}
public long getDelay() {
return delay;
}
public ScheduledFuture<?> getFuture() {
return future;
}
}
}

View File

@ -1,183 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.model;
/**
* The {@link DarkSkyCurrentlyData} is the Java class used to map the JSON response to a Dark Sky request.
*
* @author Christoph Weitkamp - Initial contribution
*/
public class DarkSkyCurrentlyData {
private int time;
private String summary;
private String icon;
private double precipIntensity;
private double precipProbability;
private String precipType;
private double temperature;
private double apparentTemperature;
private double dewPoint;
private double humidity;
private double pressure;
private double windSpeed;
private double windGust;
private int windBearing;
private double cloudCover;
private int uvIndex;
private double visibility;
private double ozone;
public int getTime() {
return time;
}
public void setTime(int time) {
this.time = time;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public double getPrecipIntensity() {
return precipIntensity;
}
public void setPrecipIntensity(double precipIntensity) {
this.precipIntensity = precipIntensity;
}
public double getPrecipProbability() {
return precipProbability;
}
public void setPrecipProbability(double precipProbability) {
this.precipProbability = precipProbability;
}
public String getPrecipType() {
return precipType;
}
public void setPrecipType(String precipType) {
this.precipType = precipType;
}
public double getTemperature() {
return temperature;
}
public void setTemperature(double temperature) {
this.temperature = temperature;
}
public double getApparentTemperature() {
return apparentTemperature;
}
public void setApparentTemperature(double apparentTemperature) {
this.apparentTemperature = apparentTemperature;
}
public double getDewPoint() {
return dewPoint;
}
public void setDewPoint(double dewPoint) {
this.dewPoint = dewPoint;
}
public double getHumidity() {
return humidity;
}
public void setHumidity(double humidity) {
this.humidity = humidity;
}
public double getPressure() {
return pressure;
}
public void setPressure(double pressure) {
this.pressure = pressure;
}
public double getWindSpeed() {
return windSpeed;
}
public void setWindSpeed(double windSpeed) {
this.windSpeed = windSpeed;
}
public double getWindGust() {
return windGust;
}
public void setWindGust(double windGust) {
this.windGust = windGust;
}
public int getWindBearing() {
return windBearing;
}
public void setWindBearing(int windBearing) {
this.windBearing = windBearing;
}
public double getCloudCover() {
return cloudCover;
}
public void setCloudCover(double cloudCover) {
this.cloudCover = cloudCover;
}
public int getUvIndex() {
return uvIndex;
}
public void setUvIndex(int uvIndex) {
this.uvIndex = uvIndex;
}
public double getVisibility() {
return visibility;
}
public void setVisibility(double visibility) {
this.visibility = visibility;
}
public double getOzone() {
return ozone;
}
public void setOzone(double ozone) {
this.ozone = ozone;
}
}

View File

@ -1,415 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.model;
import java.util.List;
import org.eclipse.jdt.annotation.Nullable;
/**
* The {@link DarkSkyDailyData} is the Java class used to map the JSON response to a Dark Sky request.
*
* @author Christoph Weitkamp - Initial contribution
*/
public class DarkSkyDailyData {
private String summary;
private String icon;
private @Nullable List<DailyData> data;
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public @Nullable List<DailyData> getData() {
return data;
}
public void setData(@Nullable List<DailyData> data) {
this.data = data;
}
public class DailyData {
private int time;
private String summary;
private String icon;
private int sunriseTime;
private int sunsetTime;
private double moonPhase;
private double precipIntensity;
private double precipIntensityMax;
private int precipIntensityMaxTime;
private double precipProbability;
private String precipType;
private double temperatureHigh;
private int temperatureHighTime;
private double temperatureLow;
private int temperatureLowTime;
private double apparentTemperatureHigh;
private int apparentTemperatureHighTime;
private double apparentTemperatureLow;
private int apparentTemperatureLowTime;
private double dewPoint;
private double humidity;
private double pressure;
private double windSpeed;
private double windGust;
private int windGustTime;
private int windBearing;
private double cloudCover;
private int uvIndex;
private int uvIndexTime;
private double visibility;
private double ozone;
private double temperatureMin;
private int temperatureMinTime;
private double temperatureMax;
private int temperatureMaxTime;
private double apparentTemperatureMin;
private int apparentTemperatureMinTime;
private double apparentTemperatureMax;
private int apparentTemperatureMaxTime;
private double precipAccumulation;
public int getTime() {
return time;
}
public void setTime(int time) {
this.time = time;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public int getSunriseTime() {
return sunriseTime;
}
public void setSunriseTime(int sunriseTime) {
this.sunriseTime = sunriseTime;
}
public int getSunsetTime() {
return sunsetTime;
}
public void setSunsetTime(int sunsetTime) {
this.sunsetTime = sunsetTime;
}
public double getMoonPhase() {
return moonPhase;
}
public void setMoonPhase(double moonPhase) {
this.moonPhase = moonPhase;
}
public double getPrecipIntensity() {
return precipIntensity;
}
public void setPrecipIntensity(double precipIntensity) {
this.precipIntensity = precipIntensity;
}
public double getPrecipIntensityMax() {
return precipIntensityMax;
}
public void setPrecipIntensityMax(double precipIntensityMax) {
this.precipIntensityMax = precipIntensityMax;
}
public int getPrecipIntensityMaxTime() {
return precipIntensityMaxTime;
}
public void setPrecipIntensityMaxTime(int precipIntensityMaxTime) {
this.precipIntensityMaxTime = precipIntensityMaxTime;
}
public double getPrecipProbability() {
return precipProbability;
}
public void setPrecipProbability(double precipProbability) {
this.precipProbability = precipProbability;
}
public String getPrecipType() {
return precipType;
}
public void setPrecipType(String precipType) {
this.precipType = precipType;
}
public double getTemperatureHigh() {
return temperatureHigh;
}
public void setTemperatureHigh(double temperatureHigh) {
this.temperatureHigh = temperatureHigh;
}
public int getTemperatureHighTime() {
return temperatureHighTime;
}
public void setTemperatureHighTime(int temperatureHighTime) {
this.temperatureHighTime = temperatureHighTime;
}
public double getTemperatureLow() {
return temperatureLow;
}
public void setTemperatureLow(double temperatureLow) {
this.temperatureLow = temperatureLow;
}
public int getTemperatureLowTime() {
return temperatureLowTime;
}
public void setTemperatureLowTime(int temperatureLowTime) {
this.temperatureLowTime = temperatureLowTime;
}
public double getApparentTemperatureHigh() {
return apparentTemperatureHigh;
}
public void setApparentTemperatureHigh(double apparentTemperatureHigh) {
this.apparentTemperatureHigh = apparentTemperatureHigh;
}
public int getApparentTemperatureHighTime() {
return apparentTemperatureHighTime;
}
public void setApparentTemperatureHighTime(int apparentTemperatureHighTime) {
this.apparentTemperatureHighTime = apparentTemperatureHighTime;
}
public double getApparentTemperatureLow() {
return apparentTemperatureLow;
}
public void setApparentTemperatureLow(double apparentTemperatureLow) {
this.apparentTemperatureLow = apparentTemperatureLow;
}
public int getApparentTemperatureLowTime() {
return apparentTemperatureLowTime;
}
public void setApparentTemperatureLowTime(int apparentTemperatureLowTime) {
this.apparentTemperatureLowTime = apparentTemperatureLowTime;
}
public double getDewPoint() {
return dewPoint;
}
public void setDewPoint(double dewPoint) {
this.dewPoint = dewPoint;
}
public double getHumidity() {
return humidity;
}
public void setHumidity(double humidity) {
this.humidity = humidity;
}
public double getPressure() {
return pressure;
}
public void setPressure(double pressure) {
this.pressure = pressure;
}
public double getWindSpeed() {
return windSpeed;
}
public void setWindSpeed(double windSpeed) {
this.windSpeed = windSpeed;
}
public double getWindGust() {
return windGust;
}
public void setWindGust(double windGust) {
this.windGust = windGust;
}
public int getWindGustTime() {
return windGustTime;
}
public void setWindGustTime(int windGustTime) {
this.windGustTime = windGustTime;
}
public int getWindBearing() {
return windBearing;
}
public void setWindBearing(int windBearing) {
this.windBearing = windBearing;
}
public double getCloudCover() {
return cloudCover;
}
public void setCloudCover(double cloudCover) {
this.cloudCover = cloudCover;
}
public int getUvIndex() {
return uvIndex;
}
public void setUvIndex(int uvIndex) {
this.uvIndex = uvIndex;
}
public int getUvIndexTime() {
return uvIndexTime;
}
public void setUvIndexTime(int uvIndexTime) {
this.uvIndexTime = uvIndexTime;
}
public double getVisibility() {
return visibility;
}
public void setVisibility(double visibility) {
this.visibility = visibility;
}
public double getOzone() {
return ozone;
}
public void setOzone(double ozone) {
this.ozone = ozone;
}
public double getTemperatureMin() {
return temperatureMin;
}
public void setTemperatureMin(double temperatureMin) {
this.temperatureMin = temperatureMin;
}
public int getTemperatureMinTime() {
return temperatureMinTime;
}
public void setTemperatureMinTime(int temperatureMinTime) {
this.temperatureMinTime = temperatureMinTime;
}
public double getTemperatureMax() {
return temperatureMax;
}
public void setTemperatureMax(double temperatureMax) {
this.temperatureMax = temperatureMax;
}
public int getTemperatureMaxTime() {
return temperatureMaxTime;
}
public void setTemperatureMaxTime(int temperatureMaxTime) {
this.temperatureMaxTime = temperatureMaxTime;
}
public double getApparentTemperatureMin() {
return apparentTemperatureMin;
}
public void setApparentTemperatureMin(double apparentTemperatureMin) {
this.apparentTemperatureMin = apparentTemperatureMin;
}
public int getApparentTemperatureMinTime() {
return apparentTemperatureMinTime;
}
public void setApparentTemperatureMinTime(int apparentTemperatureMinTime) {
this.apparentTemperatureMinTime = apparentTemperatureMinTime;
}
public double getApparentTemperatureMax() {
return apparentTemperatureMax;
}
public void setApparentTemperatureMax(double apparentTemperatureMax) {
this.apparentTemperatureMax = apparentTemperatureMax;
}
public int getApparentTemperatureMaxTime() {
return apparentTemperatureMaxTime;
}
public void setApparentTemperatureMaxTime(int apparentTemperatureMaxTime) {
this.apparentTemperatureMaxTime = apparentTemperatureMaxTime;
}
public double getPrecipAccumulation() {
return precipAccumulation;
}
public void setPrecipAccumulation(double precipAccumulation) {
this.precipAccumulation = precipAccumulation;
}
}
}

View File

@ -1,226 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.model;
import java.util.List;
import org.eclipse.jdt.annotation.Nullable;
/**
* The {@link DarkSkyHourlyData} is the Java class used to map the JSON response to a Dark Sky request.
*
* @author Christoph Weitkamp - Initial contribution
*/
public class DarkSkyHourlyData {
private String summary;
private String icon;
private @Nullable List<HourlyData> data;
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public @Nullable List<HourlyData> getData() {
return data;
}
public void setData(@Nullable List<HourlyData> data) {
this.data = data;
}
public class HourlyData {
private int time;
private String summary;
private String icon;
private double precipIntensity;
private double precipProbability;
private String precipType;
private double temperature;
private double apparentTemperature;
private double dewPoint;
private double humidity;
private double pressure;
private double windSpeed;
private double windGust;
private int windBearing;
private double cloudCover;
private int uvIndex;
private double visibility;
private double ozone;
private double precipAccumulation;
public int getTime() {
return time;
}
public void setTime(int time) {
this.time = time;
}
public String getSummary() {
return summary;
}
public void setSummary(String summary) {
this.summary = summary;
}
public String getIcon() {
return icon;
}
public void setIcon(String icon) {
this.icon = icon;
}
public double getPrecipIntensity() {
return precipIntensity;
}
public void setPrecipIntensity(double precipIntensity) {
this.precipIntensity = precipIntensity;
}
public double getPrecipProbability() {
return precipProbability;
}
public void setPrecipProbability(double precipProbability) {
this.precipProbability = precipProbability;
}
public String getPrecipType() {
return precipType;
}
public void setPrecipType(String precipType) {
this.precipType = precipType;
}
public double getTemperature() {
return temperature;
}
public void setTemperature(double temperature) {
this.temperature = temperature;
}
public double getApparentTemperature() {
return apparentTemperature;
}
public void setApparentTemperature(double apparentTemperature) {
this.apparentTemperature = apparentTemperature;
}
public double getDewPoint() {
return dewPoint;
}
public void setDewPoint(double dewPoint) {
this.dewPoint = dewPoint;
}
public double getHumidity() {
return humidity;
}
public void setHumidity(double humidity) {
this.humidity = humidity;
}
public double getPressure() {
return pressure;
}
public void setPressure(double pressure) {
this.pressure = pressure;
}
public double getWindSpeed() {
return windSpeed;
}
public void setWindSpeed(double windSpeed) {
this.windSpeed = windSpeed;
}
public double getWindGust() {
return windGust;
}
public void setWindGust(double windGust) {
this.windGust = windGust;
}
public int getWindBearing() {
return windBearing;
}
public void setWindBearing(int windBearing) {
this.windBearing = windBearing;
}
public double getCloudCover() {
return cloudCover;
}
public void setCloudCover(double cloudCover) {
this.cloudCover = cloudCover;
}
public int getUvIndex() {
return uvIndex;
}
public void setUvIndex(int uvIndex) {
this.uvIndex = uvIndex;
}
public double getVisibility() {
return visibility;
}
public void setVisibility(double visibility) {
this.visibility = visibility;
}
public double getOzone() {
return ozone;
}
public void setOzone(double ozone) {
this.ozone = ozone;
}
public double getPrecipAccumulation() {
return precipAccumulation;
}
public void setPrecipAccumulation(double precipAccumulation) {
this.precipAccumulation = precipAccumulation;
}
}
}

View File

@ -1,107 +0,0 @@
/**
* Copyright (c) 2010-2022 Contributors to the openHAB project
*
* See the NOTICE file(s) distributed with this work for additional
* information.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0
*
* SPDX-License-Identifier: EPL-2.0
*/
package org.openhab.binding.darksky.internal.model;
import java.util.List;
import org.eclipse.jdt.annotation.Nullable;
/**
* The {@link DarkSkyJsonWeatherData} is the Java class used to map the JSON response to a Dark Sky request.
*
* @author Christoph Weitkamp - Initial contribution
*/
public class DarkSkyJsonWeatherData {
private double latitude;
private double longitude;
private String timezone;
private DarkSkyCurrentlyData currently;
private DarkSkyHourlyData hourly;
private DarkSkyDailyData daily;
private @Nullable List<AlertsData> alerts;
private int offset;
public double getLatitude() {
return latitude;
}
public void setLatitude(double latitude) {
this.latitude = latitude;
}
public double getLongitude() {
return longitude;
}
public void setLongitude(double longitude) {
this.longitude = longitude;
}
public String getTimezone() {
return timezone;
}
public void setTimezone(String timezone) {
this.timezone = timezone;
}
public DarkSkyCurrentlyData getCurrently() {
return currently;
}
public void setCurrently(DarkSkyCurrentlyData currently) {
this.currently = currently;
}
public DarkSkyHourlyData getHourly() {
return hourly;
}
public void setHourly(DarkSkyHourlyData hourly) {
this.hourly = hourly;
}
public DarkSkyDailyData getDaily() {
return daily;
}
public void setDaily(DarkSkyDailyData daily) {
this.daily = daily;
}
public @Nullable List<AlertsData> getAlerts() {
return alerts;
}
public void setAlerts(List<AlertsData> alerts) {
this.alerts = alerts;
}
public int getOffset() {
return offset;
}
public void setOffset(int offset) {
this.offset = offset;
}
public class AlertsData {
public String title;
public int time;
public int expires;
public String description;
public String severity;
public String uri;
public List<String> regions;
}
}

View File

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<binding:binding id="darksky" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:binding="https://openhab.org/schemas/binding/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/binding/v1.0.0 https://openhab.org/schemas/binding-1.0.0.xsd">
<name>Dark Sky Binding</name>
<description>Dark Sky - The easiest, most advanced, weather API on the web.</description>
</binding:binding>

View File

@ -1,117 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<config-description:config-descriptions
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:config-description="https://openhab.org/schemas/config-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/config-description/v1.0.0 https://openhab.org/schemas/config-description-1.0.0.xsd">
<!-- Config for Dark Sky Binding -->
<config-description uri="bridge-type:darksky:weather-api">
<parameter name="apikey" type="text" required="true">
<context>password</context>
<label>API Key</label>
<description>API key to access the Dark Sky API.</description>
</parameter>
<parameter name="refreshInterval" type="integer" min="1" unit="min">
<label>Refresh Interval</label>
<description>Specifies the refresh interval (in minutes).</description>
<default>60</default>
</parameter>
<parameter name="language" type="text">
<label>Language</label>
<description>Language to be used by the Dark Sky API.</description>
<options>
<option value="ar">Arabic</option>
<option value="az">Azerbaijani</option>
<option value="be">Belarusian</option>
<option value="bg">Bulgarian</option>
<option value="bn">Bengali</option>
<option value="bs">Bosnian</option>
<option value="ca">Catalan</option>
<option value="cs">Czech</option>
<option value="da">Danish</option>
<option value="de">German</option>
<option value="el">Greek</option>
<option value="en">English</option>
<option value="eo">Esperanto</option>
<option value="es">Spanish</option>
<option value="et">Estonian</option>
<option value="fi">Finnish</option>
<option value="fr">French</option>
<option value="he">Hebrew</option>
<option value="hi">Hindi</option>
<option value="hr">Croatian</option>
<option value="hu">Hungarian</option>
<option value="id">Indonesian</option>
<option value="is">Icelandic</option>
<option value="it">Italian</option>
<option value="ja">Japanese</option>
<option value="ka">Georgian</option>
<option value="kn">Kannada</option>
<option value="ko">Korean</option>
<option value="kw">Cornish</option>
<option value="lv">Latvian</option>
<option value="mr">Marathi</option>
<option value="nb">Norwegian Bokmål</option>
<option value="nl">Dutch</option>
<option value="no">Norwegian Bokmål (alias for 'nb')</option>
<option value="pa">Punjabi</option>
<option value="pl">Polish</option>
<option value="pt">Portuguese</option>
<option value="ro">Romanian</option>
<option value="ru">Russian</option>
<option value="sk">Slovak</option>
<option value="sl">Slovenian</option>
<option value="sr">Serbian</option>
<option value="sv">Swedish</option>
<option value="ta">Tamil</option>
<option value="te">Telugu</option>
<option value="tet">Tetum</option>
<option value="tr">Turkish</option>
<option value="uk">Ukrainian</option>
<option value="x-pig-latin">Igpay Atinlay</option>
<option value="zh">Simplified Chinese</option>
<option value="zh-tw">Traditional Chinese</option>
</options>
</parameter>
</config-description>
<config-description uri="thing-type:darksky:weather-and-forecast">
<parameter name="location" type="text" required="true">
<context>location</context>
<label>Location of Weather</label>
<description>Location of weather in geographical coordinates (latitude/longitude/altitude).</description>
</parameter>
<parameter name="forecastHours" type="integer" min="0" max="48" step="1">
<label>Number of Hours</label>
<description>Number of hours for hourly forecast.</description>
<default>24</default>
</parameter>
<parameter name="forecastDays" type="integer" min="0" max="8" step="1">
<label>Number of Days</label>
<description>Number of days for daily forecast.</description>
<default>8</default>
</parameter>
<parameter name="numberOfAlerts" type="integer" min="0" max="8" step="1">
<label>Number of Alerts</label>
<description>Number of alerts to be shown.</description>
<default>0</default>
</parameter>
</config-description>
<config-description uri="channel-type:darksky:sunrise-sunset-event">
<parameter name="offset" type="integer" min="-1440" max="1440" unit="min">
<label>Offset</label>
<description>Moves an event forward or backward (in minutes).</description>
<default>0</default>
</parameter>
<parameter name="earliest" type="text" pattern="^([0-1][0-9]|2[0-3])(:[0-5][0-9])$">
<label>Earliest</label>
<description>The earliest time of the day for the event (in hh:mm).</description>
</parameter>
<parameter name="latest" type="text" pattern="^([0-1][0-9]|2[0-3])(:[0-5][0-9])$">
<label>Latest</label>
<description>The latest time of the day for the event (in hh:mm).</description>
</parameter>
</config-description>
</config-description:config-descriptions>

View File

@ -1,297 +0,0 @@
# binding
binding.darksky.name = Dark Sky Binding
binding.darksky.description = Dark Sky - The easiest, most advanced, weather API on the web.
# thing types
thing-type.darksky.weather-and-forecast.label = Weather and Forecast
thing-type.darksky.weather-and-forecast.description = Provides current weather and forecast data from the Dark Sky API.
thing-type.darksky.weather-and-forecast.group.forecastDay2.label = 2 Day Forecast
thing-type.darksky.weather-and-forecast.group.forecastDay2.description = This is the weather forecast in two days.
thing-type.darksky.weather-and-forecast.group.forecastDay3.label = 3 Day Forecast
thing-type.darksky.weather-and-forecast.group.forecastDay3.description = This is the weather forecast in three days.
thing-type.darksky.weather-and-forecast.group.forecastDay4.label = 4 Day Forecast
thing-type.darksky.weather-and-forecast.group.forecastDay4.description = This is the weather forecast in four days.
thing-type.darksky.weather-and-forecast.group.forecastDay5.label = 5 Day Forecast
thing-type.darksky.weather-and-forecast.group.forecastDay5.description = This is the weather forecast in five days.
thing-type.darksky.weather-and-forecast.group.forecastDay6.label = 6 Day Forecast
thing-type.darksky.weather-and-forecast.group.forecastDay6.description = This is the weather forecast in six days.
thing-type.darksky.weather-and-forecast.group.forecastDay7.label = 7 Day Forecast
thing-type.darksky.weather-and-forecast.group.forecastDay7.description = This is the weather forecast in seven days.
thing-type.darksky.weather-and-forecast.group.forecastHours01.label = 1 Hour Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours01.description = This is the weather forecast for the next hour.
thing-type.darksky.weather-and-forecast.group.forecastHours02.label = 2 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours02.description = This is the weather forecast in 2 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours03.label = 3 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours03.description = This is the weather forecast in 3 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours04.label = 4 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours04.description = This is the weather forecast in 4 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours05.label = 5 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours05.description = This is the weather forecast in 5 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours06.label = 6 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours06.description = This is the weather forecast in 6 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours07.label = 7 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours07.description = This is the weather forecast in 7 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours08.label = 8 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours08.description = This is the weather forecast in 8 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours09.label = 9 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours09.description = This is the weather forecast in 9 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours10.label = 10 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours10.description = This is the weather forecast in 10 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours11.label = 11 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours11.description = This is the weather forecast in 11 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours12.label = 12 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours12.description = This is the weather forecast in 12 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours13.label = 13 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours13.description = This is the weather forecast in 13 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours14.label = 14 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours14.description = This is the weather forecast in 14 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours15.label = 15 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours15.description = This is the weather forecast in 15 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours16.label = 16 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours16.description = This is the weather forecast in 16 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours17.label = 17 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours17.description = This is the weather forecast in 17 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours18.label = 18 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours18.description = This is the weather forecast in 18 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours19.label = 19 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours19.description = This is the weather forecast in 19 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours20.label = 20 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours20.description = This is the weather forecast in 20 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours21.label = 21 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours21.description = This is the weather forecast in 21 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours22.label = 22 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours22.description = This is the weather forecast in 22 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours23.label = 23 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours23.description = This is the weather forecast in 23 hours.
thing-type.darksky.weather-and-forecast.group.forecastHours24.label = 24 Hours Forecast
thing-type.darksky.weather-and-forecast.group.forecastHours24.description = This is the weather forecast in 24 hours.
thing-type.darksky.weather-and-forecast.group.forecastToday.label = Todays Forecast
thing-type.darksky.weather-and-forecast.group.forecastToday.description = This is the weather forecast for today.
thing-type.darksky.weather-and-forecast.group.forecastTomorrow.label = Tomorrows Forecast
thing-type.darksky.weather-and-forecast.group.forecastTomorrow.description = This is the weather forecast for tomorrow.
thing-type.darksky.weather-api.label = Dark Sky Account
thing-type.darksky.weather-api.description = Provides access to the Dark Sky API.
# thing types config
bridge-type.config.darksky.weather-api.apikey.label = API Key
bridge-type.config.darksky.weather-api.apikey.description = API key to access the Dark Sky API.
bridge-type.config.darksky.weather-api.language.label = Language
bridge-type.config.darksky.weather-api.language.description = Language to be used by the Dark Sky API.
bridge-type.config.darksky.weather-api.language.option.ar = Arabic
bridge-type.config.darksky.weather-api.language.option.az = Azerbaijani
bridge-type.config.darksky.weather-api.language.option.be = Belarusian
bridge-type.config.darksky.weather-api.language.option.bg = Bulgarian
bridge-type.config.darksky.weather-api.language.option.bn = Bengali
bridge-type.config.darksky.weather-api.language.option.bs = Bosnian
bridge-type.config.darksky.weather-api.language.option.ca = Catalan
bridge-type.config.darksky.weather-api.language.option.cs = Czech
bridge-type.config.darksky.weather-api.language.option.da = Danish
bridge-type.config.darksky.weather-api.language.option.de = German
bridge-type.config.darksky.weather-api.language.option.el = Greek
bridge-type.config.darksky.weather-api.language.option.en = English
bridge-type.config.darksky.weather-api.language.option.eo = Esperanto
bridge-type.config.darksky.weather-api.language.option.es = Spanish
bridge-type.config.darksky.weather-api.language.option.et = Estonian
bridge-type.config.darksky.weather-api.language.option.fi = Finnish
bridge-type.config.darksky.weather-api.language.option.fr = French
bridge-type.config.darksky.weather-api.language.option.he = Hebrew
bridge-type.config.darksky.weather-api.language.option.hi = Hindi
bridge-type.config.darksky.weather-api.language.option.hr = Croatian
bridge-type.config.darksky.weather-api.language.option.hu = Hungarian
bridge-type.config.darksky.weather-api.language.option.id = Indonesian
bridge-type.config.darksky.weather-api.language.option.is = Icelandic
bridge-type.config.darksky.weather-api.language.option.it = Italian
bridge-type.config.darksky.weather-api.language.option.ja = Japanese
bridge-type.config.darksky.weather-api.language.option.ka = Georgian
bridge-type.config.darksky.weather-api.language.option.kn = Kannada
bridge-type.config.darksky.weather-api.language.option.ko = Korean
bridge-type.config.darksky.weather-api.language.option.kw = Cornish
bridge-type.config.darksky.weather-api.language.option.lv = Latvian
bridge-type.config.darksky.weather-api.language.option.mr = Marathi
bridge-type.config.darksky.weather-api.language.option.nb = Norwegian Bokmål
bridge-type.config.darksky.weather-api.language.option.nl = Dutch
bridge-type.config.darksky.weather-api.language.option.no = Norwegian Bokmål (alias for 'nb')
bridge-type.config.darksky.weather-api.language.option.pa = Punjabi
bridge-type.config.darksky.weather-api.language.option.pl = Polish
bridge-type.config.darksky.weather-api.language.option.pt = Portuguese
bridge-type.config.darksky.weather-api.language.option.ro = Romanian
bridge-type.config.darksky.weather-api.language.option.ru = Russian
bridge-type.config.darksky.weather-api.language.option.sk = Slovak
bridge-type.config.darksky.weather-api.language.option.sl = Slovenian
bridge-type.config.darksky.weather-api.language.option.sr = Serbian
bridge-type.config.darksky.weather-api.language.option.sv = Swedish
bridge-type.config.darksky.weather-api.language.option.ta = Tamil
bridge-type.config.darksky.weather-api.language.option.te = Telugu
bridge-type.config.darksky.weather-api.language.option.tet = Tetum
bridge-type.config.darksky.weather-api.language.option.tr = Turkish
bridge-type.config.darksky.weather-api.language.option.uk = Ukrainian
bridge-type.config.darksky.weather-api.language.option.x-pig-latin = Igpay Atinlay
bridge-type.config.darksky.weather-api.language.option.zh = Simplified Chinese
bridge-type.config.darksky.weather-api.language.option.zh-tw = Traditional Chinese
bridge-type.config.darksky.weather-api.refreshInterval.label = Refresh Interval
bridge-type.config.darksky.weather-api.refreshInterval.description = Specifies the refresh interval (in minutes).
thing-type.config.darksky.weather-and-forecast.forecastDays.label = Number of Days
thing-type.config.darksky.weather-and-forecast.forecastDays.description = Number of days for daily forecast.
thing-type.config.darksky.weather-and-forecast.forecastHours.label = Number of Hours
thing-type.config.darksky.weather-and-forecast.forecastHours.description = Number of hours for hourly forecast.
thing-type.config.darksky.weather-and-forecast.location.label = Location of Weather
thing-type.config.darksky.weather-and-forecast.location.description = Location of weather in geographical coordinates (latitude/longitude/altitude).
thing-type.config.darksky.weather-and-forecast.numberOfAlerts.label = Number of Alerts
thing-type.config.darksky.weather-and-forecast.numberOfAlerts.description = Number of alerts to be shown.
# channel group types
channel-group-type.darksky.alerts.label = Weather Warnings
channel-group-type.darksky.alerts.description = Weather warnings issued for the requested location.
channel-group-type.darksky.current.label = Current Weather
channel-group-type.darksky.current.description = This is the current weather.
channel-group-type.darksky.dailyForecast.label = Daily Forecast
channel-group-type.darksky.dailyForecast.description = This is the 16 day / daily weather forecast.
channel-group-type.darksky.hourlyForecast.label = 3 Hour Forecast
channel-group-type.darksky.hourlyForecast.description = This is the 5 day / 3 hour weather forecast.
# channel types
channel-type.darksky.alert-description.label = Description
channel-type.darksky.alert-description.description = A detailed description of the alert.
channel-type.darksky.alert-expires.label = Expires
channel-type.darksky.alert-expires.description = The time at which the alert will expire.
channel-type.darksky.alert-expires.state.pattern = %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
channel-type.darksky.alert-issued.label = Issued
channel-type.darksky.alert-issued.description = The time at which the alert was issued.
channel-type.darksky.alert-issued.state.pattern = %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
channel-type.darksky.alert-severity.label = Severity
channel-type.darksky.alert-severity.description = The severity of the alert.
channel-type.darksky.alert-title.label = Title
channel-type.darksky.alert-title.description = A brief description of the alert.
channel-type.darksky.alert-uri.label = URI
channel-type.darksky.alert-uri.description = An external URI that one may refer to for detailed information about the alert.
channel-type.darksky.apparent-temperature.label = Apparent Temperature
channel-type.darksky.apparent-temperature.description = Current apparent temperature.
channel-type.darksky.cloudiness.label = Cloudiness
channel-type.darksky.cloudiness.description = Current cloudiness.
channel-type.darksky.condition-icon-id.label = Icon Id
channel-type.darksky.condition-icon-id.description = Id of the icon to create the URL.
channel-type.darksky.condition-icon.label = Icon
channel-type.darksky.condition-icon.description = Icon representing the weather condition.
channel-type.darksky.condition.label = Weather Condition
channel-type.darksky.condition.description = Current weather condition.
channel-type.darksky.daily-forecast-time-stamp.label = Forecast Date
channel-type.darksky.daily-forecast-time-stamp.description = Date of data forecasted.
channel-type.darksky.daily-forecast-time-stamp.state.pattern = %1$tY-%1$tm-%1$td
channel-type.darksky.forecasted-apparent-temperature.label = Forecasted Apparent Temperature
channel-type.darksky.forecasted-apparent-temperature.description = Forecasted apparent temperature.
channel-type.darksky.forecasted-atmospheric-humidity.label = Forecasted Humidity
channel-type.darksky.forecasted-atmospheric-humidity.description = Forecasted atmospheric relative humidity.
channel-type.darksky.forecasted-barometric-pressure.label = Forecasted Pressure
channel-type.darksky.forecasted-barometric-pressure.description = Forecasted barometric pressure.
channel-type.darksky.forecasted-cloudiness.label = Forecasted Cloudiness
channel-type.darksky.forecasted-cloudiness.description = Forecasted cloudiness.
channel-type.darksky.forecasted-condition.label = Forecasted Weather Condition
channel-type.darksky.forecasted-condition.description = Forecasted weather condition.
channel-type.darksky.forecasted-gust-speed.label = Forecasted Gust Speed
channel-type.darksky.forecasted-gust-speed.description = Forecasted gust speed.
channel-type.darksky.forecasted-max-apparent-temperature.label = Maximum Apparent Temperature
channel-type.darksky.forecasted-max-apparent-temperature.description = Maximum forecasted apparent temperature.
channel-type.darksky.forecasted-max-outdoor-temperature.label = Maximum Temperature
channel-type.darksky.forecasted-max-outdoor-temperature.description = Maximum forecasted outdoor temperature.
channel-type.darksky.forecasted-min-apparent-temperature.label = Minimum Apparent Temperature
channel-type.darksky.forecasted-min-apparent-temperature.description = Minimum forecasted apparent temperature.
channel-type.darksky.forecasted-min-outdoor-temperature.label = Minimum Temperature
channel-type.darksky.forecasted-min-outdoor-temperature.description = Minimum forecasted outdoor temperature.
channel-type.darksky.forecasted-outdoor-temperature.label = Forecasted Temperature
channel-type.darksky.forecasted-outdoor-temperature.description = Forecasted outdoor temperature.
channel-type.darksky.forecasted-ozone.label = Forecasted Ozone
channel-type.darksky.forecasted-ozone.description = Forecasted ozone.
channel-type.darksky.forecasted-precip-intensity.label = Forecasted Precipitation Intensity
channel-type.darksky.forecasted-precip-intensity.description = Forecasted precipitation intensity.
channel-type.darksky.forecasted-precip-probability.label = Forecasted Precipitation Probability
channel-type.darksky.forecasted-precip-probability.description = Forecasted precipitation probability.
channel-type.darksky.forecasted-precip-type.label = Forecasted Precipitation Type
channel-type.darksky.forecasted-precip-type.description = Forecasted precipitation type.
channel-type.darksky.forecasted-precip-type.state.option.rain = Rain
channel-type.darksky.forecasted-precip-type.state.option.snow = Snow
channel-type.darksky.forecasted-precip-type.state.option.sleet = Sleet
channel-type.darksky.forecasted-rain.label = Forecasted Rain Intensity
channel-type.darksky.forecasted-rain.description = Forecasted rain intensity.
channel-type.darksky.forecasted-snow.label = Forecasted Snow Intensity
channel-type.darksky.forecasted-snow.description = Forecasted snow intensity.
channel-type.darksky.forecasted-sunrise.label = Forecasted Sunrise
channel-type.darksky.forecasted-sunrise.description = Forecasted sunrise of the day.
channel-type.darksky.forecasted-sunrise.state.pattern = %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
channel-type.darksky.forecasted-sunset.label = Forecasted Sunset
channel-type.darksky.forecasted-sunset.description = Forecasted sunset of the day.
channel-type.darksky.forecasted-sunset.state.pattern = %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
channel-type.darksky.forecasted-uvindex.label = Forecasted UV Index
channel-type.darksky.forecasted-uvindex.description = Forecasted UV index.
channel-type.darksky.forecasted-visibility.label = Forecasted Visibility
channel-type.darksky.forecasted-visibility.description = Forecasted visibility.
channel-type.darksky.forecasted-wind-direction.label = Forecasted Wind Direction
channel-type.darksky.forecasted-wind-direction.description = Forecasted wind direction expressed as an angle.
channel-type.darksky.forecasted-wind-speed.label = Forecasted Wind Speed
channel-type.darksky.forecasted-wind-speed.description = Forecasted wind speed.
channel-type.darksky.gust-speed.label = Gust Speed
channel-type.darksky.gust-speed.description = Current gust speed.
channel-type.darksky.hourly-forecast-time-stamp.label = Forecast Time
channel-type.darksky.hourly-forecast-time-stamp.description = Time of data forecasted.
channel-type.darksky.hourly-forecast-time-stamp.state.pattern = %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
channel-type.darksky.ozone.label = Ozone
channel-type.darksky.ozone.description = Current ozone.
channel-type.darksky.precip-intensity.label = Precipitation Intensity
channel-type.darksky.precip-intensity.description = Current precipitation intensity.
channel-type.darksky.precip-probability.label = Precipitation Probability
channel-type.darksky.precip-probability.description = Current precipitation probability.
channel-type.darksky.precip-type.label = Precipitation Type
channel-type.darksky.precip-type.description = Current precipitation type.
channel-type.darksky.precip-type.state.option.rain = Rain
channel-type.darksky.precip-type.state.option.snow = Snow
channel-type.darksky.precip-type.state.option.sleet = Sleet
channel-type.darksky.rain.label = Rain
channel-type.darksky.rain.description = Current rain intensity.
channel-type.darksky.snow.label = Snow Intensity
channel-type.darksky.snow.description = Current snow intensity.
channel-type.darksky.sunrise-event.label = Sunrise Event
channel-type.darksky.sunrise-event.description = Event for sunrise.
channel-type.darksky.sunrise.label = Sunrise
channel-type.darksky.sunrise.description = Sunrise of the current day.
channel-type.darksky.sunrise.state.pattern = %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
channel-type.darksky.sunset-event.label = Sunset Event
channel-type.darksky.sunset-event.description = Event for sunset.
channel-type.darksky.sunset.label = Sunset
channel-type.darksky.sunset.description = Sunset of the current day.
channel-type.darksky.sunset.state.pattern = %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
channel-type.darksky.time-stamp.label = Observation Time
channel-type.darksky.time-stamp.description = Time of data observation.
channel-type.darksky.time-stamp.state.pattern = %1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS
channel-type.darksky.uvindex.label = UV Index
channel-type.darksky.uvindex.description = Current UV index.
channel-type.darksky.visibility.label = Visibility
channel-type.darksky.visibility.description = Current visibility.
# channel types config
channel-type.config.darksky.sunrise-sunset-event.earliest.label = Earliest
channel-type.config.darksky.sunrise-sunset-event.earliest.description = The earliest time of the day for the event (in hh:mm).
channel-type.config.darksky.sunrise-sunset-event.latest.label = Latest
channel-type.config.darksky.sunrise-sunset-event.latest.description = The latest time of the day for the event (in hh:mm).
channel-type.config.darksky.sunrise-sunset-event.offset.label = Offset
channel-type.config.darksky.sunrise-sunset-event.offset.description = Moves an event forward or backward (in minutes).
# thing status
offline.conf-error-missing-apikey = The 'apikey' parameter must be configured.
offline.conf-error-invalid-apikey = Invalid API key. Please see https://darksky.net/dev/docs/faq#faq-general for more info.
offline.conf-error-not-supported-refreshInterval = The 'refreshInterval' parameter must be at least 1 minute.
offline.conf-error-not-supported-language = The given 'language' parameter is not supported.
offline.conf-error-missing-location = The 'location' parameter must be configured.
offline.conf-error-parsing-location = The 'location' parameter could not be split into latitude and longitude.
offline.conf-error-not-supported-number-of-hours = The 'forecastHours' parameter must be between 0 and 120 - increment 3.
offline.conf-error-not-supported-number-of-days = The 'forecastDays' parameter must be between 0 and 16.
offline.conf-error-not-supported-number-of-alerts = The 'numberOfAlerts' parameter must be greater than 0.
# discovery result
discovery.darksky.weather-and-forecast.api.local.label = Local Weather And Forecast

View File

@ -1,297 +0,0 @@
# binding
binding.darksky.name = Dark Sky Binding
binding.darksky.description = Dark Sky - Die einfachste und fortschrittlichste Wetter-API im Web.
# thing types
thing-type.darksky.weather-and-forecast.label = Wetterinformationen
thing-type.darksky.weather-and-forecast.description = Ermöglicht die Anzeige der aktuellen Wetterinformationen und der Wettervorhersage.
thing-type.darksky.weather-and-forecast.group.forecastDay2.label = Wettervorhersage für übermorgen
thing-type.darksky.weather-and-forecast.group.forecastDay2.description = Fasst Daten der übermorgigen Wettervorhersage zusammen.
thing-type.darksky.weather-and-forecast.group.forecastDay3.label = Wettervorhersage für 3 Tage
thing-type.darksky.weather-and-forecast.group.forecastDay3.description = Fasst Daten der Wettervorhersage in drei Tagen zusammen.
thing-type.darksky.weather-and-forecast.group.forecastDay4.label = Wettervorhersage für 4 Tage
thing-type.darksky.weather-and-forecast.group.forecastDay4.description = Fasst Daten der Wettervorhersage in vier Tagen zusammen.
thing-type.darksky.weather-and-forecast.group.forecastDay5.label = Wettervorhersage für 5 Tage
thing-type.darksky.weather-and-forecast.group.forecastDay5.description = Fasst Daten der Wettervorhersage in fünf Tagen zusammen.
thing-type.darksky.weather-and-forecast.group.forecastDay6.label = Wettervorhersage für 6 Tage
thing-type.darksky.weather-and-forecast.group.forecastDay6.description = Fasst Daten der Wettervorhersage in sechs Tagen zusammen.
thing-type.darksky.weather-and-forecast.group.forecastDay7.label = Wettervorhersage für 7 Tage
thing-type.darksky.weather-and-forecast.group.forecastDay7.description = Fasst Daten der Wettervorhersage in sieben Tagen zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours01.label = Wettervorhersage für 1 Stunde
thing-type.darksky.weather-and-forecast.group.forecastHours01.description = Fasst Daten der Wettervorhersage in der nächsten Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours02.label = Wettervorhersage für 2 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours02.description = Fasst Daten der Wettervorhersage zwei Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours03.label = Wettervorhersage für 3 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours03.description = Fasst Daten der Wettervorhersage drei Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours04.label = Wettervorhersage für 4 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours04.description = Fasst Daten der Wettervorhersage in vier Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours05.label = Wettervorhersage für 5 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours05.description = Fasst Daten der Wettervorhersage in fünf Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours06.label = Wettervorhersage für 6 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours06.description = Fasst Daten der Wettervorhersage in sechs Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours07.label = Wettervorhersage für 7 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours07.description = Fasst Daten der Wettervorhersage in sieben Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours08.label = Wettervorhersage für 8 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours08.description = Fasst Daten der Wettervorhersage in acht Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours09.label = Wettervorhersage für 9 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours09.description = Fasst Daten der Wettervorhersage in neun Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours10.label = Wettervorhersage für 10 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours10.description = Fasst Daten der Wettervorhersage in zehn Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours11.label = Wettervorhersage für 11 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours11.description = Fasst Daten der Wettervorhersage in els Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours12.label = Wettervorhersage für 12 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours12.description = Fasst Daten der Wettervorhersage in zwölf Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours13.label = Wettervorhersage für 13 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours13.description = Fasst Daten der Wettervorhersage in 13 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours14.label = Wettervorhersage für 14 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours14.description = Fasst Daten der Wettervorhersage in 14 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours15.label = Wettervorhersage für 15 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours15.description = Fasst Daten der Wettervorhersage in 15 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours16.label = Wettervorhersage für 16 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours16.description = Fasst Daten der Wettervorhersage in 16 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours17.label = Wettervorhersage für 17 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours17.description = Fasst Daten der Wettervorhersage in 17 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours18.label = Wettervorhersage für 18 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours18.description = Fasst Daten der Wettervorhersage in 18 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours19.label = Wettervorhersage für 19 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours19.description = Fasst Daten der Wettervorhersage in 19 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours20.label = Wettervorhersage für 20 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours20.description = Fasst Daten der Wettervorhersage in 20 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours21.label = Wettervorhersage für 21 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours21.description = Fasst Daten der Wettervorhersage in 21 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours22.label = Wettervorhersage für 22 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours22.description = Fasst Daten der Wettervorhersage in 22 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours23.label = Wettervorhersage für 23 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours23.description = Fasst Daten der Wettervorhersage in 23 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastHours24.label = Wettervorhersage für 24 Stunden
thing-type.darksky.weather-and-forecast.group.forecastHours24.description = Fasst Daten der Wettervorhersage in 24 Stunden zusammen.
thing-type.darksky.weather-and-forecast.group.forecastToday.label = Wettervorhersage für heute
thing-type.darksky.weather-and-forecast.group.forecastToday.description = Fasst Daten der heutigen Wettervorhersage zusammen.
thing-type.darksky.weather-and-forecast.group.forecastTomorrow.label = Wettervorhersage für morgen
thing-type.darksky.weather-and-forecast.group.forecastTomorrow.description = Fasst Daten der morgigen Wettervorhersage zusammen.
thing-type.darksky.weather-api.label = Dark Sky Konto
thing-type.darksky.weather-api.description = Ermöglicht den Zugriff auf die Dark Sky API.
# thing types config
bridge-type.config.darksky.weather-api.apikey.label = API Schlüssel
bridge-type.config.darksky.weather-api.apikey.description = API Schlüssel für den Zugriff auf die Dark Sky API.
bridge-type.config.darksky.weather-api.language.label = Sprache
bridge-type.config.darksky.weather-api.language.description = Sprache zur Anzeige der Daten.
bridge-type.config.darksky.weather-api.language.option.ar = Arabisch
bridge-type.config.darksky.weather-api.language.option.az = Aserbaidschaner
bridge-type.config.darksky.weather-api.language.option.be = Belarussisch
bridge-type.config.darksky.weather-api.language.option.bg = Bulgarisch
bridge-type.config.darksky.weather-api.language.option.bn = Bengali
bridge-type.config.darksky.weather-api.language.option.bs = Bosnisch
bridge-type.config.darksky.weather-api.language.option.ca = Katalanisch
bridge-type.config.darksky.weather-api.language.option.cs = Tschechisch
bridge-type.config.darksky.weather-api.language.option.da = Dänish
bridge-type.config.darksky.weather-api.language.option.de = Deutsch
bridge-type.config.darksky.weather-api.language.option.el = Griechisch
bridge-type.config.darksky.weather-api.language.option.en = Englisch
bridge-type.config.darksky.weather-api.language.option.eo = Esperanto
bridge-type.config.darksky.weather-api.language.option.es = Spanisch
bridge-type.config.darksky.weather-api.language.option.et = Estnisch
bridge-type.config.darksky.weather-api.language.option.fi = Finnisch
bridge-type.config.darksky.weather-api.language.option.fr = Französisch
bridge-type.config.darksky.weather-api.language.option.he = Hebräisch
bridge-type.config.darksky.weather-api.language.option.hi = Hindi
bridge-type.config.darksky.weather-api.language.option.hr = Kroatisch
bridge-type.config.darksky.weather-api.language.option.hu = Ungarisch
bridge-type.config.darksky.weather-api.language.option.id = Indonesian
bridge-type.config.darksky.weather-api.language.option.is = Isländisch
bridge-type.config.darksky.weather-api.language.option.it = Italienisch
bridge-type.config.darksky.weather-api.language.option.ja = Japanisch
bridge-type.config.darksky.weather-api.language.option.ka = Georgisch
bridge-type.config.darksky.weather-api.language.option.kn = Kanadisch
bridge-type.config.darksky.weather-api.language.option.ko = Koreanisch
bridge-type.config.darksky.weather-api.language.option.kw = Kornisch
bridge-type.config.darksky.weather-api.language.option.lv = Lettisch
bridge-type.config.darksky.weather-api.language.option.mr = Marathi
bridge-type.config.darksky.weather-api.language.option.nb = Norwegischer Bokmål
bridge-type.config.darksky.weather-api.language.option.nl = Holländisch
bridge-type.config.darksky.weather-api.language.option.no = Norwegischer Bokmål (Alias für 'nb')
bridge-type.config.darksky.weather-api.language.option.pa = Punjabi
bridge-type.config.darksky.weather-api.language.option.pl = Polnisch
bridge-type.config.darksky.weather-api.language.option.pt = Portugiesisch
bridge-type.config.darksky.weather-api.language.option.ro = Rumänisch
bridge-type.config.darksky.weather-api.language.option.ru = Russisch
bridge-type.config.darksky.weather-api.language.option.sk = Slowakisch
bridge-type.config.darksky.weather-api.language.option.sl = Slowenisch
bridge-type.config.darksky.weather-api.language.option.sr = Serbisch
bridge-type.config.darksky.weather-api.language.option.sv = Schwedisch
bridge-type.config.darksky.weather-api.language.option.ta = Tamil
bridge-type.config.darksky.weather-api.language.option.te = Telugu
bridge-type.config.darksky.weather-api.language.option.tet = Tetum
bridge-type.config.darksky.weather-api.language.option.tr = Türkisch
bridge-type.config.darksky.weather-api.language.option.uk = Ukrainisch
bridge-type.config.darksky.weather-api.language.option.x-pig-latin = Igpay Atinlay
bridge-type.config.darksky.weather-api.language.option.zh = Chinesisch - Simplified
bridge-type.config.darksky.weather-api.language.option.zh-tw = Chinesisch - Traditional
bridge-type.config.darksky.weather-api.refreshInterval.label = Abfrageintervall
bridge-type.config.darksky.weather-api.refreshInterval.description = Intervall zur Abfrage der Dark Sky API (in min).
thing-type.config.darksky.weather-and-forecast.forecastDays.label = Tage
thing-type.config.darksky.weather-and-forecast.forecastDays.description = Anzahl der Tage für die Wettervorhersage.
thing-type.config.darksky.weather-and-forecast.forecastHours.label = Stunden
thing-type.config.darksky.weather-and-forecast.forecastHours.description = Anzahl der Stunden für die Wettervorhersage.
thing-type.config.darksky.weather-and-forecast.location.label = Ort der Wetterdaten
thing-type.config.darksky.weather-and-forecast.location.description = Ort der Wetterdaten in geographischen Koordinaten (Breitengrad/Längengrad/Höhe).
thing-type.config.darksky.weather-and-forecast.numberOfAlerts.label = Wetterwarnungen
thing-type.config.darksky.weather-and-forecast.numberOfAlerts.description = Anzahl der Wetterwarnungen.
# channel group types
channel-group-type.darksky.alerts.label = Wetterwarnungen
channel-group-type.darksky.alerts.description = Fasst Daten von Wetterwarnungen zusammen.
channel-group-type.darksky.current.label = Aktuelles Wetter
channel-group-type.darksky.current.description = Fasst aktuelle Wetterdaten zusammen.
channel-group-type.darksky.dailyForecast.label = Tägliche Wettervorhersage
channel-group-type.darksky.dailyForecast.description = Fasst Daten der 16 Tage / täglichen Wettervorhersage zusammen.
channel-group-type.darksky.hourlyForecast.label = 3 Stunden Wettervorhersage
channel-group-type.darksky.hourlyForecast.description = Fasst Daten der 5 Tage / 3 Stunden Wettervorhersage zusammen.
# channel types
channel-type.darksky.alert-description.label = Beschreibung
channel-type.darksky.alert-description.description = Zeigt die Beschreibung der Wetterwarnung an.
channel-type.darksky.alert-expires.label = Ablauf
channel-type.darksky.alert-expires.description = Zeigt den Zeitpunkt des Ablaufs der Wetterwarnung an.
channel-type.darksky.alert-expires.state.pattern = %1$td.%1$tm.%1$tY %1$tH\:%1$tM\:%1$tS
channel-type.darksky.alert-issued.label = Ausgegeben
channel-type.darksky.alert-issued.description = Zeigt den Zeitpunkt der Ausgabe der Wetterwarnung an.
channel-type.darksky.alert-issued.state.pattern = %1$td.%1$tm.%1$tY %1$tH\:%1$tM\:%1$tS
channel-type.darksky.alert-severity.label = Schwere
channel-type.darksky.alert-severity.description = Zeigt die Schwere der Wetterwarnung an.
channel-type.darksky.alert-title.label = Kurzbeschreibung
channel-type.darksky.alert-title.description = Zeigt die Kurzbeschreibung der Wetterwarnung an.
channel-type.darksky.alert-uri.label = Link
channel-type.darksky.alert-uri.description = Zeigt einen externen Link mit detaillierte Informationen zu der Wetterwarnung an.
channel-type.darksky.apparent-temperature.label = Gefühlte Temperatur
channel-type.darksky.apparent-temperature.description = Zeigt die gefühlte Außentemperatur an.
channel-type.darksky.cloudiness.label = Bewölkung
channel-type.darksky.cloudiness.description = Zeigt die aktuelle Bewölkung an.
channel-type.darksky.condition-icon-id.label = Icon-ID
channel-type.darksky.condition-icon-id.description = Zeigt die ID für das Icon der Wetterlage an.
channel-type.darksky.condition-icon.label = Icon
channel-type.darksky.condition-icon.description = Zeigt das Icon der Wetterlage an.
channel-type.darksky.condition.label = Wetterlage
channel-type.darksky.condition.description = Zeigt die aktuelle Wetterlage an.
channel-type.darksky.daily-forecast-time-stamp.label = Vorhersage Datum
channel-type.darksky.daily-forecast-time-stamp.description = Zeigt das Datum der Wettervorhersage an.
channel-type.darksky.daily-forecast-time-stamp.state.pattern = %1$td.%1$tm.%1$tY
channel-type.darksky.forecasted-apparent-temperature.label = Vorhergesagte Gefühlte Temperatur
channel-type.darksky.forecasted-apparent-temperature.description = Zeigt die vorhergesagte gefühlte Außentemperatur an.
channel-type.darksky.forecasted-atmospheric-humidity.label = Vorhergesagte Luftfeuchtigkeit
channel-type.darksky.forecasted-atmospheric-humidity.description = Zeigt die vorhergesagte Luftfeuchtigkeit an.
channel-type.darksky.forecasted-barometric-pressure.label = Vorhergesagter Luftdruck
channel-type.darksky.forecasted-barometric-pressure.description = Zeigt den vorhergesagten Luftdruck an.
channel-type.darksky.forecasted-cloudiness.label = Vorhergesagte Bewölkung
channel-type.darksky.forecasted-cloudiness.description = Zeigt die vorhergesagte Bewölkung an.
channel-type.darksky.forecasted-condition.label = Vorhergesagte Wetterlage
channel-type.darksky.forecasted-condition.description = Zeigt die vorhergesagte Wetterlage an.
channel-type.darksky.forecasted-gust-speed.label = Vorhergesagte Windböengeschwindigkeit
channel-type.darksky.forecasted-gust-speed.description = Zeigt die vorhergesagte Windböengeschwindigkeit an.
channel-type.darksky.forecasted-max-apparent-temperature.label = Maximale Gefühlte Temperatur
channel-type.darksky.forecasted-max-apparent-temperature.description = Zeigt die vorhergesagte maximale gefühlte Außentemperatur an.
channel-type.darksky.forecasted-max-outdoor-temperature.label = Maximale Temperatur
channel-type.darksky.forecasted-max-outdoor-temperature.description = Zeigt die vorhergesagte maximale Außentemperatur an.
channel-type.darksky.forecasted-min-apparent-temperature.label = Minimale Gefühlte Temperatur
channel-type.darksky.forecasted-min-apparent-temperature.description = Zeigt die vorhergesagte minimale gefühlte Außentemperatur an.
channel-type.darksky.forecasted-min-outdoor-temperature.label = Minimale Temperatur
channel-type.darksky.forecasted-min-outdoor-temperature.description = Zeigt die vorhergesagte minimale Außentemperatur an.
channel-type.darksky.forecasted-outdoor-temperature.label = Vorhergesagte Temperatur
channel-type.darksky.forecasted-outdoor-temperature.description = Zeigt die vorhergesagte Außentemperatur an.
channel-type.darksky.forecasted-ozone.label = Vorhergesagter Ozon-Wert
channel-type.darksky.forecasted-ozone.description = Zeigt den vorhergesagten Ozon-Wert an.
channel-type.darksky.forecasted-precip-intensity.label = Vorhergesagte Niederschlagsintensität
channel-type.darksky.forecasted-precip-intensity.description = Zeigt die vorhergesagte Niederschlagsintensität an.
channel-type.darksky.forecasted-precip-probability.label = Vorhergesagte Niederschlagswahrscheinlichkeit
channel-type.darksky.forecasted-precip-probability.description = Zeigt die vorhergesagte Niederschlagswahrscheinlichkeit an.
channel-type.darksky.forecasted-precip-type.label = Vorhergesagte Art des Niederschlages
channel-type.darksky.forecasted-precip-type.description = Zeigt die vorhergesagte Art das Niederschlages an.
channel-type.darksky.forecasted-precip-type.state.option.rain = Regen
channel-type.darksky.forecasted-precip-type.state.option.snow = Schnee
channel-type.darksky.forecasted-precip-type.state.option.sleet = Schneeregen
channel-type.darksky.forecasted-rain.label = Vorhergesagter Regen
channel-type.darksky.forecasted-rain.description = Zeigt die vorhergesagte Niederschlagsintensität für Regen an.
channel-type.darksky.forecasted-snow.label = Vorhergesagter Schnee
channel-type.darksky.forecasted-snow.description = Zeigt die vorhergesagte Niederschlagsintensität für Schnee an.
channel-type.darksky.forecasted-sunrise.label = Vorhergesagter Sonnenaufgang
channel-type.darksky.forecasted-sunrise.description = Zeigt den vorhergesagten Zeitpunkt des Sonnenaufgangs des Tages an.
channel-type.darksky.forecasted-sunrise.state.pattern = %1$td.%1$tm.%1$tY %1$tH\:%1$tM\:%1$tS
channel-type.darksky.forecasted-sunset.label = Vorhergesagter Sonnenuntergang
channel-type.darksky.forecasted-sunset.description = Zeigt den vorhergesagten Zeitpunkt des Sonnenuntergangs des Tages an.
channel-type.darksky.forecasted-sunset.state.pattern = %1$td.%1$tm.%1$tY %1$tH\:%1$tM\:%1$tS
channel-type.darksky.forecasted-uvindex.label = Vorhergesagter UV-Index
channel-type.darksky.forecasted-uvindex.description = Zeigt den vorhergesagten UV-Index an.
channel-type.darksky.forecasted-visibility.label = Vorhergesagte Sichtweite
channel-type.darksky.forecasted-visibility.description = Zeigt die vorhergesagte Sichtweite an.
channel-type.darksky.forecasted-wind-direction.label = Vorhergesagte Windrichtung
channel-type.darksky.forecasted-wind-direction.description = Zeigt die vorhergesagte Windrichtung an.
channel-type.darksky.forecasted-wind-speed.label = Vorhergesagte Windgeschwindigkeit
channel-type.darksky.forecasted-wind-speed.description = Zeigt die vorhergesagte Windgeschwindigkeit an.
channel-type.darksky.gust-speed.label = Windböengeschwindigkeit
channel-type.darksky.gust-speed.description = Zeigt die aktuelle Windböengeschwindigkeit an.
channel-type.darksky.hourly-forecast-time-stamp.label = Vorhersage Zeit
channel-type.darksky.hourly-forecast-time-stamp.description = Zeigt den Zeitpunkt der Wettervorhersage an.
channel-type.darksky.hourly-forecast-time-stamp.state.pattern = %1$td.%1$tm.%1$tY %1$tH\:%1$tM\:%1$tS
channel-type.darksky.ozone.label = Ozon-Wert
channel-type.darksky.ozone.description = Zeigt den aktuellen Ozon-Wert an.
channel-type.darksky.precip-intensity.label = Niederschlagsintensität
channel-type.darksky.precip-intensity.description = Zeigt die Niederschlagsintensität an.
channel-type.darksky.precip-probability.label = Niederschlagswahrscheinlichkeit
channel-type.darksky.precip-probability.description = Zeigt die Niederschlagswahrscheinlichkeit an.
channel-type.darksky.precip-type.label = Art des Niederschlages
channel-type.darksky.precip-type.description = Zeigt die Art des Niederschlages an.
channel-type.darksky.precip-type.state.option.rain = Regen
channel-type.darksky.precip-type.state.option.snow = Schnee
channel-type.darksky.precip-type.state.option.sleet = Schneeregen
channel-type.darksky.rain.label = Regen
channel-type.darksky.rain.description = Zeigt die Niederschlagsintensität für Regen an.
channel-type.darksky.snow.label = Schnee
channel-type.darksky.snow.description = Zeigt die Niederschlagsintensität für Schnee an.
channel-type.darksky.sunrise-event.label = Sonnenaufgang-Trigger
channel-type.darksky.sunrise-event.description = Trigger für den Sonnenaufgang.
channel-type.darksky.sunrise.label = Sonnenaufgang
channel-type.darksky.sunrise.description = Zeigt den Zeitpunkt des Sonnenaufgangs des aktuellen Tages an.
channel-type.darksky.sunrise.state.pattern = %1$td.%1$tm.%1$tY %1$tH\:%1$tM\:%1$tS
channel-type.darksky.sunset-event.label = Sonnenuntergang-Trigger
channel-type.darksky.sunset-event.description = Trigger für den Sonnenuntergang.
channel-type.darksky.sunset.label = Sonnenuntergang
channel-type.darksky.sunset.description = Zeigt den Zeitpunkt des Sonnenuntergangs des aktuellen Tages an.
channel-type.darksky.sunset.state.pattern = %1$td.%1$tm.%1$tY %1$tH\:%1$tM\:%1$tS
channel-type.darksky.time-stamp.label = Letzte Messung
channel-type.darksky.time-stamp.description = Zeigt den Zeitpunkt der letzten Messung an.
channel-type.darksky.time-stamp.state.pattern = %1$td.%1$tm.%1$tY %1$tH\:%1$tM\:%1$tS
channel-type.darksky.uvindex.label = UV-Index
channel-type.darksky.uvindex.description = Zeigt den aktuellen UV-Index an.
channel-type.darksky.visibility.label = Sichtweite
channel-type.darksky.visibility.description = Zeigt die aktuelle Sichtweite an.
# channel types config
channel-type.config.darksky.sunrise-sunset-event.earliest.label = Frühester Zeitpunkt
channel-type.config.darksky.sunrise-sunset-event.earliest.description = Frühester Zeitpunkt eines Triggers am aktuellen Tag (in hh\:mm).
channel-type.config.darksky.sunrise-sunset-event.latest.label = Spätester Zeitpunkt
channel-type.config.darksky.sunrise-sunset-event.latest.description = Spätester Zeitpunkt eines Triggers am aktuellen Tag (in hh\:mm).
channel-type.config.darksky.sunrise-sunset-event.offset.label = Verschiebung
channel-type.config.darksky.sunrise-sunset-event.offset.description = Verschiebt den Zeitpunkt eines Triggers vor oder zurück (in Minuten).
# thing status
offline.conf-error-missing-apikey = Der Parameter 'apikey' muss konfiguriert werden.
offline.conf-error-invalid-apikey = Ungültiger API Schlüssel. Mehr Infos unter https\://darksky.net/dev/docs/faq\#faq-general.
offline.conf-error-not-supported-refreshInterval = Der Parameter 'refreshInterval' muss mindestens 1 min betragen.
offline.conf-error-not-supported-language = Der angegebene Parameter 'language' wird nicht unterstützt.
offline.conf-error-missing-location = Der Parameter 'location' muss konfiguriert werden.
offline.conf-error-parsing-location = Der Parameter 'location' kann nicht in Latitude und Longitude getrennt werden.
offline.conf-error-not-supported-number-of-hours = Der Parameter 'forecastHours' muss zwischen 0 und 120 liegen - Schrittweite\: 3.
offline.conf-error-not-supported-number-of-days = Der Parameter 'forecastDays' muss zwischen 0 und 16 liegen.
offline.conf-error-not-supported-number-of-alerts = Der Parameter 'numberOfAlerts' muss größer als 0 sein.
# discovery result
discovery.darksky.weather-and-forecast.api.local.label = Lokales Wetter und Wettervorhersage

View File

@ -1,297 +0,0 @@
# binding
binding.darksky.name = Dark Sky kötés
binding.darksky.description = Dark Sky - A legkönnyebb, legfejletteb időjárás API a világhálón.
# thing types
thing-type.darksky.weather-and-forecast.label = Időjárás előrejelzés
thing-type.darksky.weather-and-forecast.description = Aktuális időjási és előrejelzési adatok a Dark Sky API segítségével.
thing-type.darksky.weather-and-forecast.group.forecastDay2.label = 2 napos előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastDay2.description = Kétnapos időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastDay3.label = 3 napos előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastDay3.description = Három napos időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastDay4.label = 4 napos előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastDay4.description = Négy napos időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastDay5.label = 5 napos előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastDay5.description = Öt napos időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastDay6.label = 6 napos előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastDay6.description = Hat napos időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastDay7.label = 7 napos előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastDay7.description = Hét napos időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours01.label = 1 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours01.description = Egy órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours02.label = 2 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours02.description = Két órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours03.label = 3 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours03.description = Három órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours04.label = 4 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours04.description = Négy órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours05.label = 5 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours05.description = Öt órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours06.label = 6 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours06.description = Hat órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours07.label = 7 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours07.description = Hét órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours08.label = 8 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours08.description = Nyolc órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours09.label = 9 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours09.description = Kilenc órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours10.label = 10 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours10.description = Tíz órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours11.label = 11 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours11.description = Tizenegy órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours12.label = 12 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours12.description = Tizenkét órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours13.label = 13 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours13.description = Tizenhárom órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours14.label = 14 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours14.description = Tizennégy órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours15.label = 15 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours15.description = Tizenöt órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours16.label = 16 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours16.description = Tizenhat órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours17.label = 17 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours17.description = Tizenhét órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours18.label = 18 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours18.description = Tizennyolc órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours19.label = 19 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours19.description = Tizenkilenc órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours20.label = 20 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours20.description = Húsz órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours21.label = 21 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours21.description = Huszonegy órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours22.label = 22 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours22.description = Huszonkét órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours23.label = 23 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours23.description = Huszonhárom órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastHours24.label = 24 órás előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastHours24.description = Huszonnégy órás időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastToday.label = Mai előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastToday.description = A mai napra érvényes időjárás előrejelzés.
thing-type.darksky.weather-and-forecast.group.forecastTomorrow.label = Holnapi előrejelzés
thing-type.darksky.weather-and-forecast.group.forecastTomorrow.description = A holnapi napra vonatkozó előrejelzés.
thing-type.darksky.weather-api.label = Dark Sky azonosító
thing-type.darksky.weather-api.description = A hozzáférési azonosító a Dark Sky API-hoz.
# thing types config
bridge-type.config.darksky.weather-api.apikey.label = API kulcs
bridge-type.config.darksky.weather-api.apikey.description = API kulcs a hozzáféréshez.
bridge-type.config.darksky.weather-api.language.label = Nyelv
bridge-type.config.darksky.weather-api.language.description = A Dark Sky API nyelve.
bridge-type.config.darksky.weather-api.language.option.ar = Arab
bridge-type.config.darksky.weather-api.language.option.az = Azerbajdzsáni
bridge-type.config.darksky.weather-api.language.option.be = Belorusz
bridge-type.config.darksky.weather-api.language.option.bg = Bolgár
bridge-type.config.darksky.weather-api.language.option.bn = Bengáli
bridge-type.config.darksky.weather-api.language.option.bs = Bosnyák
bridge-type.config.darksky.weather-api.language.option.ca = Katalán
bridge-type.config.darksky.weather-api.language.option.cs = Cseh
bridge-type.config.darksky.weather-api.language.option.da = Dán
bridge-type.config.darksky.weather-api.language.option.de = Német
bridge-type.config.darksky.weather-api.language.option.el = Görög
bridge-type.config.darksky.weather-api.language.option.en = Angol
bridge-type.config.darksky.weather-api.language.option.eo = Eszperantó
bridge-type.config.darksky.weather-api.language.option.es = Spanyol
bridge-type.config.darksky.weather-api.language.option.et = Észt
bridge-type.config.darksky.weather-api.language.option.fi = Finn
bridge-type.config.darksky.weather-api.language.option.fr = Francia
bridge-type.config.darksky.weather-api.language.option.he = Héber
bridge-type.config.darksky.weather-api.language.option.hi = Hindi
bridge-type.config.darksky.weather-api.language.option.hr = Horvát
bridge-type.config.darksky.weather-api.language.option.hu = Magyar
bridge-type.config.darksky.weather-api.language.option.id = Indonéz
bridge-type.config.darksky.weather-api.language.option.is = Izlandi
bridge-type.config.darksky.weather-api.language.option.it = Olasz
bridge-type.config.darksky.weather-api.language.option.ja = Japán
bridge-type.config.darksky.weather-api.language.option.ka = Grúz
bridge-type.config.darksky.weather-api.language.option.kn = Kanada
bridge-type.config.darksky.weather-api.language.option.ko = Koreai
bridge-type.config.darksky.weather-api.language.option.kw = Korni
bridge-type.config.darksky.weather-api.language.option.lv = Lett
bridge-type.config.darksky.weather-api.language.option.mr = Maráthi
bridge-type.config.darksky.weather-api.language.option.nb = Norvég Bokmål
bridge-type.config.darksky.weather-api.language.option.nl = Holland
bridge-type.config.darksky.weather-api.language.option.no = Norvég Bokmal ('nb' álnév)
bridge-type.config.darksky.weather-api.language.option.pa = Pandzsábi
bridge-type.config.darksky.weather-api.language.option.pl = Lengyel
bridge-type.config.darksky.weather-api.language.option.pt = Portugál
bridge-type.config.darksky.weather-api.language.option.ro = Román
bridge-type.config.darksky.weather-api.language.option.ru = Orosz
bridge-type.config.darksky.weather-api.language.option.sk = Szlovák
bridge-type.config.darksky.weather-api.language.option.sl = Szlovèn
bridge-type.config.darksky.weather-api.language.option.sr = Szerb
bridge-type.config.darksky.weather-api.language.option.sv = Svéd
bridge-type.config.darksky.weather-api.language.option.ta = Tamil
bridge-type.config.darksky.weather-api.language.option.te = Telugu
bridge-type.config.darksky.weather-api.language.option.tet = Tetum
bridge-type.config.darksky.weather-api.language.option.tr = Török
bridge-type.config.darksky.weather-api.language.option.uk = Ukrán
bridge-type.config.darksky.weather-api.language.option.x-pig-latin = Igpay Atinlay
bridge-type.config.darksky.weather-api.language.option.zh = kínai (egyszerűsített)
bridge-type.config.darksky.weather-api.language.option.zh-tw = Tradicionális Kínai
bridge-type.config.darksky.weather-api.refreshInterval.label = Frissítési gyakoriság
bridge-type.config.darksky.weather-api.refreshInterval.description = Frissítési időköz megadása (percben)
thing-type.config.darksky.weather-and-forecast.forecastDays.label = Napok száma
thing-type.config.darksky.weather-and-forecast.forecastDays.description = A napok száma a napi előrejelzésben.
thing-type.config.darksky.weather-and-forecast.forecastHours.label = Órák száma
thing-type.config.darksky.weather-and-forecast.forecastHours.description = Az órák száma az óránkénti előrejelzésben.
thing-type.config.darksky.weather-and-forecast.location.label = A időjárás helyszíne
thing-type.config.darksky.weather-and-forecast.location.description = Az időjárás földrajzi helyszíne (szélesség/hosszúság/magasság).
thing-type.config.darksky.weather-and-forecast.numberOfAlerts.label = Értesítések száma
thing-type.config.darksky.weather-and-forecast.numberOfAlerts.description = A mutatott riasztások száma.
# channel group types
channel-group-type.darksky.alerts.label = Időjárási Figyelmeztetés
channel-group-type.darksky.alerts.description = A kiadott időjárás figyelmeztetések a megadott helyen.
channel-group-type.darksky.current.label = Aktuális időjárás
channel-group-type.darksky.current.description = Aktuális időjárás.
channel-group-type.darksky.dailyForecast.label = Napi előrejelzés
channel-group-type.darksky.dailyForecast.description = A 16 napos vagy napi időárás előrejelzés.
channel-group-type.darksky.hourlyForecast.label = 3 órás előrejelzés
channel-group-type.darksky.hourlyForecast.description = A 5 napos / 3 órás időárás előrejelzés.
# channel types
channel-type.darksky.alert-description.label = Leírás
channel-type.darksky.alert-description.description = A riasztás részletes leírása.
channel-type.darksky.alert-expires.label = Lejárat
channel-type.darksky.alert-expires.description = Az értesítés érvényességének vége.
channel-type.darksky.alert-expires.state.pattern = %1$tY-%1$tm-%1$td %1$tH\:%1$tM\:%1$tS
channel-type.darksky.alert-issued.label = Kiadva
channel-type.darksky.alert-issued.description = Az értesítés érvényességének kezdete.
channel-type.darksky.alert-issued.state.pattern = %1$tY-%1$tm-%1$td %1$tH\:%1$tM\:%1$tS
channel-type.darksky.alert-severity.label = Súlyosság
channel-type.darksky.alert-severity.description = A riasztás súlyossága.
channel-type.darksky.alert-title.label = Cím
channel-type.darksky.alert-title.description = A riasztás rövid leírása.
channel-type.darksky.alert-uri.label = URI
channel-type.darksky.alert-uri.description = Külsö hivatkozás, mely a riasztás részleteit tartalmazza.
channel-type.darksky.apparent-temperature.label = Hőérzet
channel-type.darksky.apparent-temperature.description = Aktuális hőérzet.
channel-type.darksky.cloudiness.label = Felhősödés
channel-type.darksky.cloudiness.description = Az aktuális felhősödés.
channel-type.darksky.condition-icon-id.label = Ikon azonosító
channel-type.darksky.condition-icon-id.description = Az ikon azonosító at URL létrehozásához.
channel-type.darksky.condition-icon.label = Ikon
channel-type.darksky.condition-icon.description = Az időjárásra jellemző ikon.
channel-type.darksky.condition.label = Időjárás állapota
channel-type.darksky.condition.description = Aktuális időjárás állapot.
channel-type.darksky.daily-forecast-time-stamp.label = Előrejelzés időpontja
channel-type.darksky.daily-forecast-time-stamp.description = Az előrejelzés időpontja.
channel-type.darksky.daily-forecast-time-stamp.state.pattern = %1$tY-%1$tm-%1$td
channel-type.darksky.forecasted-apparent-temperature.label = Előrejelzett hőérzet
channel-type.darksky.forecasted-apparent-temperature.description = Előrejelzett hőérzet.
channel-type.darksky.forecasted-atmospheric-humidity.label = Előrejelzett páratartalom
channel-type.darksky.forecasted-atmospheric-humidity.description = Előrejelzett légköri relatív páratartalom.
channel-type.darksky.forecasted-barometric-pressure.label = Előrejelzett légnyomás
channel-type.darksky.forecasted-barometric-pressure.description = Előrejelzett légköri nyomás.
channel-type.darksky.forecasted-cloudiness.label = Előrejelzett felhősödés
channel-type.darksky.forecasted-cloudiness.description = Előrejelzett felhősödés.
channel-type.darksky.forecasted-condition.label = Előrejelzett időjárás állapotok
channel-type.darksky.forecasted-condition.description = Előrejelzett időjárás állapotok.
channel-type.darksky.forecasted-gust-speed.label = Előrejelzett széllökések
channel-type.darksky.forecasted-gust-speed.description = Előrejelzett széllökések.
channel-type.darksky.forecasted-max-apparent-temperature.label = Maximum hőérzet
channel-type.darksky.forecasted-max-apparent-temperature.description = Előrejelzett maximális hőérzet.
channel-type.darksky.forecasted-max-outdoor-temperature.label = Maximális hőmérséklet
channel-type.darksky.forecasted-max-outdoor-temperature.description = Előrejelzett maximális külső hőmérséklet.
channel-type.darksky.forecasted-min-apparent-temperature.label = Minimum hőérzet
channel-type.darksky.forecasted-min-apparent-temperature.description = Előrejelzett minimális hőérzet.
channel-type.darksky.forecasted-min-outdoor-temperature.label = Minimum hőmérséklet
channel-type.darksky.forecasted-min-outdoor-temperature.description = Előrejelzett minimális külső hőmérséklet.
channel-type.darksky.forecasted-outdoor-temperature.label = Előrejelzett hőmérséklet
channel-type.darksky.forecasted-outdoor-temperature.description = Előrejelzett külső hőmérséklet.
channel-type.darksky.forecasted-ozone.label = Előrejelzett ózonszint
channel-type.darksky.forecasted-ozone.description = Előrejelzett ózonszint.
channel-type.darksky.forecasted-precip-intensity.label = Előrejelzett csapadék intenzitás
channel-type.darksky.forecasted-precip-intensity.description = Előrejelzett csapadék intenzitás.
channel-type.darksky.forecasted-precip-probability.label = Előrejelzett csapadék valószínűség
channel-type.darksky.forecasted-precip-probability.description = Előrejelzett csapadék valószínűség.
channel-type.darksky.forecasted-precip-type.label = Előrejelzett csapadék típus
channel-type.darksky.forecasted-precip-type.description = Előrejelzett csapadék típus.
channel-type.darksky.forecasted-precip-type.state.option.rain = Eső
channel-type.darksky.forecasted-precip-type.state.option.snow =
channel-type.darksky.forecasted-precip-type.state.option.sleet = Havas eső
channel-type.darksky.forecasted-rain.label = Előrejelzett eső intenzitás
channel-type.darksky.forecasted-rain.description = Előrejelzett eső intenzitás.
channel-type.darksky.forecasted-snow.label = Előrejelzett havazás intenzitás
channel-type.darksky.forecasted-snow.description = Előrejelzett havazás intenzitás.
channel-type.darksky.forecasted-sunrise.label = Előrejelzett napkelte
channel-type.darksky.forecasted-sunrise.description = Előrejelzett napkelte.
channel-type.darksky.forecasted-sunrise.state.pattern = %1$tY-%1$tm-%1$td %1$tH\:%1$tM\:%1$tS
channel-type.darksky.forecasted-sunset.label = Előrejelzett napnyugta
channel-type.darksky.forecasted-sunset.description = Előrejelzett napnyugta.
channel-type.darksky.forecasted-sunset.state.pattern = %1$tY-%1$tm-%1$td %1$tH\:%1$tM\:%1$tS
channel-type.darksky.forecasted-uvindex.label = Előrejelzett UV index
channel-type.darksky.forecasted-uvindex.description = Előrejelzett UV index.
channel-type.darksky.forecasted-visibility.label = Előrejelzett látótávolság
channel-type.darksky.forecasted-visibility.description = Előrejelzett látótávolság.
channel-type.darksky.forecasted-wind-direction.label = Előrejelzett szélirány
channel-type.darksky.forecasted-wind-direction.description = Előrejelzett szélirány fokban mérve.
channel-type.darksky.forecasted-wind-speed.label = Előrejelzett szélsebesség
channel-type.darksky.forecasted-wind-speed.description = Előrejelzett szélsebesség.
channel-type.darksky.gust-speed.label = Széllökés
channel-type.darksky.gust-speed.description = Aktuális széllökés.
channel-type.darksky.hourly-forecast-time-stamp.label = Előrejelzés időpontja
channel-type.darksky.hourly-forecast-time-stamp.description = Az előrejelzés időpontja.
channel-type.darksky.hourly-forecast-time-stamp.state.pattern = %1$tY-%1$tm-%1$td %1$tH\:%1$tM\:%1$tS
channel-type.darksky.ozone.label = Ózon
channel-type.darksky.ozone.description = Aktuális ózonszint.
channel-type.darksky.precip-intensity.label = Csapadékintenzitás
channel-type.darksky.precip-intensity.description = Előrejelzett csapadék intenzitás.
channel-type.darksky.precip-probability.label = Csapadék valószínűség
channel-type.darksky.precip-probability.description = Aktuális csapadék valószínűség.
channel-type.darksky.precip-type.label = Csapadék típusa
channel-type.darksky.precip-type.description = Aktuális csapadék típusa.
channel-type.darksky.precip-type.state.option.rain = Eső
channel-type.darksky.precip-type.state.option.snow =
channel-type.darksky.precip-type.state.option.sleet = Havas eső
channel-type.darksky.rain.label = Eső
channel-type.darksky.rain.description = Aktuális csapadék intenzitás.
channel-type.darksky.snow.label = Havazás intenzitás
channel-type.darksky.snow.description = Aktuális havazás intenzitás.
channel-type.darksky.sunrise-event.label = Napkelte
channel-type.darksky.sunrise-event.description = Napkelte eseménye.
channel-type.darksky.sunrise.label = Napkelte
channel-type.darksky.sunrise.description = Aktuális nap napkelte.
channel-type.darksky.sunrise.state.pattern = %1$tY-%1$tm-%1$td %1$tH\:%1$tM\:%1$tS
channel-type.darksky.sunset-event.label = Napnyugta
channel-type.darksky.sunset-event.description = Napnyugta eseménye.
channel-type.darksky.sunset.label = Napnyugta
channel-type.darksky.sunset.description = Aktuális nap napnyugta.
channel-type.darksky.sunset.state.pattern = %1$tY-%1$tm-%1$td %1$tH\:%1$tM\:%1$tS
channel-type.darksky.time-stamp.label = Megfigyelési idő
channel-type.darksky.time-stamp.description = A megfigyelés időpontja.
channel-type.darksky.time-stamp.state.pattern = %1$tY-%1$tm-%1$td %1$tH\:%1$tM\:%1$tS
channel-type.darksky.uvindex.label = UV-sugárzás
channel-type.darksky.uvindex.description = Aktuális UV index.
channel-type.darksky.visibility.label = Látótávolság
channel-type.darksky.visibility.description = Aktuális látótávolság.
# channel types config
channel-type.config.darksky.sunrise-sunset-event.earliest.label = Legkorábbi
channel-type.config.darksky.sunrise-sunset-event.earliest.description = A nap legkorábbi eseménye (hh\:mm formában).
channel-type.config.darksky.sunrise-sunset-event.latest.label = Legfrissebb
channel-type.config.darksky.sunrise-sunset-event.latest.description = A nap legfrissebb eseménye (hh\:mm formában).
channel-type.config.darksky.sunrise-sunset-event.offset.label = Eltolás
channel-type.config.darksky.sunrise-sunset-event.offset.description = Az esemény eltolása előre vagy hátra (percekben).
# thing status
offline.conf-error-missing-apikey = Az 'apikey" paramétert be kell állítani.
offline.conf-error-invalid-apikey = Érvénytelen API kulcs. További információk\: https\://darksky.net/dev/docs/faq\#faq-general
offline.conf-error-not-supported-refreshInterval = A 'refreshInterval' paraméternek legalább 1 percet kell megadni.
offline.conf-error-not-supported-language = A megadott 'language' paraméter nem támogatott.
offline.conf-error-missing-location = A 'location' paramétert be kell állítani.
offline.conf-error-parsing-location = A 'location' paramétert nem lehet felosztani hosszúsági és szélességi fokra.
offline.conf-error-not-supported-number-of-hours = A 'forecastHours' paraméternek 0 és 120 között kell lennie - lépésköz\: 3.
offline.conf-error-not-supported-number-of-days = A 'forecastDays' paraméternek 0 és 16 között kell lennie.
offline.conf-error-not-supported-number-of-alerts = A 'numberOfAlerts' paraméter nagyobb legyen, mint 0.
# discovery result
discovery.darksky.weather-and-forecast.api.local.label = Helyi időjárás és előrejelzés

View File

@ -1,17 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="darksky"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<!-- Dark Sky Binding -->
<bridge-type id="weather-api">
<label>Dark Sky Account</label>
<description>Provides access to the Dark Sky API.</description>
<representation-property>apikey</representation-property>
<config-description-ref uri="bridge-type:darksky:weather-api"/>
</bridge-type>
</thing:thing-descriptions>

View File

@ -1,513 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="darksky"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<!-- Channel groups for Dark Sky Binding -->
<channel-group-type id="current">
<label>Current Weather</label>
<description>This is the current weather.</description>
<channels>
<channel id="time-stamp" typeId="time-stamp"/>
<channel id="condition" typeId="condition"/>
<channel id="icon" typeId="condition-icon"/>
<channel id="icon-id" typeId="condition-icon-id"/>
<channel id="temperature" typeId="system.outdoor-temperature"/>
<channel id="apparent-temperature" typeId="apparent-temperature"/>
<channel id="pressure" typeId="system.barometric-pressure"/>
<channel id="humidity" typeId="system.atmospheric-humidity"/>
<channel id="wind-speed" typeId="system.wind-speed"/>
<channel id="wind-direction" typeId="system.wind-direction"/>
<channel id="gust-speed" typeId="gust-speed"/>
<channel id="cloudiness" typeId="cloudiness"/>
<channel id="visibility" typeId="visibility"/>
<channel id="rain" typeId="rain"/>
<channel id="snow" typeId="snow"/>
<channel id="precip-intensity" typeId="precip-intensity"/>
<channel id="precip-probability" typeId="precip-probability"/>
<channel id="precip-type" typeId="precip-type"/>
<channel id="uvindex" typeId="uvindex"/>
<channel id="ozone" typeId="ozone"/>
<channel id="sunrise" typeId="sunrise"/>
<channel id="sunrise-event" typeId="sunrise-event"/>
<channel id="sunset" typeId="sunset"/>
<channel id="sunset-event" typeId="sunset-event"/>
</channels>
</channel-group-type>
<channel-group-type id="hourlyForecast">
<label>3 Hour Forecast</label>
<description>This is the 5 day / 3 hour weather forecast.</description>
<channels>
<channel id="time-stamp" typeId="hourly-forecast-time-stamp"/>
<channel id="condition" typeId="forecasted-condition"/>
<channel id="icon" typeId="condition-icon"/>
<channel id="icon-id" typeId="condition-icon-id"/>
<channel id="temperature" typeId="forecasted-outdoor-temperature"/>
<channel id="apparent-temperature" typeId="forecasted-apparent-temperature"/>
<channel id="pressure" typeId="forecasted-barometric-pressure"/>
<channel id="humidity" typeId="forecasted-atmospheric-humidity"/>
<channel id="wind-speed" typeId="forecasted-wind-speed"/>
<channel id="wind-direction" typeId="forecasted-wind-direction"/>
<channel id="gust-speed" typeId="forecasted-gust-speed"/>
<channel id="cloudiness" typeId="forecasted-cloudiness"/>
<channel id="visibility" typeId="forecasted-visibility"/>
<channel id="rain" typeId="forecasted-rain"/>
<channel id="snow" typeId="forecasted-snow"/>
<channel id="precip-intensity" typeId="forecasted-precip-intensity"/>
<channel id="precip-probability" typeId="forecasted-precip-probability"/>
<channel id="precip-type" typeId="forecasted-precip-type"/>
<channel id="uvindex" typeId="forecasted-uvindex"/>
<channel id="ozone" typeId="forecasted-ozone"/>
</channels>
</channel-group-type>
<channel-group-type id="dailyForecast">
<label>Daily Forecast</label>
<description>This is the 16 day / daily weather forecast.</description>
<channels>
<channel id="time-stamp" typeId="daily-forecast-time-stamp"/>
<channel id="condition" typeId="forecasted-condition"/>
<channel id="icon" typeId="condition-icon"/>
<channel id="icon-id" typeId="condition-icon-id"/>
<channel id="min-temperature" typeId="forecasted-min-outdoor-temperature"/>
<channel id="max-temperature" typeId="forecasted-max-outdoor-temperature"/>
<channel id="min-apparent-temperature" typeId="forecasted-min-apparent-temperature"/>
<channel id="max-apparent-temperature" typeId="forecasted-max-apparent-temperature"/>
<channel id="pressure" typeId="forecasted-barometric-pressure"/>
<channel id="humidity" typeId="forecasted-atmospheric-humidity"/>
<channel id="wind-speed" typeId="forecasted-wind-speed"/>
<channel id="wind-direction" typeId="forecasted-wind-direction"/>
<channel id="gust-speed" typeId="forecasted-gust-speed"/>
<channel id="cloudiness" typeId="forecasted-cloudiness"/>
<channel id="visibility" typeId="forecasted-visibility"/>
<channel id="rain" typeId="forecasted-rain"/>
<channel id="snow" typeId="forecasted-snow"/>
<channel id="precip-intensity" typeId="forecasted-precip-intensity"/>
<channel id="precip-probability" typeId="forecasted-precip-probability"/>
<channel id="precip-type" typeId="forecasted-precip-type"/>
<channel id="uvindex" typeId="forecasted-uvindex"/>
<channel id="ozone" typeId="forecasted-ozone"/>
<channel id="sunrise" typeId="forecasted-sunrise"/>
<channel id="sunset" typeId="forecasted-sunset"/>
</channels>
</channel-group-type>
<channel-group-type id="alerts">
<label>Weather Warnings</label>
<description>Weather warnings issued for the requested location.</description>
<channels>
<channel id="title" typeId="alert-title"/>
<channel id="description" typeId="alert-description"/>
<channel id="severity" typeId="alert-severity"/>
<channel id="issued" typeId="alert-issued"/>
<channel id="expires" typeId="alert-expires"/>
<channel id="uri" typeId="alert-uri"/>
</channels>
</channel-group-type>
<!-- Channels for Dark Sky Binding -->
<channel-type id="time-stamp">
<item-type>DateTime</item-type>
<label>Observation Time</label>
<description>Time of data observation.</description>
<category>Time</category>
<state readOnly="true" pattern="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"/>
</channel-type>
<channel-type id="hourly-forecast-time-stamp">
<item-type>DateTime</item-type>
<label>Forecast Time</label>
<description>Time of data forecasted.</description>
<category>Time</category>
<state readOnly="true" pattern="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"/>
</channel-type>
<channel-type id="daily-forecast-time-stamp">
<item-type>DateTime</item-type>
<label>Forecast Date</label>
<description>Date of data forecasted.</description>
<category>Time</category>
<state readOnly="true" pattern="%1$tY-%1$tm-%1$td"/>
</channel-type>
<channel-type id="condition">
<item-type>String</item-type>
<label>Weather Condition</label>
<description>Current weather condition.</description>
<category>Sun_Clouds</category>
<state readOnly="true"/>
</channel-type>
<channel-type id="forecasted-condition">
<item-type>String</item-type>
<label>Forecasted Weather Condition</label>
<description>Forecasted weather condition.</description>
<category>Sun_Clouds</category>
<state readOnly="true"/>
</channel-type>
<channel-type id="condition-icon">
<item-type>Image</item-type>
<label>Icon</label>
<description>Icon representing the weather condition.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="condition-icon-id" advanced="true">
<item-type>String</item-type>
<label>Icon Id</label>
<description>Id of the icon to create the URL.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="forecasted-outdoor-temperature">
<item-type>Number:Temperature</item-type>
<label>Forecasted Temperature</label>
<description>Forecasted outdoor temperature.</description>
<category>Temperature</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="forecasted-min-outdoor-temperature">
<item-type>Number:Temperature</item-type>
<label>Minimum Temperature</label>
<description>Minimum forecasted outdoor temperature.</description>
<category>Temperature</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="forecasted-max-outdoor-temperature">
<item-type>Number:Temperature</item-type>
<label>Maximum Temperature</label>
<description>Maximum forecasted outdoor temperature.</description>
<category>Temperature</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="apparent-temperature">
<item-type>Number:Temperature</item-type>
<label>Apparent Temperature</label>
<description>Current apparent temperature.</description>
<category>Temperature</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="forecasted-apparent-temperature">
<item-type>Number:Temperature</item-type>
<label>Forecasted Apparent Temperature</label>
<description>Forecasted apparent temperature.</description>
<category>Temperature</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="forecasted-min-apparent-temperature">
<item-type>Number:Temperature</item-type>
<label>Minimum Apparent Temperature</label>
<description>Minimum forecasted apparent temperature.</description>
<category>Temperature</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="forecasted-max-apparent-temperature">
<item-type>Number:Temperature</item-type>
<label>Maximum Apparent Temperature</label>
<description>Maximum forecasted apparent temperature.</description>
<category>Temperature</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="forecasted-barometric-pressure">
<item-type>Number:Pressure</item-type>
<label>Forecasted Pressure</label>
<description>Forecasted barometric pressure.</description>
<category>Pressure</category>
<state readOnly="true" pattern="%.3f %unit%"/>
</channel-type>
<channel-type id="forecasted-atmospheric-humidity">
<item-type>Number:Dimensionless</item-type>
<label>Forecasted Humidity</label>
<description>Forecasted atmospheric relative humidity.</description>
<category>Humidity</category>
<state readOnly="true" pattern="%.0f %%"/>
</channel-type>
<channel-type id="forecasted-wind-speed">
<item-type>Number:Speed</item-type>
<label>Forecasted Wind Speed</label>
<description>Forecasted wind speed.</description>
<category>Wind</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="forecasted-wind-direction">
<item-type>Number:Angle</item-type>
<label>Forecasted Wind Direction</label>
<description>Forecasted wind direction expressed as an angle.</description>
<category>Wind</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="gust-speed" advanced="true">
<item-type>Number:Speed</item-type>
<label>Gust Speed</label>
<description>Current gust speed.</description>
<category>Wind</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="forecasted-gust-speed" advanced="true">
<item-type>Number:Speed</item-type>
<label>Forecasted Gust Speed</label>
<description>Forecasted gust speed.</description>
<category>Wind</category>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="cloudiness">
<item-type>Number:Dimensionless</item-type>
<label>Cloudiness</label>
<description>Current cloudiness.</description>
<category>Clouds</category>
<state readOnly="true" min="0" max="100" pattern="%d %unit%"/>
</channel-type>
<channel-type id="forecasted-cloudiness">
<item-type>Number:Dimensionless</item-type>
<label>Forecasted Cloudiness</label>
<description>Forecasted cloudiness.</description>
<category>Clouds</category>
<state readOnly="true" min="0" max="100" pattern="%d %unit%"/>
</channel-type>
<channel-type id="visibility">
<item-type>Number:Length</item-type>
<label>Visibility</label>
<description>Current visibility.</description>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="forecasted-visibility">
<item-type>Number:Length</item-type>
<label>Forecasted Visibility</label>
<description>Forecasted visibility.</description>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="rain">
<item-type>Number:Speed</item-type>
<label>Rain</label>
<description>Current rain intensity.</description>
<category>Rain</category>
<state readOnly="true" pattern="%.2f mm/h"/>
</channel-type>
<channel-type id="forecasted-rain">
<item-type>Number:Speed</item-type>
<label>Forecasted Rain Intensity</label>
<description>Forecasted rain intensity.</description>
<category>Rain</category>
<state readOnly="true" pattern="%.2f mm/h"/>
</channel-type>
<channel-type id="snow">
<item-type>Number:Speed</item-type>
<label>Snow Intensity</label>
<description>Current snow intensity.</description>
<category>Snow</category>
<state readOnly="true" pattern="%.2f mm/h"/>
</channel-type>
<channel-type id="forecasted-snow">
<item-type>Number:Speed</item-type>
<label>Forecasted Snow Intensity</label>
<description>Forecasted snow intensity.</description>
<category>Snow</category>
<state readOnly="true" pattern="%.2f mm/h"/>
</channel-type>
<channel-type id="precip-intensity">
<item-type>Number:Speed</item-type>
<label>Precipitation Intensity</label>
<description>Current precipitation intensity.</description>
<state readOnly="true" pattern="%.2f mm/h"/>
</channel-type>
<channel-type id="forecasted-precip-intensity">
<item-type>Number:Speed</item-type>
<label>Forecasted Precipitation Intensity</label>
<description>Forecasted precipitation intensity.</description>
<state readOnly="true" pattern="%.2f mm/h"/>
</channel-type>
<channel-type id="precip-probability">
<item-type>Number:Dimensionless</item-type>
<label>Precipitation Probability</label>
<description>Current precipitation probability.</description>
<state readOnly="true" min="0" max="100" pattern="%d %unit%"/>
</channel-type>
<channel-type id="forecasted-precip-probability">
<item-type>Number:Dimensionless</item-type>
<label>Forecasted Precipitation Probability</label>
<description>Forecasted precipitation probability.</description>
<state readOnly="true" min="0" max="100" pattern="%d %unit%"/>
</channel-type>
<channel-type id="precip-type">
<item-type>String</item-type>
<label>Precipitation Type</label>
<description>Current precipitation type.</description>
<state readOnly="true" pattern="%s">
<options>
<option value="rain">Rain</option>
<option value="snow">Snow</option>
<option value="sleet">Sleet</option>
</options>
</state>
</channel-type>
<channel-type id="forecasted-precip-type">
<item-type>String</item-type>
<label>Forecasted Precipitation Type</label>
<description>Forecasted precipitation type.</description>
<state readOnly="true" pattern="%s">
<options>
<option value="rain">Rain</option>
<option value="snow">Snow</option>
<option value="sleet">Sleet</option>
</options>
</state>
</channel-type>
<channel-type id="uvindex">
<item-type>Number</item-type>
<label>UV Index</label>
<description>Current UV index.</description>
<state readOnly="true" pattern="%d"/>
</channel-type>
<channel-type id="forecasted-uvindex">
<item-type>Number</item-type>
<label>Forecasted UV Index</label>
<description>Forecasted UV index.</description>
<state readOnly="true" pattern="%d"/>
</channel-type>
<channel-type id="ozone">
<item-type>Number:ArealDensity</item-type>
<label>Ozone</label>
<description>Current ozone.</description>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="forecasted-ozone">
<item-type>Number:ArealDensity</item-type>
<label>Forecasted Ozone</label>
<description>Forecasted ozone.</description>
<state readOnly="true" pattern="%.1f %unit%"/>
</channel-type>
<channel-type id="sunrise">
<item-type>DateTime</item-type>
<label>Sunrise</label>
<description>Sunrise of the current day.</description>
<category>Sun</category>
<state readOnly="true" pattern="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"/>
</channel-type>
<channel-type id="forecasted-sunrise">
<item-type>DateTime</item-type>
<label>Forecasted Sunrise</label>
<description>Forecasted sunrise of the day.</description>
<category>Sun</category>
<state readOnly="true" pattern="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"/>
</channel-type>
<channel-type id="sunrise-event">
<kind>trigger</kind>
<label>Sunrise Event</label>
<description>Event for sunrise.</description>
<category>Sun</category>
<event>
<options>
<option value="START">START</option>
</options>
</event>
<config-description-ref uri="channel-type:darksky:sunrise-sunset-event"/>
</channel-type>
<channel-type id="sunset">
<item-type>DateTime</item-type>
<label>Sunset</label>
<description>Sunset of the current day.</description>
<category>Sun</category>
<state readOnly="true" pattern="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"/>
</channel-type>
<channel-type id="forecasted-sunset">
<item-type>DateTime</item-type>
<label>Forecasted Sunset</label>
<description>Forecasted sunset of the day.</description>
<category>Sun</category>
<state readOnly="true" pattern="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"/>
</channel-type>
<channel-type id="sunset-event">
<kind>trigger</kind>
<label>Sunset Event</label>
<description>Event for sunset.</description>
<category>Sun</category>
<event>
<options>
<option value="START">START</option>
</options>
</event>
<config-description-ref uri="channel-type:darksky:sunrise-sunset-event"/>
</channel-type>
<channel-type id="alert-title">
<item-type>String</item-type>
<label>Title</label>
<description>A brief description of the alert.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="alert-description">
<item-type>String</item-type>
<label>Description</label>
<description>A detailed description of the alert.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="alert-severity">
<item-type>String</item-type>
<label>Severity</label>
<description>The severity of the alert.</description>
<state readOnly="true"/>
</channel-type>
<channel-type id="alert-issued">
<item-type>DateTime</item-type>
<label>Issued</label>
<description>The time at which the alert was issued.</description>
<state readOnly="true" pattern="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"/>
</channel-type>
<channel-type id="alert-expires">
<item-type>DateTime</item-type>
<label>Expires</label>
<description>The time at which the alert will expire.</description>
<state readOnly="true" pattern="%1$tY-%1$tm-%1$td %1$tH:%1$tM:%1$tS"/>
</channel-type>
<channel-type id="alert-uri" advanced="true">
<item-type>String</item-type>
<label>URI</label>
<description>An external URI that one may refer to for detailed information about the alert.</description>
<state readOnly="true"/>
</channel-type>
</thing:thing-descriptions>

View File

@ -1,153 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<thing:thing-descriptions bindingId="darksky"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:thing="https://openhab.org/schemas/thing-description/v1.0.0"
xsi:schemaLocation="https://openhab.org/schemas/thing-description/v1.0.0 https://openhab.org/schemas/thing-description-1.0.0.xsd">
<!-- Dark Sky Binding -->
<thing-type id="weather-and-forecast">
<supported-bridge-type-refs>
<bridge-type-ref id="weather-api"/>
</supported-bridge-type-refs>
<label>Weather and Forecast</label>
<description>Provides current weather and forecast data from the Dark Sky API.</description>
<channel-groups>
<channel-group id="current" typeId="current"/>
<channel-group id="forecastHours01" typeId="hourlyForecast">
<label>1 Hour Forecast</label>
<description>This is the weather forecast for the next hour.</description>
</channel-group>
<channel-group id="forecastHours02" typeId="hourlyForecast">
<label>2 Hours Forecast</label>
<description>This is the weather forecast in 2 hours.</description>
</channel-group>
<channel-group id="forecastHours03" typeId="hourlyForecast">
<label>3 Hours Forecast</label>
<description>This is the weather forecast in 3 hours.</description>
</channel-group>
<channel-group id="forecastHours04" typeId="hourlyForecast">
<label>4 Hours Forecast</label>
<description>This is the weather forecast in 4 hours.</description>
</channel-group>
<channel-group id="forecastHours05" typeId="hourlyForecast">
<label>5 Hours Forecast</label>
<description>This is the weather forecast in 5 hours.</description>
</channel-group>
<channel-group id="forecastHours06" typeId="hourlyForecast">
<label>6 Hours Forecast</label>
<description>This is the weather forecast in 6 hours.</description>
</channel-group>
<channel-group id="forecastHours07" typeId="hourlyForecast">
<label>7 Hours Forecast</label>
<description>This is the weather forecast in 7 hours.</description>
</channel-group>
<channel-group id="forecastHours08" typeId="hourlyForecast">
<label>8 Hours Forecast</label>
<description>This is the weather forecast in 8 hours.</description>
</channel-group>
<channel-group id="forecastHours09" typeId="hourlyForecast">
<label>9 Hours Forecast</label>
<description>This is the weather forecast in 9 hours.</description>
</channel-group>
<channel-group id="forecastHours10" typeId="hourlyForecast">
<label>10 Hours Forecast</label>
<description>This is the weather forecast in 10 hours.</description>
</channel-group>
<channel-group id="forecastHours11" typeId="hourlyForecast">
<label>11 Hours Forecast</label>
<description>This is the weather forecast in 11 hours.</description>
</channel-group>
<channel-group id="forecastHours12" typeId="hourlyForecast">
<label>12 Hours Forecast</label>
<description>This is the weather forecast in 12 hours.</description>
</channel-group>
<channel-group id="forecastHours13" typeId="hourlyForecast">
<label>13 Hours Forecast</label>
<description>This is the weather forecast in 13 hours.</description>
</channel-group>
<channel-group id="forecastHours14" typeId="hourlyForecast">
<label>14 Hours Forecast</label>
<description>This is the weather forecast in 14 hours.</description>
</channel-group>
<channel-group id="forecastHours15" typeId="hourlyForecast">
<label>15 Hours Forecast</label>
<description>This is the weather forecast in 15 hours.</description>
</channel-group>
<channel-group id="forecastHours16" typeId="hourlyForecast">
<label>16 Hours Forecast</label>
<description>This is the weather forecast in 16 hours.</description>
</channel-group>
<channel-group id="forecastHours17" typeId="hourlyForecast">
<label>17 Hours Forecast</label>
<description>This is the weather forecast in 17 hours.</description>
</channel-group>
<channel-group id="forecastHours18" typeId="hourlyForecast">
<label>18 Hours Forecast</label>
<description>This is the weather forecast in 18 hours.</description>
</channel-group>
<channel-group id="forecastHours19" typeId="hourlyForecast">
<label>19 Hours Forecast</label>
<description>This is the weather forecast in 19 hours.</description>
</channel-group>
<channel-group id="forecastHours20" typeId="hourlyForecast">
<label>20 Hours Forecast</label>
<description>This is the weather forecast in 20 hours.</description>
</channel-group>
<channel-group id="forecastHours21" typeId="hourlyForecast">
<label>21 Hours Forecast</label>
<description>This is the weather forecast in 21 hours.</description>
</channel-group>
<channel-group id="forecastHours22" typeId="hourlyForecast">
<label>22 Hours Forecast</label>
<description>This is the weather forecast in 22 hours.</description>
</channel-group>
<channel-group id="forecastHours23" typeId="hourlyForecast">
<label>23 Hours Forecast</label>
<description>This is the weather forecast in 23 hours.</description>
</channel-group>
<channel-group id="forecastHours24" typeId="hourlyForecast">
<label>24 Hours Forecast</label>
<description>This is the weather forecast in 24 hours.</description>
</channel-group>
<channel-group id="forecastToday" typeId="dailyForecast">
<label>Todays Forecast</label>
<description>This is the weather forecast for today.</description>
</channel-group>
<channel-group id="forecastTomorrow" typeId="dailyForecast">
<label>Tomorrows Forecast</label>
<description>This is the weather forecast for tomorrow.</description>
</channel-group>
<channel-group id="forecastDay2" typeId="dailyForecast">
<label>2 Day Forecast</label>
<description>This is the weather forecast in two days.</description>
</channel-group>
<channel-group id="forecastDay3" typeId="dailyForecast">
<label>3 Day Forecast</label>
<description>This is the weather forecast in three days.</description>
</channel-group>
<channel-group id="forecastDay4" typeId="dailyForecast">
<label>4 Day Forecast</label>
<description>This is the weather forecast in four days.</description>
</channel-group>
<channel-group id="forecastDay5" typeId="dailyForecast">
<label>5 Day Forecast</label>
<description>This is the weather forecast in five days.</description>
</channel-group>
<channel-group id="forecastDay6" typeId="dailyForecast">
<label>6 Day Forecast</label>
<description>This is the weather forecast in six days.</description>
</channel-group>
<channel-group id="forecastDay7" typeId="dailyForecast">
<label>7 Day Forecast</label>
<description>This is the weather forecast in seven days.</description>
</channel-group>
</channel-groups>
<representation-property>location</representation-property>
<config-description-ref uri="thing-type:darksky:weather-and-forecast"/>
</thing-type>
</thing:thing-descriptions>

View File

@ -93,7 +93,6 @@
<module>org.openhab.binding.daikin</module>
<module>org.openhab.binding.dali</module>
<module>org.openhab.binding.danfossairunit</module>
<module>org.openhab.binding.darksky</module>
<module>org.openhab.binding.dbquery</module>
<module>org.openhab.binding.deconz</module>
<module>org.openhab.binding.denonmarantz</module>