Skip to content

Commit

Permalink
Remove debug logging; add comment; move up
Browse files Browse the repository at this point in the history
  • Loading branch information
farmio committed Mar 18, 2024
1 parent ec38ea5 commit 52b8a5b
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions plugins/inputs/knx_listener/knx_listener.go
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,12 @@ func (kl *KNXListener) Stop() {

func (kl *KNXListener) listen() {
for msg := range kl.client.Inbound() {
if msg.Command == knx.GroupRead {
// Ignore GroupValue_Read requests as they would either
// - fail to unpack due to invalid data length (DPT != 1) or
// - create invalid `false` values as their data always unpacks `0` (DPT 1)
continue
}
// Match GA to DataPointType and measurement name
ga := msg.Destination.String()
target, ok := kl.gaTargetMap[ga]
Expand All @@ -142,10 +148,6 @@ func (kl *KNXListener) listen() {
}
continue
}
if msg.Command == knx.GroupRead {
kl.Log.Debugf("Ignoring GroupRead for GA %q from %q", ga, msg.Source.String())
continue
}

// Extract the value from the data-frame
err := target.datapoint.Unpack(msg.Data)
Expand Down

0 comments on commit 52b8a5b

Please sign in to comment.