node-red-contrib-homebridge-automation 0.1.12-beta.6 → 0.1.12-beta.8

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: Sat Jul 6 02:33:18 UTC 2024 -->
63
+ <!-- Added by: runner, at: Sat Jul 6 23:29:21 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.6",
3
+ "version": "0.1.12-beta.8",
4
4
  "description": "NodeRED Automation for HomeBridge",
5
5
  "main": "src/HAP-NodeRed.js",
6
6
  "scripts": {
@@ -180,7 +180,7 @@ module.exports = function (RED) {
180
180
  node.command = function (event) {
181
181
  // False messages can be received from accessories with multiple services
182
182
  // if (Object.keys(_convertHBcharactericToNode(event, node)).length > 0) {
183
- debug("hbEvent", node.name, event);
183
+ // debug("hbEvent", node.name, event);
184
184
  if (event.status === true && event.value !== undefined) {
185
185
  node.state = Object.assign(node.state, _convertHBcharactericToNode([event], node));
186
186
  var msg = {
@@ -505,9 +505,6 @@ module.exports = function (RED) {
505
505
 
506
506
  node.on('input', function (msg) {
507
507
  this.msg = msg;
508
- Object.keys(msg.payload).sort().forEach(function (key) {
509
- payload[key] = msg.payload[key];
510
- });
511
508
  _control.call(this, node, msg.payload, function (err, data) {
512
509
  // debug('hbControl complete [%s] - [%s]', node, node.hbDevice); // Images produce alot of noise
513
510
  if (!err && data && (node.deviceType == '00000110' || node.deviceType == '00000111')) {
@@ -538,7 +535,7 @@ module.exports = function (RED) {
538
535
  node.conf.register(node, function () {
539
536
  debug("hbControl.register:", node.fullName);
540
537
  this.hbDevice = hbDevices.findDevice(node.device);
541
- console.log('hbControl Register', this.hbDevice)
538
+ // console.log('hbControl Register', this.hbDevice)
542
539
  if (this.hbDevice) {
543
540
  node.hbDevice = this.hbDevice;
544
541
  node.deviceType = this.hbDevice.type;
@@ -549,13 +546,6 @@ module.exports = function (RED) {
549
546
  node.error("437:Can't find device " + node.device, null);
550
547
  // this.error("Missing device " + node.device);
551
548
  }
552
- switch (node.service) {
553
- case "Camera Control": // Camera Control
554
- debug("hbControl camera");
555
- break;
556
- default:
557
- debug("node.conf.register", node.service);
558
- }
559
549
  });
560
550
  }
561
551
 
@@ -938,7 +928,7 @@ module.exports = function (RED) {
938
928
  "image-width": 1920,
939
929
  "image-height": 1080
940
930
  };
941
- debug("Control %s ->", device.id, JSON.stringify(message));
931
+ debug("Control %s ->", device.id, node.fullName, JSON.stringify(message));
942
932
  homebridge.HAPresourceByDeviceID(device.id, JSON.stringify(message), function (err, status) {
943
933
  if (!err) {
944
934
  // debug("Controlled %s ->", device.id, JSON.stringify(payload));