isy-nodejs 1.0.2-alpha.2 → 1.0.2-alpha.3

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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "isy-nodejs",
3
3
  "description": "Node.js wrapper for ISY interface including websockets for change notifications. Fork of isy-js by Rod Toll. Designed to be used in a node.js application.",
4
4
  "license": "MIT",
5
- "version": "1.0.2-alpha.2",
5
+ "version": "1.0.2-alpha.3",
6
6
  "author": {
7
7
  "name": "Pradeep Mouli"
8
8
  },
@@ -71,5 +71,5 @@
71
71
  "publishConfig": {
72
72
  "access": "public"
73
73
  },
74
- "gitHead": "fac612b29924e40d54cfda336f91c8dc9ba01636"
74
+ "gitHead": "9cc886e570c58f53a5dd82df6f6f030c93022f5f"
75
75
  }
package/src/Converters.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { UnitOfMeasure } from './Definitions/Global/UOM.js';
2
- import { type StringKeys } from './Utils.js';
2
+ import { type Paths, type StringKeys } from './Utils.js';
3
3
 
4
4
  let BooleanPercentage: Converter<boolean, number>;
5
5
  let NullConverter: Converter<any, any>;
@@ -58,7 +58,7 @@ function registerConverters() {
58
58
  }
59
59
 
60
60
  export function registerConverter(
61
- from: keyof typeof StandardConverters | keyof typeof Converter.Matter | string,
61
+ from: keyof typeof StandardConverters | keyof typeof Converter.Matter | Paths<typeof StandardConverters> | Paths<typeof Converter.Matter> | string,
62
62
  to: keyof typeof StandardConverters | keyof typeof Converter.Matter | string,
63
63
  converter: Converter<any, any>
64
64
  ) {
package/src/ISY.ts CHANGED
@@ -317,7 +317,7 @@ export class ISY extends EventEmitter implements Disposable {
317
317
  }
318
318
  break;
319
319
  case EventType.Heartbeat:
320
- this.logger.debug(`Received ${EventType[Number(stringControl)]} Signal from ISY: ${Utils.logStringify(evt)}`);
320
+ this.logger.debug(`Received ${EventType[Number(stringControl)]} Signal from ISY: ${JSON.stringify(evt)}`);
321
321
  break;
322
322
 
323
323
  default:
@@ -337,7 +337,7 @@ export class ISY extends EventEmitter implements Disposable {
337
337
  if (stringControl === EventType.NodeChanged) {
338
338
  this.logger.debug(`Received Node Change Event: ${JSON.stringify(evt)}. These are currently unsupported.`);
339
339
  }
340
- this.logger.debug(`${EventType[Number(stringControl)]} Event: ${Utils.logStringify(evt)}`);
340
+ this.logger.debug(`${EventType[Number(stringControl)]} Event: ${JSON.stringify(evt)}`);
341
341
  }
342
342
 
343
343
  break;
@@ -496,6 +496,7 @@ export class ISY extends EventEmitter implements Disposable {
496
496
 
497
497
  public async refreshStatuses() {
498
498
  try {
499
+ this.logger.info('Refreshing ISY Node Statuses');
499
500
  const that = this;
500
501
  const result = await that.sendRequest('status');
501
502
  if (that.isDebugEnabled) {
@@ -359,9 +359,9 @@ async function initializeConfiguration(isy: ISY, config?: Config): Promise<Confi
359
359
  environment.vars.set('productid', config.productId);
360
360
  }
361
361
 
362
- if(config.uniqueId) {
363
- environment.vars.set('uniqueid', config.uniqueId);
364
- }
362
+
363
+ environment.vars.set('uniqueid', isy.id.replaceAll(':', '_'));
364
+
365
365
 
366
366
 
367
367
  const vendorName = isy.vendorName;