node-red-contrib-homebridge-automation 0.1.9 → 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 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
- var msg = {
578
- name: node.name,
579
- _rawMessage: message,
580
- payload: _convertHBcharactericToNode(message.characteristics, node)
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
@@ -55,11 +55,12 @@ The above Node-RED Flow, turns on my 'Outside Office' light when the powder room
55
55
  * [hb control](#hb-control)
56
56
  * [Input](#input-2)
57
57
  * [Flows Shared from Community](#flows-shared-from-community)
58
+ * [Donations](#donations)
58
59
  * [Troubleshooting / DEBUG MODE](#troubleshooting--debug-mode)
59
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)
60
61
 
61
62
  <!-- Created by https://github.com/ekalinin/github-markdown-toc -->
62
- <!-- Added by: sgracey, at: Tue 7 Mar 2023 19:53:52 EST -->
63
+ <!-- Added by: sgracey, at: Sun 19 Mar 2023 11:30:14 EDT -->
63
64
 
64
65
  <!--te-->
65
66
 
@@ -358,6 +359,10 @@ I have started collecting flows for useful functions on the wiki.
358
359
 
359
360
  https://github.com/NorthernMan54/node-red-contrib-homebridge-automation/wiki
360
361
 
362
+ # Donations
363
+
364
+ [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=6V3MNYYR446EG)
365
+
361
366
  # Troubleshooting / DEBUG MODE
362
367
 
363
368
  ## To start Node-RED in DEBUG mode, and output Homebridge-Automation debug logs start Node-RED like this.
package/lib/Service.js CHANGED
@@ -117,6 +117,8 @@ Service.prototype.toList = function (context) {
117
117
  fullName = context.name + " - " + this.name;
118
118
  } else if (context.manufacturer === "Mitsubishi" && !fullName.includes(this.name)) {
119
119
  fullName = context.name + " - " + this.name;
120
+ } else if (context.manufacturer === "Allterco") {
121
+ fullName = context.name + " - " + this.name;
120
122
  } else {
121
123
  context.name = this.name;
122
124
  fullName = context.name;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-homebridge-automation",
3
- "version": "0.1.9",
3
+ "version": "0.1.11",
4
4
  "description": "NodeRED Automation for HomeBridge",
5
5
  "main": "HAP-NodeRed.js",
6
6
  "scripts": {