| Last Meter Consumption | Last Recorded Meter Consumption | True |
| Accumulated Consumption | Accumulated Consumption since Midnight | True |
| Accumulated Cost | Accumulated Cost since Midnight | True |
+| Accumulated Reward | Accumulated Reward since Midnight | True |
| Currency | Currency of Cost | True |
| Min Power | Min Power Consumption since Midnight | True |
| Average Power | Average Power Consumption since Midnight | True |
Number:Energy TibberAPILiveLastMeterConsumption "Last Meter Consumption [%.2f kWh]" {channel="tibber:tibberapi:7cfae492:live_lastMeterConsumption"}
Number:Energy TibberAPILiveAccumulatedConsumption "Accumulated Consumption [%.2f kWh]" {channel="tibber:tibberapi:7cfae492:live_accumulatedConsumption"}
Number:Dimensionless TibberAPILiveAccumulatedCost "Accumulated Cost [%.2f NOK]" {channel="tibber:tibberapi:7cfae492:live_accumulatedCost"}
+Number:Dimensionless TibberAPILiveAccumulatedReward "Accumulated Reward [%.2f NOK]" {channel="tibber:tibberapi:7cfae492:live_accumulatedReward"}
String TibberAPILiveCurrency "Currency" {channel="tibber:tibberapi:7cfae492:live_currency"}
Number:Power TibberAPILiveMinPower "Min Power Consumption [%.0f W]" {channel="tibber:tibberapi:7cfae492:live_minPower"}
Number:Power TibberAPILiveAveragePower "Average Power Consumption [%.0f W]" {channel="tibber:tibberapi:7cfae492:live_averagePower"}
public static final String LIVE_LASTMETERCONSUMPTION = "live_lastMeterConsumption";
public static final String LIVE_ACCUMULATEDCONSUMPTION = "live_accumulatedConsumption";
public static final String LIVE_ACCUMULATEDCOST = "live_accumulatedCost";
+ public static final String LIVE_ACCUMULATEREWARD = "live_accumulatedReward";
public static final String LIVE_CURRENCY = "live_currency";
public static final String LIVE_MINPOWER = "live_minPower";
public static final String LIVE_AVERAGEPOWER = "live_averagePower";
}
@WebSocket
- @NonNullByDefault
public class TibberWebSocketListener {
@OnWebSocketConnect
if (myObject.has("accumulatedCost")) {
updateChannel(LIVE_ACCUMULATEDCOST, myObject.get("accumulatedCost").toString());
}
+ if (myObject.has("accumulatedReward")) {
+ updateChannel(LIVE_ACCUMULATEREWARD, myObject.get("accumulatedReward").toString());
+ }
if (myObject.has("currency")) {
updateState(LIVE_CURRENCY, new StringType(myObject.get("currency").toString()));
}
public void startSubscription() {
String query = "{\"id\":\"1\",\"type\":\"subscribe\",\"payload\":{\"variables\":{},\"extensions\":{},\"operationName\":null,\"query\":\"subscription {\\n liveMeasurement(homeId:\\\""
+ tibberConfig.getHomeid()
- + "\\\") {\\n timestamp\\n power\\n lastMeterConsumption\\n accumulatedConsumption\\n accumulatedCost\\n currency\\n minPower\\n averagePower\\n maxPower\\n"
+ + "\\\") {\\n timestamp\\n power\\n lastMeterConsumption\\n accumulatedConsumption\\n accumulatedCost\\n accumulatedReward\\n currency\\n minPower\\n averagePower\\n maxPower\\n"
+ "voltagePhase1\\n voltagePhase2\\n voltagePhase3\\n currentL1\\n currentL2\\n currentL3\\n powerProduction\\n accumulatedProduction\\n minPowerProduction\\n maxPowerProduction\\n }\\n }\\n\"}}";
try {
TibberWebSocketListener socket = TibberHandler.this.socket;
channel-type.tibber.price.description = Total Price: Energy + Tax
channel-type.tibber.production.label = Total Production
channel-type.tibber.production.description = Accumulated Production since Midnight
+channel-type.tibber.reward.label = Total Reward
+channel-type.tibber.reward.description = Reward at given time interval (e.g. hourly, daily, accumulated since midnight)
channel-type.tibber.timestamp.label = Timestamp
channel-type.tibber.timestamp.description = Timestamp for measurement/change
+channel-type.tibber.today_prices.label = Prices for today as a JSON array
+channel-type.tibber.today_prices.description = JSON array of tuples startsAt,total, e.g. {["startsAt": "2022-09-10T00:00:00+02:00", "total": 5.332}, {"startsAt": ...}]. See binding documentation for full example.
+channel-type.tibber.tomorrow_prices.label = Prices for tomorrow as a JSON array
+channel-type.tibber.tomorrow_prices.description = JSON array of tuples startsAt,total, e.g. {["startsAt": "2022-09-10T00:00:00+02:00", "total": 5.332}, {"startsAt": ...}]. See binding documentation for full example.
channel-type.tibber.voltage.label = Voltage
channel-type.tibber.voltage.description = Voltage on given Phase
-channel-type.tibber.tomorrow_prices.label = Prices for tomorrow as a JSON array
-channel-type.tibber.tomorrow_prices.description = JSON array of tuples startsAt,total, e.g. {["startsAt": "2022-09-10T00:00:00+02:00", "total": 5.332}, {"startsAt": ...}]}. See binding documentation for full example.
-channel-type.tibber.today_prices.label = Prices for today as a JSON array
-channel-type.tibber.today_prices.description = JSON array of tuples startsAt,total, e.g. {["startsAt": "2022-09-10T00:00:00+02:00", "total": 5.332}, {"startsAt": ...}]}. See binding documentation for full example.
<channel id="live_lastMeterConsumption" typeId="consumption"/>
<channel id="live_accumulatedConsumption" typeId="consumption"/>
<channel id="live_accumulatedCost" typeId="cost"/>
+ <channel id="live_accumulatedReward" typeId="reward"/>
<channel id="live_currency" typeId="currency"/>
<channel id="live_minPower" typeId="power"/>
<channel id="live_averagePower" typeId="power"/>
<description>Cost at given time interval (e.g. hourly, daily, accumulated since midnight)</description>
<state pattern="%.3f"></state>
</channel-type>
+ <channel-type id="reward">
+ <item-type>Number:Dimensionless</item-type>
+ <label>Total Reward</label>
+ <description>Reward at given time interval (e.g. hourly, daily, accumulated since midnight)</description>
+ <state pattern="%.3f"></state>
+ </channel-type>
<channel-type id="consumption">
<item-type>Number:Energy</item-type>
<label>Total Consumption</label>