mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-07-02 01:51:38 +00:00
Log uninteresting messages without converters as debug.
This commit is contained in:
@@ -86,14 +86,13 @@ class DeviceReceive extends BaseExtension {
|
||||
|
||||
// Check if there is an available converter
|
||||
if (!converters.length) {
|
||||
// Don't log readRsp messages, they are not interesting most of the time.
|
||||
if (data.type !== 'readResponse') {
|
||||
logger.warn(
|
||||
`No converter available for '${mappedDevice.model}' with cluster '${data.cluster}' ` +
|
||||
`and type '${data.type}' and data '${JSON.stringify(data.data)}'`
|
||||
);
|
||||
logger.warn(`Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.`);
|
||||
}
|
||||
// Don't log readRsp and raw as warn messages, they are not interesting most of the time.
|
||||
const level = ['readResponse', 'raw'].includes(data.type) ? 'debug' : 'warn';
|
||||
logger[level](
|
||||
`No converter available for '${mappedDevice.model}' with cluster '${data.cluster}' ` +
|
||||
`and type '${data.type}' and data '${JSON.stringify(data.data)}'`
|
||||
);
|
||||
logger[level](`Please see: https://www.zigbee2mqtt.io/how_tos/how_to_support_new_devices.html.`);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user