BridgeConfiguration config = getConfigAs(BridgeConfiguration.class);
if (config.apikey.isEmpty()) {
updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.CONFIGURATION_ERROR,
- "Parameter 'apikey' must be configured.");
+ "@text/offline.config-error-unknown-apikey");
return;
}
header.put("x-access-token", config.apikey);
LocalDate tomorrow = today.plusDays(1);
LocalDateTime tomorrowMidnight = tomorrow.atStartOfDay().plusMinutes(2);
- String message = "Quota Exceeded, going OFFLINE for today, will retry at : "
- + tomorrowMidnight.toString();
- updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, message);
+ updateStatus(ThingStatus.OFFLINE, ThingStatusDetail.COMMUNICATION_ERROR, String
+ .format("@text/offline.comm-error-quota-exceeded [ \"%s\" ]", tomorrowMidnight.toString()));
reconnectJob = scheduler.schedule(this::initiateConnexion,
Duration.between(LocalDateTime.now(), tomorrowMidnight).toMinutes(), TimeUnit.MINUTES);
--- /dev/null
+# binding
+
+binding.openuv.name = OpenUV Binding
+binding.openuv.description = Global Real-Time UV Index Forecast API
+
+# thing types
+
+thing-type.openuv.openuvapi.label = Open UV API
+thing-type.openuv.openuvapi.description = Bridge to the OpenUV Project API. In order to receive the data, you must register an account on https://www.openuv.io/auth/google and get your API token.
+thing-type.openuv.uvreport.label = UV Report
+thing-type.openuv.uvreport.description = Provides various UV data from the OpenUV Project for a given location.
+
+# thing types config
+
+thing-type.config.openuv.openuvapi.apikey.label = API Key
+thing-type.config.openuv.openuvapi.apikey.description = Data-platform token to access the OpenUV API service
+thing-type.config.openuv.uvreport.location.label = Location
+thing-type.config.openuv.uvreport.location.description = Your geo coordinates separated with comma (e.g. "37.8,-122.4,177").
+thing-type.config.openuv.uvreport.refresh.label = Refresh Interval
+thing-type.config.openuv.uvreport.refresh.description = Specifies the refresh interval in minutes.
+
+# channel types
+
+channel-type.openuv.Alert.label = UV Alert
+channel-type.openuv.Alert.state.option.0 = Low
+channel-type.openuv.Alert.state.option.1 = Medium
+channel-type.openuv.Alert.state.option.2 = High
+channel-type.openuv.Alert.state.option.3 = Very high
+channel-type.openuv.Alert.state.option.4 = Extreme
+channel-type.openuv.Ozone.label = Ozone
+channel-type.openuv.Ozone.description = Ozone level from OMI data
+channel-type.openuv.SafeExposure.label = Safe Exposure
+channel-type.openuv.SafeExposure.description = Safe exposure duration for Fitzpatrick Skin Types.
+channel-type.openuv.UVColor.label = Alert Color
+channel-type.openuv.UVColor.description = Color associated to given UV Index alert level.
+channel-type.openuv.UVIndex.label = UV Index
+channel-type.openuv.UVIndex.description = UV Index
+channel-type.openuv.UVMax.label = UV Max
+channel-type.openuv.UVMax.description = Max UV Index for the day (at solar noon)
+channel-type.openuv.UVMaxEvent.label = UV Max Event
+channel-type.openuv.UVMaxEvent.description = Triggers when current UV Index reaches maximum of the day
+channel-type.openuv.elevation.label = Elevation
+channel-type.openuv.elevation.description = The elevation of the sun (should FOLLOW appropriate item).
+channel-type.openuv.timestamp.label = Timestamp
+channel-type.openuv.timestamp.state.pattern = %1$tF %1$tR
+
+# channel types config
+
+channel-type.config.openuv.SafeExposure.index.label = Skin Type
+channel-type.config.openuv.SafeExposure.index.description = Fitzpatrick Skin Type.
+channel-type.config.openuv.SafeExposure.index.option.I = Pale
+channel-type.config.openuv.SafeExposure.index.option.II = White
+channel-type.config.openuv.SafeExposure.index.option.III = Light brown
+channel-type.config.openuv.SafeExposure.index.option.IV = Moderate brown
+channel-type.config.openuv.SafeExposure.index.option.V = Dark brown
+channel-type.config.openuv.SafeExposure.index.option.VI = Black
+
+# Thing status descriptions
+
+offline.config-error-unknown-apikey = Parameter 'apikey' must be configured.
+offline.config-error-invalid-refresh = Parameter 'refresh' must be higher than 3 minutes to stay in free API plan.
+offline.comm-error-quota-exceeded = Quota Exceeded, going OFFLINE for today, will retry at : {0}
+
+# Discovery result
+
+discovery.openuv.uvreport.local.label = Local UV Report