Skip to content

Commit

Permalink
Fix MQTT topic in cap.js
Browse files Browse the repository at this point in the history
  • Loading branch information
kristian committed Feb 17, 2025
1 parent 824fde0 commit c93db52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cap.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ export async function open(device, options) {
eventEmitter.emit('attribute', attr, context);
if (mqtt) {
try {
await mqttClient.publishAsync(`${mqttTopic} / ${!process.env.ZBTK_CAP_PASS_NO_EUI ? formatEui(eui) : toHex(addr)}/${toHex(zbee_aps.cluster)}/${hexAttr.id}`,
await mqttClient.publishAsync(`${mqttTopic}/${!process.env.ZBTK_CAP_PASS_NO_EUI ? formatEui(eui) : toHex(addr)}/${toHex(zbee_aps.cluster)}/${hexAttr.id}`,
Buffer.isBuffer(attr.value) ? attr.value : `${attr.value}`);
} catch (err) {
logger.error(err, 'MQTT publish attribute failed');
Expand Down

0 comments on commit c93db52

Please sign in to comment.