node-red-contrib-homebridge-automation 0.1.10 → 0.1.11
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/HAP-NodeRed.js +11 -12
- package/README.md +1 -1
- package/package.json +1 -1
package/HAP-NodeRed.js
CHANGED
|
@@ -574,24 +574,23 @@ module.exports = function (RED) {
|
|
|
574
574
|
}, function (err, message) {
|
|
575
575
|
if (!err) {
|
|
576
576
|
debug("hbStatus received: %s = %s", JSON.stringify(node.fullName), JSON.stringify(message));
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
};
|
|
577
|
+
this.msg.name = node.name;
|
|
578
|
+
this.msg._rawMessage = message;
|
|
579
|
+
this.msg.payload = _convertHBcharactericToNode(message.characteristics, node);
|
|
580
|
+
|
|
582
581
|
if (node.hbDevice) {
|
|
583
|
-
msg.Homebridge = node.hbDevice.homebridge;
|
|
584
|
-
msg.Manufacturer = node.hbDevice.manufacturer;
|
|
585
|
-
msg.Service = node.hbDevice.deviceType;
|
|
586
|
-
msg._device = node.device;
|
|
587
|
-
msg._confId = node.confId;
|
|
582
|
+
this.msg.Homebridge = node.hbDevice.homebridge;
|
|
583
|
+
this.msg.Manufacturer = node.hbDevice.manufacturer;
|
|
584
|
+
this.msg.Service = node.hbDevice.deviceType;
|
|
585
|
+
this.msg._device = node.device;
|
|
586
|
+
this.msg._confId = node.confId;
|
|
588
587
|
}
|
|
589
588
|
node.status({
|
|
590
|
-
text: JSON.stringify(msg.payload),
|
|
589
|
+
text: JSON.stringify(this.msg.payload),
|
|
591
590
|
shape: 'dot',
|
|
592
591
|
fill: 'green'
|
|
593
592
|
});
|
|
594
|
-
node.send(msg);
|
|
593
|
+
node.send(this.msg);
|
|
595
594
|
} else {
|
|
596
595
|
node.error(err, this.msg);
|
|
597
596
|
}
|
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: sgracey, at:
|
|
63
|
+
<!-- Added by: sgracey, at: Sun 19 Mar 2023 11:30:14 EDT -->
|
|
64
64
|
|
|
65
65
|
<!--te-->
|
|
66
66
|
|