diff --git a/CODEOWNERS b/CODEOWNERS index cd1b632cee610..0695633dedf0f 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -155,6 +155,7 @@ /bundles/org.openhab.binding.rotel/ @lolodomo /bundles/org.openhab.binding.rotelra1x/ @fa2k /bundles/org.openhab.binding.russound/ @tmrobert8 +/bundles/org.openhab.binding.sagercaster/ @clinique /bundles/org.openhab.binding.samsungtv/ @paulianttila /bundles/org.openhab.binding.satel/ @druciak /bundles/org.openhab.binding.seneye/ @nikotanghe diff --git a/bom/openhab-addons/pom.xml b/bom/openhab-addons/pom.xml index bb421c340be26..1e64a7e92ebfb 100644 --- a/bom/openhab-addons/pom.xml +++ b/bom/openhab-addons/pom.xml @@ -769,6 +769,11 @@ org.openhab.binding.russound ${project.version} + + org.openhab.addons.bundles + org.openhab.binding.sagercaster + ${project.version} + org.openhab.addons.bundles org.openhab.binding.samsungtv diff --git a/bundles/org.openhab.binding.sagercaster/.classpath b/bundles/org.openhab.binding.sagercaster/.classpath new file mode 100644 index 0000000000000..cd04a794bfd47 --- /dev/null +++ b/bundles/org.openhab.binding.sagercaster/.classpath @@ -0,0 +1,32 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/bundles/org.openhab.binding.sagercaster/.project b/bundles/org.openhab.binding.sagercaster/.project new file mode 100644 index 0000000000000..d99f2cb8fd9c1 --- /dev/null +++ b/bundles/org.openhab.binding.sagercaster/.project @@ -0,0 +1,23 @@ + + + org.openhab.binding.sagercaster + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.m2e.core.maven2Builder + + + + + + org.eclipse.jdt.core.javanature + org.eclipse.m2e.core.maven2Nature + + diff --git a/bundles/org.openhab.binding.sagercaster/NOTICE b/bundles/org.openhab.binding.sagercaster/NOTICE new file mode 100644 index 0000000000000..4c20ef446c1e4 --- /dev/null +++ b/bundles/org.openhab.binding.sagercaster/NOTICE @@ -0,0 +1,13 @@ +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/openhab2-addons diff --git a/bundles/org.openhab.binding.sagercaster/README.md b/bundles/org.openhab.binding.sagercaster/README.md new file mode 100644 index 0000000000000..485b76918219b --- /dev/null +++ b/bundles/org.openhab.binding.sagercaster/README.md @@ -0,0 +1,93 @@ +# Sager Weathercaster Binding + +The Sager Weathercaster is a scientific instrument for accurate prediction of the weather. + +## Limitations + +* To operate, this binding will need to use channel values provided by other means (e.g. Weather Binding, Netatmo, a 1-Wire personal weather station...) + +* This binding buffers readings for some hours before producing weather forecasts(wind direction and sea level pressure). SagerWeatherCaster needs an observation period of minimum 6 hours. + +For these reasons, this binding is not a binding in the usual sense. + +## Discovery + +A default `sagercaster` thing will be automatically discovered, based on system location. + +## Binding Configuration + +The binding itself does not require any configuration. + +## Thing Configuration + +### SagerCaster + +| Name | Type | Description | +|--------------------|----------|--------------------------------------------------------------------------| +| location | Location | Latitude and longitude of the desired weather forecast. | +| observation-period | int | Minimum delay (in hours) before producing forecasts. Defaulted to 6. | + +## Channels + +The binding will use some input channels, that can be configured directly with profiles (sample below). + +| Name | Group |Type | Description | +|---------------------|--------|---------------------|-----------------------------------------------------------------| +| is-raining (*) | input |Switch | On if it is raining, else Off. | +| rain-qtty (*) | input |Number | Any value that give indication of a current rain volume | +| or | input |Number:Speed | Any value that give indication of a current rain volume eg mm/h | +| or | input |Number:Length | Any value that give indication of a current rain volume eg mm | +| cloudiness | input |Number:Dimensionless | Cloud cover percentage | +| wind-speed-beaufort | input |Number | Wind speed expressed using the Beaufort scale | +| pressure | input |Number:Pressure | Sea level pressure | +| wind-angle | input |Number:Angle | Wind direction | +| forecast | output |String | Description of the weather forecast | +| velocity | output |String | Description of the expected wind evolution | +| velocity-beaufort | output |Number | Expected wind evolution using the Beaufort scale | +| wind-from | output |String | Expected wind orientation | +| wind-to | output |String | Evolution of the expected wind orientation | +| wind-evolution | output |String | Wind orientation evolution over observation period | +| pressure-trend | output |String | Pressure evolution over observation period | +| temperature-trend | output |String | Temperature evolution over observation period | + +(*) You may use either is-raining, either rain-qtty depending upon the data available in your system. + +## Full Example + +### Things + +``` +sagercaster:sagercaster:triel "Sager Triel" @ "Outside" [location="48,2"] +``` + +### Items + +Input channel can be updated via profiles in versions of OH > 2.4. + +``` +Number:Pressure NWS_Abs_Pressure "Pression absolue" {channel="netatmo:NAMain:home:insidews:AbsolutePressure", channel="sagercaster:sagercaster:triel:input#pressure" [profile="follow"]} +Number:Angle NWS_wind_angle "Orientation [%d°]" {channel="netatmo:NAModule2:home:anemometre:WindAngle", channel="sagercaster:sagercaster:triel:input#wind-angle" [profile="follow"]} +Number:Dimensionless OWM_Cloudiness "Cloudiness [%d %unit%]" {channel="openweathermap:weather-and-forecast:api:local:current#cloudiness", channel="sagercaster:sagercaster:triel:input#cloudiness" [profile="follow"] } +Number Synop_beaufort "Beaufort [%d]" {channel="synopanalyzer:synopanalyzer:orly:wind-speed-beaufort", channel="sagercaster:sagercaster:triel:input#wind-speed-beaufort" [profile="follow"] } +Number:Length NWS_rain_1h "Précipitation 1h [%.2f %unit%]" {channel="netatmo:NAModule3:home:pluviometre:SumRain1", channel="sagercaster:sagercaster:triel:input#rain-qtty" [profile="follow"]} + + +``` + +Here is the definition of output channels + +``` + +// Items directly derived from inputs +String SWC_windevolution "Wind Evolution" (gSager) {channel="sagercaster:sagercaster:triel:output#wind-evolution"} +String SWC_presstrend "Pressure Trend" (gSager) {channel="sagercaster:sagercaster:triel:output#pressure-trend"} + +// SagerWeatherCaster Forecast Items +String SWC_forecast "Weather Forecast" (gSager) {channel="sagercaster:sagercaster:triel:output#forecast"} +String SWC_velocity "Wind Velocity" (gSager) {channel="sagercaster:sagercaster:triel:output#velocity"} +String SWC_windfrom "Wind from" (gSager) {channel="sagercaster:sagercaster:triel:output#wind-from"} + +DateTime SWC_ObservationTime "Timestamp [%1$tH:%1$tM]"