Skip to content

Commit

Permalink
chore: add debug log to list all mqtt topics (#153)
Browse files Browse the repository at this point in the history
  • Loading branch information
sbender9 authored Sep 9, 2024
1 parent e57c8a3 commit aa85e3f
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ module.exports = function (app) {
let sentDeltas = {}
let pollInterval
let keepAlive
let seenMQTTTopics = []

plugin.id = PLUGIN_ID
plugin.name = PLUGIN_NAME
Expand Down Expand Up @@ -395,6 +396,7 @@ module.exports = function (app) {
onStop.forEach(f => f())
onStop = []
sentDeltas = {}
seenMQTTTopics = []
customNames = {}
customNameTimeouts = {}
plugin.needsID = true
Expand Down Expand Up @@ -587,6 +589,11 @@ module.exports = function (app) {
}
}

if ( seenMQTTTopics.indexOf(topic) == -1 ) {
app.debug(`found ${topic} = ${message.value}`)
seenMQTTTopics.push(topic)
}

let senderName = `com.victronenergy.${type}.${instance}`

if ( plugin.options.useDeviceNames !== undefined &&
Expand Down

0 comments on commit aa85e3f

Please sign in to comment.