Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ export function processChargepointMessages(topic: string, message: string) {
topic.match(/^openWB\/chargepoint\/[0-9]+\/get\/daily_imported$/i)
) {
chargePoints[index].dailyYield = +message
chargePoints[index].now.energy = +message
} else if (topic.match(/^openwb\/chargepoint\/[0-9]+\/get\/plug_state$/i)) {
chargePoints[index].isPluggedIn = message == 'true'
} else if (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,6 @@ function processConsumerDeviceMessages(topic: string, message: string) {
}
} else if (topic.match(/^openWB\/consumer\/[0-9]+\/set\/on_time$/i)) {
dev.runningTime = +message
} else {
// console.warn('Ignored Consumer device message: ' + topic)
}
}

Expand All @@ -55,7 +53,6 @@ function processConsumerConfigMessages(topic: string, message: string) {
}
if (!consumers.has(index)) {
console.warn('Invalid device id received: ' + index)
// addConsumer(index)
}
const dev = consumers.get(index)!
if (
Expand All @@ -68,15 +65,11 @@ function processConsumerConfigMessages(topic: string, message: string) {

// Consumers global messages
function processConsumerGlobalMessages(topic: string, message: string) {
if (topic.match(/^openWB\/consumer\/get\/daily_exported$/i)) {
//console.info('Consumer: Total exported energy: ' + message)
if (topic.match(/^openWB\/consumer\/get\/daily_imported$/i)) {
registry.setEnergy('consumers', +message)
} else if (topic.match(/^openWB\/consumer\/get\/power$/i)) {
//console.info('Consumer: Total power: ' + message)
registry.setPower('consumers', +message)
updateShSummary('power')
} else {
//console.warn('Ignored Consumer global message: ' + topic)
}
Comment thread
cshagen marked this conversation as resolved.
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -115,9 +115,11 @@ const devicesToShow = computed(() => {
})

const consumersToShow = computed(() => {
return [...consumers.values()].sort((a, b) => {
return b.power - a.power
})
return [...consumers.values()]
.filter((c) => c.showInGraph)
.sort((a, b) => {
return b.power - a.power
})
})

const batteriesToShow = computed(() =>
Expand Down
Loading