mirror of
https://github.com/Koenkk/zigbee2mqtt.git
synced 2026-08-29 07:08:56 +00:00
Fixed bug
This commit is contained in:
@@ -24,8 +24,11 @@ shepherd.on('permitJoining', function(joinTimeLeft) {
|
||||
});
|
||||
shepherd.on('ind', function(msg) {
|
||||
var pl = null;
|
||||
topic = 'xiaomiZb/' + msg.endpoints[0].device.ieeeAddr.substr(2);
|
||||
|
||||
var topic = 'xiaomiZb/';
|
||||
|
||||
if(msg.endpoints.length > 0 && typeof msg.endpoints[0].device !== "undefined")
|
||||
topic += msg.endpoints[0].device.ieeeAddr.substr(2);
|
||||
|
||||
switch (msg.type) {
|
||||
case 'devIncoming':
|
||||
console.log('Device: ' + msg.data + ' joining the network!');
|
||||
|
||||
Reference in New Issue
Block a user