node-red-contrib-homebridge-automation 0.1.12-beta.3 → 0.1.12-beta.4

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/README.md CHANGED
@@ -60,7 +60,7 @@ The above Node-RED Flow, turns on my 'Outside Office' light when the powder room
60
60
  * [To start Node-RED in DEBUG mode, and output Homebridge-Automation debug logs start Node-RED like this.](#to-start-node-red-in-debug-mode-and-output-homebridge-automation-debug-logs-start-node-red-like-this)
61
61
 
62
62
  <!-- Created by https://github.com/ekalinin/github-markdown-toc -->
63
- <!-- Added by: runner, at: Fri Jul 5 23:39:42 UTC 2024 -->
63
+ <!-- Added by: runner, at: Sat Jul 6 00:44:15 UTC 2024 -->
64
64
 
65
65
  <!--te-->
66
66
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-homebridge-automation",
3
- "version": "0.1.12-beta.3",
3
+ "version": "0.1.12-beta.4",
4
4
  "description": "NodeRED Automation for HomeBridge",
5
5
  "main": "src/HAP-NodeRed.js",
6
6
  "scripts": {
@@ -194,7 +194,7 @@ module.exports = function (RED) {
194
194
  _rawEvent: event
195
195
  };
196
196
  node.status({
197
- text: JSON.stringify(msg.payload),
197
+ text: JSON.stringify(msg.payload).slice(0, 40)+'...',
198
198
  shape: 'dot',
199
199
  fill: 'green'
200
200
  });
@@ -246,7 +246,7 @@ module.exports = function (RED) {
246
246
  _rawMessage: message,
247
247
  };
248
248
  node.status({
249
- text: JSON.stringify(msg.payload),
249
+ text: JSON.stringify(msg.payload).slice(0, 40)+'...',
250
250
  shape: 'dot',
251
251
  fill: 'green'
252
252
  });
@@ -366,7 +366,7 @@ module.exports = function (RED) {
366
366
  }, newMsg));
367
367
  debug("hbResume.input: %s output", node.fullName, JSON.stringify(newMsg));
368
368
  node.status({
369
- text: JSON.stringify(newMsg.payload),
369
+ text: JSON.stringify(newMsg.payload).slice(0, 40)+'...',
370
370
  shape: 'dot',
371
371
  fill: 'green'
372
372
  });
@@ -448,7 +448,7 @@ module.exports = function (RED) {
448
448
  }, function (err, message) {
449
449
  if (!err) {
450
450
  node.state = _convertHBcharactericToNode(message.characteristics, node);
451
- debug("hbResume received: %s = %s", node.fullName, JSON.stringify(message.characteristics), node.state);
451
+ debug("hbResume received: %s = %s", node.fullName, JSON.stringify(message.characteristics).slice(0, 80)+'...');
452
452
  } else {
453
453
  node.error(err);
454
454
  }
@@ -599,7 +599,7 @@ module.exports = function (RED) {
599
599
  perms: 'pr'
600
600
  }, function (err, message) {
601
601
  if (!err) {
602
- debug("hbStatus received: %s = %s", JSON.stringify(node.fullName), JSON.stringify(message), JSON.stringify(node.hbDevice));
602
+ debug("hbStatus received: %s = %s", JSON.stringify(node.fullName), JSON.stringify(message).slice(0, 80)+'...', JSON.stringify(node.hbDevice));
603
603
  this.msg.name = node.name;
604
604
  this.msg._rawMessage = message;
605
605
  this.msg.payload = _convertHBcharactericToNode(message.characteristics, node);
@@ -612,7 +612,7 @@ module.exports = function (RED) {
612
612
  this.msg._confId = node.confId;
613
613
  }
614
614
  node.status({
615
- text: JSON.stringify(this.msg.payload),
615
+ text: JSON.stringify(this.msg.payload).slice(0, 40)+'...',
616
616
  shape: 'dot',
617
617
  fill: 'green'
618
618
  });
@@ -919,6 +919,7 @@ module.exports = function (RED) {
919
919
  try {
920
920
  if (device) {
921
921
  var message;
922
+ console.log('device.type',device.type)
922
923
  switch (device.type) {
923
924
  case "00000110": // Camera RTPStream Management
924
925
  case "00000111": // Camera Control
@@ -930,10 +931,10 @@ module.exports = function (RED) {
930
931
  debug("Control %s ->", device.id, JSON.stringify(message));
931
932
  homebridge.HAPresourceByDeviceID(device.id, JSON.stringify(message), function (err, status) {
932
933
  if (!err) {
933
- debug("Controlled %s ->", device.id, JSON.stringify(payload));
934
- debug("Payload %s ->", device.id, status);
934
+ // debug("Controlled %s ->", device.id, JSON.stringify(payload));
935
+ // debug("Payload %s ->", device.id, status);
935
936
  node.status({
936
- text: JSON.stringify(payload),
937
+ text: JSON.stringify(payload).slice(0, 40)+'...',
937
938
  shape: 'dot',
938
939
  fill: 'green'
939
940
  });
@@ -963,7 +964,7 @@ module.exports = function (RED) {
963
964
  if (!err && status && status.characteristics[0].status === 0) {
964
965
  debug("Controlled %s ->", device.id, JSON.stringify(status));
965
966
  node.status({
966
- text: JSON.stringify(payload),
967
+ text: JSON.stringify(payload).slice(0, 40)+'...',
967
968
  shape: 'dot',
968
969
  fill: 'green'
969
970
  });
@@ -975,7 +976,7 @@ module.exports = function (RED) {
975
976
  } else if (!err) {
976
977
  debug("Controlled %s ->", device.id, payload);
977
978
  node.status({
978
- text: JSON.stringify(payload),
979
+ text: JSON.stringify(payload).slice(0, 40)+'...',
979
980
  shape: 'dot',
980
981
  fill: 'green'
981
982
  });