diff --git a/bundles/org.openhab.binding.windcentrale/src/main/java/org/openhab/binding/windcentrale/internal/config/MillConfig.java b/bundles/org.openhab.binding.windcentrale/src/main/java/org/openhab/binding/windcentrale/internal/config/MillConfig.java index cc47a05fa89..fefe629c5bf 100644 --- a/bundles/org.openhab.binding.windcentrale/src/main/java/org/openhab/binding/windcentrale/internal/config/MillConfig.java +++ b/bundles/org.openhab.binding.windcentrale/src/main/java/org/openhab/binding/windcentrale/internal/config/MillConfig.java @@ -17,7 +17,7 @@ import org.eclipse.jdt.annotation.NonNullByDefault; /** * The configuration of a Mill thing. * - * @author Wouter Born - Add Mill configuration object + * @author Wouter Born - Initial contribution, add Mill configuration object */ @NonNullByDefault public class MillConfig { diff --git a/bundles/org.openhab.binding.windcentrale/src/main/java/org/openhab/binding/windcentrale/internal/handler/WindcentraleHandler.java b/bundles/org.openhab.binding.windcentrale/src/main/java/org/openhab/binding/windcentrale/internal/handler/WindcentraleHandler.java index 03cd2dcc4c2..81562f2d468 100644 --- a/bundles/org.openhab.binding.windcentrale/src/main/java/org/openhab/binding/windcentrale/internal/handler/WindcentraleHandler.java +++ b/bundles/org.openhab.binding.windcentrale/src/main/java/org/openhab/binding/windcentrale/internal/handler/WindcentraleHandler.java @@ -109,9 +109,10 @@ public class WindcentraleHandler extends BaseThingHandler { @Override public void dispose() { logger.debug("Disposing Windcentrale handler '{}'", getThing().getUID()); + final ScheduledFuture pollingJob = this.pollingJob; if (pollingJob != null) { pollingJob.cancel(true); - pollingJob = null; + this.pollingJob = null; } } @@ -159,7 +160,7 @@ public class WindcentraleHandler extends BaseThingHandler { } catch (final RuntimeException e) { logger.debug("Failed to process windmill data", e); updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.OFFLINE.COMMUNICATION_ERROR, - "Failed to process mill data"); + "@text/offline.mill-data-error"); } } } diff --git a/bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale.properties b/bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale.properties new file mode 100644 index 00000000000..e2b38a1a05a --- /dev/null +++ b/bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale.properties @@ -0,0 +1,45 @@ +# binding + +binding.windcentrale.name = Windcentrale Binding +binding.windcentrale.description = Binding for Windcentrale windmills + +# thing types + +thing-type.windcentrale.mill.label = Windcentrale Windmill + +# thing types config + +thing-type.config.windcentrale.mill.millId.label = Windmill +thing-type.config.windcentrale.mill.millId.option.1 = De Grote Geert +thing-type.config.windcentrale.mill.millId.option.2 = De Jonge Held +thing-type.config.windcentrale.mill.millId.option.31 = Het Rode Hert +thing-type.config.windcentrale.mill.millId.option.41 = De Ranke Zwaan +thing-type.config.windcentrale.mill.millId.option.51 = De Witte Juffer +thing-type.config.windcentrale.mill.millId.option.111 = De Bonte Hen +thing-type.config.windcentrale.mill.millId.option.121 = De Trouwe Wachter +thing-type.config.windcentrale.mill.millId.option.131 = De Blauwe Reiger +thing-type.config.windcentrale.mill.millId.option.141 = De Vier Winden +thing-type.config.windcentrale.mill.millId.option.201 = De Boerenzwaluw +thing-type.config.windcentrale.mill.refreshInterval.label = Refresh Interval +thing-type.config.windcentrale.mill.refreshInterval.description = Refresh interval for refreshing the data in seconds +thing-type.config.windcentrale.mill.wd.label = Wind Shares +thing-type.config.windcentrale.mill.wd.description = Number of wind shares ("Winddelen") + +# channel types + +channel-type.windcentrale.kwh.label = Energy +channel-type.windcentrale.kwhForecast.label = Energy Forecast +channel-type.windcentrale.powerAbsTot.label = Total Power +channel-type.windcentrale.powerAbsWd.label = Wind Shares Power +channel-type.windcentrale.powerRel.label = Relative Power +channel-type.windcentrale.runPercentage.label = Run Percentage +channel-type.windcentrale.runPercentage.description = Run percentage this year +channel-type.windcentrale.runTime.label = Run Time +channel-type.windcentrale.runTime.description = Run time this year +channel-type.windcentrale.timestamp.label = Last Updated +channel-type.windcentrale.windDirection.label = Wind Direction +channel-type.windcentrale.windSpeed.label = Wind Speed + +# status messages + +offline.mill-data-error = Failed to process mill data diff --git a/bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale_nl.properties b/bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale_nl.properties index 8e4a355dbb0..a11c948b43e 100644 --- a/bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale_nl.properties +++ b/bundles/org.openhab.binding.windcentrale/src/main/resources/OH-INF/i18n/windcentrale_nl.properties @@ -4,6 +4,17 @@ binding.windcentrale.description = Binding voor Windcentrale windmolens # thing types thing-type.windcentrale.mill.label = Windcentrale windmolen +thing-type.config.windcentrale.mill.millId.option.1 = De Grote Geert +thing-type.config.windcentrale.mill.millId.option.2 = De Jonge Held +thing-type.config.windcentrale.mill.millId.option.31 = Het Rode Hert +thing-type.config.windcentrale.mill.millId.option.41 = De Ranke Zwaan +thing-type.config.windcentrale.mill.millId.option.51 = De Witte Juffer +thing-type.config.windcentrale.mill.millId.option.111 = De Bonte Hen +thing-type.config.windcentrale.mill.millId.option.121 = De Trouwe Wachter +thing-type.config.windcentrale.mill.millId.option.131 = De Blauwe Reiger +thing-type.config.windcentrale.mill.millId.option.141 = De Vier Winden +thing-type.config.windcentrale.mill.millId.option.201 = De Boerenzwaluw + thing-type.config.windcentrale.mill.millId.label = Windmolen thing-type.config.windcentrale.mill.wd.label = Aantal Winddelen thing-type.config.windcentrale.mill.wd.description = Aantal Winddelen in bezit @@ -23,3 +34,7 @@ channel.windcentrale.runPercentage.description = Molen productie percentage dit channel.windcentrale.runTime.label = Molen productietijd channel.windcentrale.runTime.description = Molen productietijd dit jaar channel.windcentrale.timestamp.label = Ververs tijdstip + +# status messages + +offline.mill-data-error = Fout bij het verwerken van de molen data