diff --git a/bundles/org.openhab.binding.energidataservice/README.md b/bundles/org.openhab.binding.energidataservice/README.md index 4e01640c8cbef..ae87d29756d32 100644 --- a/bundles/org.openhab.binding.energidataservice/README.md +++ b/bundles/org.openhab.binding.energidataservice/README.md @@ -39,14 +39,14 @@ To obtain the Global Location Number of your grid company: ### Channel Group `electricity` -| Channel | Type | Description | Advanced | -|------------------------------|--------|------------------------------------------------------------------------------------------------|----------| -| currentSpotPrice | Number | Spot price in DKK or EUR per kWh for current hour | no | -| currentNetTariff | Number | Net tariff in DKK per kWh for current hour. Only available when `gridCompanyGLN` is configured | no | -| currentSystemTariff | Number | System tariff in DKK per kWh for current hour | no | -| currentElectricityTax | Number | Electricity tax in DKK per kWh for current hour | no | -| currentTransmissionNetTariff | Number | Transmission net tariff in DKK per kWh for current hour | no | -| hourlyPrices | String | JSON array with hourly prices from 12 hours ago and onward | yes | +| Channel | Type | Description | Advanced | +|---------------------------------|--------|------------------------------------------------------------------------------------------------|----------| +| current-spot-price | Number | Spot price in DKK or EUR per kWh for current hour | no | +| current-net-tariff | Number | Net tariff in DKK per kWh for current hour. Only available when `gridCompanyGLN` is configured | no | +| current-system-tariff | Number | System tariff in DKK per kWh for current hour | no | +| current-electricity-tax | Number | Electricity tax in DKK per kWh for current hour | no | +| current-transmission-net-tariff | Number | Transmission net tariff in DKK per kWh for current hour | no | +| hourly-prices | String | JSON array with hourly prices from 12 hours ago and onward | yes | _Please note:_ There is no channel providing the total price. Instead, create a group item with `SUM` as aggregate function and add the individual price items as children. @@ -65,11 +65,11 @@ Once installed, simply select "Value-Added Tax" as Profile when linking an item. #### Current Net Tariff -Discounts are automatically taken into account for channel `currentNetTariff` so that it represents the actual price. +Discounts are automatically taken into account for channel `current-net-tariff` so that it represents the actual price. The tariffs are downloaded using pre-configured filters for the different [Grid Company GLN's](#global-location-number-of-the-grid-company). If your company is not in the list, or the filters are not working, they can be manually overridden. -To override filters, the channel `currentNetTariff` has the following configuration parameters: +To override filters, the channel `current-net-tariff` has the following configuration parameters: | Name | Type | Description | Default | Required | Advanced | |-----------------|---------|----------------------------------------------------------------------------------------------------------------------------|---------|----------|----------| @@ -102,7 +102,7 @@ _Nord Energi Net:_ #### Hourly Prices -The format of the `hourlyPrices` JSON array is as follows: +The format of the `hourly-prices` JSON array is as follows: ```json [ @@ -132,14 +132,14 @@ Historic prices older than 12 hours are removed from the JSON array each hour. ## Thing Actions -Thing actions can be used to perform calculations as well as import prices directly into rules without deserializing JSON from the [hourlyPrices](#hourly-prices) channel. +Thing actions can be used to perform calculations as well as import prices directly into rules without deserializing JSON from the [hourly-prices](#hourly-prices) channel. This is more convenient, much faster, and provides automatic summation of the price elements of interest. Actions use cached data for performing operations. Since data is only fetched when an item is linked to a channel, there might not be any cached data available. In this case the data will be fetched on demand and cached afterwards. The first action triggered on a given day may therefore be a bit slower, and is also prone to failing if the server call fails for any reason. -This potential problem can be prevented by linking the indivial channels to items, or by linking the `hourlyPrices` channel to an item. +This potential problem can be prevented by linking the indivial channels to items, or by linking the `hourly-prices` channel to an item. ### `calculateCheapestPeriod` @@ -325,12 +325,12 @@ Thing energidataservice:service:energidataservice "Energi Data Service" [ priceA ```java Group:Number:SUM CurrentTotalPrice "Current Total Price" -Number CurrentSpotPrice "Current Spot Price" (CurrentTotalPrice) { channel="energidataservice:service:energidataservice:electricity#currentSpotPrice" [profile="transform:VAT"] } -Number CurrentNetTariff "Current Net Tariff" (CurrentTotalPrice) { channel="energidataservice:service:energidataservice:electricity#currentNetTariff" [profile="transform:VAT"] } -Number CurrentSystemTariff "Current System Tariff" (CurrentTotalPrice) { channel="energidataservice:service:energidataservice:electricity#currentSystemTariff" [profile="transform:VAT"] } -Number CurrentElectricityTax "Current Electricity Tax" (CurrentTotalPrice) { channel="energidataservice:service:energidataservice:electricity#currentElectricityTax" [profile="transform:VAT"] } -Number CurrentTransmissionNetTariff "Current Transmission Tariff" (CurrentTotalPrice) { channel="energidataservice:service:energidataservice:electricity#currentTransmissionNetTariff" [profile="transform:VAT"] } -String HourlyPrices "Hourly Prices" { channel="energidataservice:service:energidataservice:electricity#hourlyPrices" } +Number CurrentSpotPrice "Current Spot Price" (CurrentTotalPrice) { channel="energidataservice:service:energidataservice:electricity#current-spot-price" [profile="transform:VAT"] } +Number CurrentNetTariff "Current Net Tariff" (CurrentTotalPrice) { channel="energidataservice:service:energidataservice:electricity#current-net-tariff" [profile="transform:VAT"] } +Number CurrentSystemTariff "Current System Tariff" (CurrentTotalPrice) { channel="energidataservice:service:energidataservice:electricity#current-system-tariff" [profile="transform:VAT"] } +Number CurrentElectricityTax "Current Electricity Tax" (CurrentTotalPrice) { channel="energidataservice:service:energidataservice:electricity#current-electricity-tax" [profile="transform:VAT"] } +Number CurrentTransmissionNetTariff "Current Transmission Tariff" (CurrentTotalPrice) { channel="energidataservice:service:energidataservice:electricity#current-transmission-net-tariff" [profile="transform:VAT"] } +String HourlyPrices "Hourly Prices" { channel="energidataservice:service:energidataservice:electricity#hourly-prices" } ``` ### Thing Actions Example diff --git a/bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/EnergiDataServiceBindingConstants.java b/bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/EnergiDataServiceBindingConstants.java index 38358f0c03343..482c70ff6d37d 100644 --- a/bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/EnergiDataServiceBindingConstants.java +++ b/bundles/org.openhab.binding.energidataservice/src/main/java/org/openhab/binding/energidataservice/internal/EnergiDataServiceBindingConstants.java @@ -41,17 +41,17 @@ public class EnergiDataServiceBindingConstants { // List of all Channel ids public static final String CHANNEL_CURRENT_SPOT_PRICE = CHANNEL_GROUP_ELECTRICITY - + ChannelUID.CHANNEL_GROUP_SEPARATOR + "currentSpotPrice"; + + ChannelUID.CHANNEL_GROUP_SEPARATOR + "current-spot-price"; public static final String CHANNEL_CURRENT_NET_TARIFF = CHANNEL_GROUP_ELECTRICITY - + ChannelUID.CHANNEL_GROUP_SEPARATOR + "currentNetTariff"; + + ChannelUID.CHANNEL_GROUP_SEPARATOR + "current-net-tariff"; public static final String CHANNEL_CURRENT_SYSTEM_TARIFF = CHANNEL_GROUP_ELECTRICITY - + ChannelUID.CHANNEL_GROUP_SEPARATOR + "currentSystemTariff"; + + ChannelUID.CHANNEL_GROUP_SEPARATOR + "current-system-tariff"; public static final String CHANNEL_CURRENT_ELECTRICITY_TAX = CHANNEL_GROUP_ELECTRICITY - + ChannelUID.CHANNEL_GROUP_SEPARATOR + "currentElectricityTax"; + + ChannelUID.CHANNEL_GROUP_SEPARATOR + "current-electricity-tax"; public static final String CHANNEL_CURRENT_TRANSMISSION_NET_TARIFF = CHANNEL_GROUP_ELECTRICITY - + ChannelUID.CHANNEL_GROUP_SEPARATOR + "currentTransmissionNetTariff"; + + ChannelUID.CHANNEL_GROUP_SEPARATOR + "current-transmission-net-tariff"; public static final String CHANNEL_HOURLY_PRICES = CHANNEL_GROUP_ELECTRICITY + ChannelUID.CHANNEL_GROUP_SEPARATOR - + "hourlyPrices"; + + "hourly-prices"; public static final Set ELECTRICITY_CHANNELS = Set.of(CHANNEL_CURRENT_SPOT_PRICE, CHANNEL_CURRENT_NET_TARIFF, CHANNEL_CURRENT_SYSTEM_TARIFF, CHANNEL_CURRENT_ELECTRICITY_TAX, diff --git a/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/i18n/energidataservice.properties b/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/i18n/energidataservice.properties index ebaebd63470ab..5ab01b677a135 100644 --- a/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/i18n/energidataservice.properties +++ b/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/i18n/energidataservice.properties @@ -54,25 +54,25 @@ thing-type.config.energidataservice.service.priceArea.option.DK2 = East of the G channel-group-type.energidataservice.electricity.label = Electricity channel-group-type.energidataservice.electricity.description = Channels related to electricity -channel-group-type.energidataservice.electricity.channel.currentElectricityTax.label = Current Electricity Tax -channel-group-type.energidataservice.electricity.channel.currentElectricityTax.description = Electricity Tax in DKK per kWh for current hour. -channel-group-type.energidataservice.electricity.channel.currentNetTariff.label = Current Net Tariff -channel-group-type.energidataservice.electricity.channel.currentNetTariff.description = Net tariff in DKK per kWh for current hour. -channel-group-type.energidataservice.electricity.channel.currentSpotPrice.label = Current Spot Price -channel-group-type.energidataservice.electricity.channel.currentSpotPrice.description = Spot price in DKK or EUR per kWh for current hour. -channel-group-type.energidataservice.electricity.channel.currentSystemTariff.label = Current System Tariff -channel-group-type.energidataservice.electricity.channel.currentSystemTariff.description = System tariff in DKK per kWh for current hour. -channel-group-type.energidataservice.electricity.channel.currentTransmissionNetTariff.label = Current Transmission Tariff -channel-group-type.energidataservice.electricity.channel.currentTransmissionNetTariff.description = Transmission Net Tariff in DKK per kWh for current hour. +channel-group-type.energidataservice.electricity.channel.current-electricity-tax.label = Current Electricity Tax +channel-group-type.energidataservice.electricity.channel.current-electricity-tax.description = Electricity Tax in DKK per kWh for current hour. +channel-group-type.energidataservice.electricity.channel.current-net-tariff.label = Current Net Tariff +channel-group-type.energidataservice.electricity.channel.current-net-tariff.description = Net tariff in DKK per kWh for current hour. +channel-group-type.energidataservice.electricity.channel.current-spot-price.label = Current Spot Price +channel-group-type.energidataservice.electricity.channel.current-spot-price.description = Spot price in DKK or EUR per kWh for current hour. +channel-group-type.energidataservice.electricity.channel.current-system-tariff.label = Current System Tariff +channel-group-type.energidataservice.electricity.channel.current-system-tariff.description = System tariff in DKK per kWh for current hour. +channel-group-type.energidataservice.electricity.channel.current-transmission-net-tariff.label = Current Transmission Tariff +channel-group-type.energidataservice.electricity.channel.current-transmission-net-tariff.description = Transmission Net Tariff in DKK per kWh for current hour. # channel types -channel-type.energidataservice.datahubPrice.label = Datahub Price -channel-type.energidataservice.datahubPrice.description = Datahub price. -channel-type.energidataservice.hourlyPrices.label = Hourly Prices -channel-type.energidataservice.hourlyPrices.description = JSON array with hourly prices from 12 hours ago and onward. -channel-type.energidataservice.spotPrice.label = Spot Price -channel-type.energidataservice.spotPrice.description = Spot price. +channel-type.energidataservice.datahub-price.label = Datahub Price +channel-type.energidataservice.datahub-price.description = Datahub price. +channel-type.energidataservice.hourly-prices.label = Hourly Prices +channel-type.energidataservice.hourly-prices.description = JSON array with hourly prices from 12 hours ago and onward. +channel-type.energidataservice.spot-price.label = Spot Price +channel-type.energidataservice.spot-price.description = Spot price. # channel types config diff --git a/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-groups.xml b/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-groups.xml index e365653e0022e..3ab2375a5f953 100644 --- a/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-groups.xml +++ b/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-groups.xml @@ -8,27 +8,27 @@ Channels related to electricity - + Spot price in DKK or EUR per kWh for current hour. - + Net tariff in DKK per kWh for current hour. - + System tariff in DKK per kWh for current hour. - + Electricity Tax in DKK per kWh for current hour. - + Transmission Net Tariff in DKK per kWh for current hour. - + diff --git a/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-types.xml b/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-types.xml index faf902a675697..12d0273c708bd 100644 --- a/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-types.xml +++ b/bundles/org.openhab.binding.energidataservice/src/main/resources/OH-INF/thing/channel-types.xml @@ -4,7 +4,7 @@ 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"> - + Number Spot price. @@ -12,7 +12,7 @@ - + Number Datahub price. @@ -21,7 +21,7 @@ - + String JSON array with hourly prices from 12 hours ago and onward.