zigbee-herdsman 0.47.2 → 0.48.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -470,14 +470,14 @@ class Ezsp extends events_1.default {
470
470
  }
471
471
  case enums_2.EzspFrameID.ENERGY_SCAN_RESULT_HANDLER: {
472
472
  const channel = this.buffalo.readUInt8();
473
- const maxRssiValue = this.buffalo.readUInt8();
473
+ const maxRssiValue = this.buffalo.readInt8();
474
474
  this.ezspEnergyScanResultHandler(channel, maxRssiValue);
475
475
  break;
476
476
  }
477
477
  case enums_2.EzspFrameID.NETWORK_FOUND_HANDLER: {
478
478
  const networkFound = this.buffalo.readEmberZigbeeNetwork();
479
479
  const lastHopLqi = this.buffalo.readUInt8();
480
- const lastHopRssi = this.buffalo.readUInt8();
480
+ const lastHopRssi = this.buffalo.readInt8();
481
481
  this.ezspNetworkFoundHandler(networkFound, lastHopLqi, lastHopRssi);
482
482
  break;
483
483
  }
@@ -554,7 +554,7 @@ class Ezsp extends events_1.default {
554
554
  const type = this.buffalo.readUInt8();
555
555
  const apsFrame = this.buffalo.readEmberApsFrame();
556
556
  const lastHopLqi = this.buffalo.readUInt8();
557
- const lastHopRssi = this.buffalo.readUInt8();
557
+ const lastHopRssi = this.buffalo.readInt8();
558
558
  const sender = this.buffalo.readUInt16();
559
559
  const bindingIndex = this.buffalo.readUInt8();
560
560
  const addressIndex = this.buffalo.readUInt8();
@@ -585,7 +585,7 @@ class Ezsp extends events_1.default {
585
585
  const source = this.buffalo.readUInt16();
586
586
  const sourceEui = this.buffalo.readIeeeAddr();
587
587
  const lastHopLqi = this.buffalo.readUInt8();
588
- const lastHopRssi = this.buffalo.readUInt8();
588
+ const lastHopRssi = this.buffalo.readInt8();
589
589
  const relayCount = this.buffalo.readUInt8();
590
590
  const relayList = this.buffalo.readListUInt16(relayCount); //this.buffalo.readListUInt8(relayCount * 2);
591
591
  this.ezspIncomingRouteRecordHandler(source, sourceEui, lastHopLqi, lastHopRssi, relayCount, relayList);
@@ -599,7 +599,7 @@ class Ezsp extends events_1.default {
599
599
  case enums_2.EzspFrameID.MAC_PASSTHROUGH_MESSAGE_HANDLER: {
600
600
  const messageType = this.buffalo.readUInt8();
601
601
  const lastHopLqi = this.buffalo.readUInt8();
602
- const lastHopRssi = this.buffalo.readUInt8();
602
+ const lastHopRssi = this.buffalo.readInt8();
603
603
  const messageContents = this.buffalo.readPayload();
604
604
  this.ezspMacPassthroughMessageHandler(messageType, lastHopLqi, lastHopRssi, messageContents);
605
605
  break;
@@ -608,7 +608,7 @@ class Ezsp extends events_1.default {
608
608
  const filterIndexMatch = this.buffalo.readUInt8();
609
609
  const legacyPassthroughType = this.buffalo.readUInt8();
610
610
  const lastHopLqi = this.buffalo.readUInt8();
611
- const lastHopRssi = this.buffalo.readUInt8();
611
+ const lastHopRssi = this.buffalo.readInt8();
612
612
  const messageContents = this.buffalo.readPayload();
613
613
  this.ezspMacFilterMatchMessageHandler(filterIndexMatch, legacyPassthroughType, lastHopLqi, lastHopRssi, messageContents);
614
614
  break;
@@ -677,7 +677,7 @@ class Ezsp extends events_1.default {
677
677
  }
678
678
  case enums_2.EzspFrameID.MFGLIB_RX_HANDLER: {
679
679
  const linkQuality = this.buffalo.readUInt8();
680
- const rssi = this.buffalo.readUInt8();
680
+ const rssi = this.buffalo.readInt8();
681
681
  const packetLength = this.buffalo.readUInt8();
682
682
  const packetContents = this.buffalo.readListUInt8(packetLength);
683
683
  this.ezspMfglibRxHandler(linkQuality, rssi, packetLength, packetContents);
@@ -686,7 +686,7 @@ class Ezsp extends events_1.default {
686
686
  case enums_2.EzspFrameID.INCOMING_BOOTLOAD_MESSAGE_HANDLER: {
687
687
  const longId = this.buffalo.readIeeeAddr();
688
688
  const lastHopLqi = this.buffalo.readUInt8();
689
- const lastHopRssi = this.buffalo.readUInt8();
689
+ const lastHopRssi = this.buffalo.readInt8();
690
690
  const messageContents = this.buffalo.readPayload();
691
691
  this.ezspIncomingBootloadMessageHandler(longId, lastHopLqi, lastHopRssi, messageContents);
692
692
  break;
@@ -702,7 +702,7 @@ class Ezsp extends events_1.default {
702
702
  const isDeviceInfoNull = this.buffalo.readUInt8() === 1 ? true : false;
703
703
  const deviceInfo = this.buffalo.readEmberZllDeviceInfoRecord();
704
704
  const lastHopLqi = this.buffalo.readUInt8();
705
- const lastHopRssi = this.buffalo.readUInt8();
705
+ const lastHopRssi = this.buffalo.readInt8();
706
706
  this.ezspZllNetworkFoundHandler(networkInfo, isDeviceInfoNull, deviceInfo, lastHopLqi, lastHopRssi);
707
707
  break;
708
708
  }
@@ -714,7 +714,7 @@ class Ezsp extends events_1.default {
714
714
  case enums_2.EzspFrameID.ZLL_ADDRESS_ASSIGNMENT_HANDLER: {
715
715
  const addressInfo = this.buffalo.readEmberZllAddressAssignment();
716
716
  const lastHopLqi = this.buffalo.readUInt8();
717
- const lastHopRssi = this.buffalo.readUInt8();
717
+ const lastHopRssi = this.buffalo.readInt8();
718
718
  this.ezspZllAddressAssignmentHandler(addressInfo, lastHopLqi, lastHopRssi);
719
719
  break;
720
720
  }
@@ -1805,7 +1805,7 @@ class Ezsp extends events_1.default {
1805
1805
  */
1806
1806
  ezspEnergyScanResultHandler(channel, maxRssiValue) {
1807
1807
  logger_1.logger.debug(`ezspEnergyScanResultHandler(): callback called with: [channel=${channel}], [maxRssiValue=${maxRssiValue}]`, NS);
1808
- logger_1.logger.info(`Energy scan for channel ${channel} reports max RSSI value at ${maxRssiValue}.`, NS);
1808
+ logger_1.logger.info(`Energy scan for channel ${channel} reports max RSSI value at ${maxRssiValue} dBm.`, NS);
1809
1809
  }
1810
1810
  /**
1811
1811
  * Callback
@@ -1816,7 +1816,7 @@ class Ezsp extends events_1.default {
1816
1816
  * @param lastHopRssi int8_t The energy level (in units of dBm) observed during the reception.
1817
1817
  */
1818
1818
  ezspNetworkFoundHandler(networkFound, lastHopLqi, lastHopRssi) {
1819
- logger_1.logger.debug(`ezspNetworkFoundHandler(): callback called with: [networkFound=${networkFound}], `
1819
+ logger_1.logger.debug(`ezspNetworkFoundHandler(): callback called with: [networkFound=${JSON.stringify(networkFound)}], `
1820
1820
  + `[lastHopLqi=${lastHopLqi}], [lastHopRssi=${lastHopRssi}]`, NS);
1821
1821
  }
1822
1822
  /**
@@ -1928,7 +1928,7 @@ class Ezsp extends events_1.default {
1928
1928
  this.startCommand(enums_2.EzspFrameID.JOIN_NETWORK_DIRECTLY);
1929
1929
  this.buffalo.writeUInt8(localNodeType);
1930
1930
  this.buffalo.writeEmberBeaconData(beacon);
1931
- this.buffalo.writeUInt8(radioTxPower);
1931
+ this.buffalo.writeInt8(radioTxPower);
1932
1932
  this.buffalo.writeUInt8(clearBeaconsAfterNetworkUp ? 1 : 0);
1933
1933
  const sendStatus = await this.sendCommand();
1934
1934
  if (sendStatus !== enums_1.EzspStatus.SUCCESS) {
@@ -2335,7 +2335,7 @@ class Ezsp extends events_1.default {
2335
2335
  */
2336
2336
  async ezspSetRadioPower(power) {
2337
2337
  this.startCommand(enums_2.EzspFrameID.SET_RADIO_POWER);
2338
- this.buffalo.writeUInt8(power);
2338
+ this.buffalo.writeInt8(power);
2339
2339
  const sendStatus = await this.sendCommand();
2340
2340
  if (sendStatus !== enums_1.EzspStatus.SUCCESS) {
2341
2341
  throw new Error(enums_1.EzspStatus[sendStatus]);
@@ -2455,7 +2455,7 @@ class Ezsp extends events_1.default {
2455
2455
  this.buffalo.writeUInt8(phyIndex);
2456
2456
  this.buffalo.writeUInt8(page);
2457
2457
  this.buffalo.writeUInt8(channel);
2458
- this.buffalo.writeUInt8(power);
2458
+ this.buffalo.writeInt8(power);
2459
2459
  this.buffalo.writeUInt8(bitmask);
2460
2460
  const sendStatus = await this.sendCommand();
2461
2461
  if (sendStatus !== enums_1.EzspStatus.SUCCESS) {
@@ -2495,7 +2495,7 @@ class Ezsp extends events_1.default {
2495
2495
  async ezspMultiPhySetRadioPower(phyIndex, power) {
2496
2496
  this.startCommand(enums_2.EzspFrameID.MULTI_PHY_SET_RADIO_POWER);
2497
2497
  this.buffalo.writeUInt8(phyIndex);
2498
- this.buffalo.writeUInt8(power);
2498
+ this.buffalo.writeInt8(power);
2499
2499
  const sendStatus = await this.sendCommand();
2500
2500
  if (sendStatus !== enums_1.EzspStatus.SUCCESS) {
2501
2501
  throw new Error(enums_1.EzspStatus[sendStatus]);
@@ -5485,7 +5485,7 @@ class Ezsp extends events_1.default {
5485
5485
  async mfglibSetPower(txPowerMode, power) {
5486
5486
  this.startCommand(enums_2.EzspFrameID.MFGLIB_SET_POWER);
5487
5487
  this.buffalo.writeUInt16(txPowerMode);
5488
- this.buffalo.writeUInt8(power);
5488
+ this.buffalo.writeInt8(power);
5489
5489
  const sendStatus = await this.sendCommand();
5490
5490
  if (sendStatus !== enums_1.EzspStatus.SUCCESS) {
5491
5491
  throw new Error(enums_1.EzspStatus[sendStatus]);
@@ -5503,7 +5503,7 @@ class Ezsp extends events_1.default {
5503
5503
  if (sendStatus !== enums_1.EzspStatus.SUCCESS) {
5504
5504
  throw new Error(enums_1.EzspStatus[sendStatus]);
5505
5505
  }
5506
- const power = this.buffalo.readUInt8();
5506
+ const power = this.buffalo.readInt8();
5507
5507
  return power;
5508
5508
  }
5509
5509
  /**
@@ -5646,7 +5646,7 @@ class Ezsp extends events_1.default {
5646
5646
  this.startCommand(enums_2.EzspFrameID.ZLL_NETWORK_OPS);
5647
5647
  this.buffalo.writeEmberZllNetwork(networkInfo);
5648
5648
  this.buffalo.writeUInt8(op);
5649
- this.buffalo.writeUInt8(radioTxPower);
5649
+ this.buffalo.writeInt8(radioTxPower);
5650
5650
  const sendStatus = await this.sendCommand();
5651
5651
  if (sendStatus !== enums_1.EzspStatus.SUCCESS) {
5652
5652
  throw new Error(enums_1.EzspStatus[sendStatus]);
@@ -5699,7 +5699,7 @@ class Ezsp extends events_1.default {
5699
5699
  async ezspZllStartScan(channelMask, radioPowerForScan, nodeType) {
5700
5700
  this.startCommand(enums_2.EzspFrameID.ZLL_START_SCAN);
5701
5701
  this.buffalo.writeUInt32(channelMask);
5702
- this.buffalo.writeUInt8(radioPowerForScan);
5702
+ this.buffalo.writeInt8(radioPowerForScan);
5703
5703
  this.buffalo.writeUInt8(nodeType);
5704
5704
  const sendStatus = await this.sendCommand();
5705
5705
  if (sendStatus !== enums_1.EzspStatus.SUCCESS) {