homebridge-ratgdo 2.1.3 → 2.2.1

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.
@@ -1,14 +1,10 @@
1
- /* Copyright(C) 2017-2024, HJD (https://github.com/hjdhjd). All rights reserved.
2
- *
3
- * ratgdo-options.ts: Feature option and type definitions for Ratgdo.
4
- */
5
1
  import { RATGDO_OCCUPANCY_DURATION } from "./settings.js";
6
2
  // Feature option categories.
7
3
  export const featureOptionCategories = [
8
- { description: "Device feature options.", name: "Device", validFor: ["all"] },
9
- { description: "Opener feature options.", name: "Opener", validFor: ["opener"] },
10
- { description: "Opener light feature options.", name: "Light", validFor: ["opener"] },
11
- { description: "Opener motion feature options.", name: "Motion", validFor: ["opener"] }
4
+ { description: "Device feature options.", name: "Device" },
5
+ { description: "Opener feature options.", name: "Opener" },
6
+ { description: "Opener light feature options.", name: "Light" },
7
+ { description: "Opener motion feature options.", name: "Motion" }
12
8
  ];
13
9
  /* eslint-disable @stylistic/max-len */
14
10
  // Individual feature options, broken out by category.
@@ -30,99 +26,12 @@ export const featureOptions = {
30
26
  // Opener options.
31
27
  "Opener": [
32
28
  { default: false, description: "Make this opener read-only by ignoring open and close requests from HomeKit.", name: "ReadOnly" },
33
- { default: false, description: "Add a dimmer accessory to control the opener. This can be useful in automation scenarios where you want to set the door to a specific percentage. This option is only available on Ratgdo devices running ESPHome firmware versions.", name: "Dimmer" },
29
+ { default: false, description: "Add a dimmer accessory to control the opener. This can be useful in automation scenarios where you want to set the door to a specific percentage.", name: "Dimmer" },
34
30
  { default: false, description: "Add a switch accessory to control the opener. This can be useful in automation scenarios where you want to work around HomeKit's security restrictions for controlling garage door openers.", name: "Switch" },
35
31
  { default: false, description: "Add an occupancy sensor accessory using the open state of the opener to determine occupancy. This can be useful in automation scenarios where you want to trigger an action based on the opener being open for an extended period of time.", name: "OccupancySensor" },
36
32
  { default: false, defaultValue: RATGDO_OCCUPANCY_DURATION, description: "Duration, in seconds, to wait once the opener has reached the open state before indicating occupancy.", group: "OccupancySensor", name: "OccupancySensor.Duration" },
37
33
  { default: false, description: "Add a switch accessory to control the wireless remote lockout feature (if present) on your opener. This can be useful in automation scenarios where you want to work around HomeKit's security restrictions for controlling the lock state of garage door openers.", name: "Switch.RemoteLockout" }
38
34
  ]
39
35
  };
40
- // Utility function to let us know whether a feature option should be enabled or not, traversing the scope hierarchy.
41
- export function isOptionEnabled(configOptions, device, option = "", defaultReturnValue = true) {
42
- // Nothing configured - we assume the default return value.
43
- if (!configOptions.length) {
44
- return defaultReturnValue;
45
- }
46
- const isOptionSet = (checkOption, checkMac = undefined) => {
47
- // This regular expression is a bit more intricate than you might think it should be due to the need to ensure we capture values at the very end of the option.
48
- const optionRegex = new RegExp("^(Enable|Disable)\\." + checkOption + (!checkMac ? "" : "\\." + checkMac) + "$", "gi");
49
- // Get the option value, if we have one.
50
- for (const entry of configOptions) {
51
- const regexMatch = optionRegex.exec(entry);
52
- if (regexMatch) {
53
- return regexMatch[1].toLowerCase() === "enable";
54
- }
55
- }
56
- return undefined;
57
- };
58
- // Check to see if we have a device-level option first.
59
- if (device?.mac) {
60
- const value = isOptionSet(option, device.mac);
61
- if (value !== undefined) {
62
- return value;
63
- }
64
- }
65
- // Finally, we check for a global-level value.
66
- const value = isOptionSet(option);
67
- if (value !== undefined) {
68
- return value;
69
- }
70
- // The option hasn't been set at any scope, return our default value.
71
- return defaultReturnValue;
72
- }
73
- // Utility function to return a value-based feature option for a Ratgdo device.
74
- export function getOptionValue(configOptions, device, option) {
75
- // Nothing configured - we assume there's nothing.
76
- if (!configOptions.length || !option) {
77
- return undefined;
78
- }
79
- const getValue = (checkOption, checkMac = undefined) => {
80
- // This regular expression is a bit more intricate than you might think it should be due to the need to ensure we capture values at the very end of the option.
81
- const optionRegex = new RegExp("^Enable\\." + checkOption + (!checkMac ? "" : "\\." + checkMac) + "\\.([^\\.]+)$", "gi");
82
- // Get the option value, if we have one.
83
- for (const entry of configOptions) {
84
- const regexMatch = optionRegex.exec(entry);
85
- if (regexMatch) {
86
- return regexMatch[1];
87
- }
88
- }
89
- return undefined;
90
- };
91
- // Check to see if we have a device-level value first.
92
- if (device?.mac) {
93
- const value = getValue(option, device.mac);
94
- if (value) {
95
- return value;
96
- }
97
- }
98
- // Finally, we check for a global-level value.
99
- return getValue(option);
100
- }
101
- // Utility function to parse and return a numeric configuration parameter.
102
- function parseOptionNumeric(optionValue, convert) {
103
- // We don't have the option configured -- we're done.
104
- if (optionValue === undefined) {
105
- return undefined;
106
- }
107
- // Convert it to a number, if needed.
108
- const convertedValue = convert(optionValue);
109
- // Let's validate to make sure it's really a number.
110
- if (isNaN(convertedValue) || (convertedValue < 0)) {
111
- return undefined;
112
- }
113
- // Return the value.
114
- return convertedValue;
115
- }
116
- // Utility function to return a floating point configuration parameter.
117
- export function getOptionFloat(optionValue) {
118
- return parseOptionNumeric(optionValue, (value) => {
119
- return parseFloat(value);
120
- });
121
- }
122
- // Utility function to return an integer configuration parameter on a device.
123
- export function getOptionNumber(optionValue) {
124
- return parseOptionNumeric(optionValue, (value) => {
125
- return parseInt(value);
126
- });
127
- }
36
+ /* eslint-enable @stylistic/max-len */
128
37
  //# sourceMappingURL=ratgdo-options.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ratgdo-options.js","sourceRoot":"","sources":["../src/ratgdo-options.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,yBAAyB,EAAE,MAAM,eAAe,CAAC;AAY1D,6BAA6B;AAC7B,MAAM,CAAC,MAAM,uBAAuB,GAAG;IAErC,EAAE,WAAW,EAAE,yBAAyB,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAE,KAAK,CAAE,EAAE;IAC/E,EAAE,WAAW,EAAE,yBAAyB,EAAE,IAAI,EAAE,QAAQ,EAAE,QAAQ,EAAE,CAAE,QAAQ,CAAE,EAAE;IAClF,EAAE,WAAW,EAAE,+BAA+B,EAAE,IAAI,EAAE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,0BAA0B,EAAE;QAC7O,EAAE,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,oQAAoQ,EAAE,IAAI,EAAE,sBAAsB,EAAE;KACpU;CACF,CAAC;AACF,sCAAsC"}
@@ -1,12 +1,13 @@
1
1
  import { API, DynamicPlatformPlugin, HAP, Logging, PlatformAccessory, PlatformConfig } from "homebridge";
2
+ import { FeatureOptions, MqttClient } from "homebridge-plugin-utils";
2
3
  import { RatgdoOptions } from "./ratgdo-options.js";
3
4
  import { RatgdoAccessory } from "./ratgdo-device.js";
4
- import { RatgdoMqtt } from "./ratgdo-mqtt.js";
5
5
  export declare class RatgdoPlatform implements DynamicPlatformPlugin {
6
6
  private readonly accessories;
7
7
  readonly api: API;
8
+ private discoveredDevices;
8
9
  private espHomeEvents;
9
- private featureOptionDefaults;
10
+ featureOptions: FeatureOptions;
10
11
  config: RatgdoOptions;
11
12
  readonly configOptions: string[];
12
13
  readonly configuredDevices: {
@@ -14,12 +15,11 @@ export declare class RatgdoPlatform implements DynamicPlatformPlugin {
14
15
  };
15
16
  readonly hap: HAP;
16
17
  readonly log: Logging;
17
- readonly mqtt: RatgdoMqtt | null;
18
+ readonly mqtt: MqttClient | null;
18
19
  constructor(log: Logging, config: PlatformConfig, api: API);
19
20
  configureAccessory(accessory: PlatformAccessory): void;
20
21
  private configureRatgdo;
21
22
  private discoverRatgdoDevice;
22
23
  private configureGdo;
23
- featureOptionDefault(option: string): boolean;
24
24
  debug(message: string, ...parameters: unknown[]): void;
25
25
  }
@@ -1,17 +1,18 @@
1
1
  import { Bonjour } from "bonjour-service";
2
+ import { FeatureOptions, MqttClient } from "homebridge-plugin-utils";
2
3
  import { PLATFORM_NAME, PLUGIN_NAME, RATGDO_AUTODISCOVERY_INTERVAL, RATGDO_HEARTBEAT_DURATION, RATGDO_HEARTBEAT_INTERVAL, RATGDO_MQTT_TOPIC } from "./settings.js";
3
- import { featureOptionCategories, featureOptions, isOptionEnabled } from "./ratgdo-options.js";
4
+ import { featureOptionCategories, featureOptions } from "./ratgdo-options.js";
4
5
  import EventSource from "eventsource";
5
6
  import { RatgdoAccessory } from "./ratgdo-device.js";
6
- import { RatgdoMqtt } from "./ratgdo-mqtt.js";
7
7
  import http from "node:http";
8
8
  import net from "node:net";
9
9
  import util from "node:util";
10
10
  export class RatgdoPlatform {
11
11
  accessories;
12
12
  api;
13
+ discoveredDevices;
13
14
  espHomeEvents;
14
- featureOptionDefaults;
15
+ featureOptions;
15
16
  config;
16
17
  configOptions;
17
18
  configuredDevices;
@@ -21,39 +22,29 @@ export class RatgdoPlatform {
21
22
  constructor(log, config, api) {
22
23
  this.accessories = [];
23
24
  this.api = api;
25
+ this.config = {};
24
26
  this.configOptions = [];
25
27
  this.configuredDevices = {};
28
+ this.discoveredDevices = {};
26
29
  this.espHomeEvents = {};
27
- this.featureOptionDefaults = {};
30
+ this.featureOptions = new FeatureOptions(featureOptionCategories, featureOptions, config?.options);
28
31
  this.hap = api.hap;
29
32
  this.log = log;
30
33
  this.log.debug = this.debug.bind(this);
31
34
  this.mqtt = null;
32
- // Build our list of default values for our feature options.
33
- for (const category of featureOptionCategories) {
34
- for (const options of featureOptions[category.name]) {
35
- this.featureOptionDefaults[(category.name + (options.name.length ? "." + options.name : "")).toLowerCase()] = options.default;
36
- }
37
- }
38
35
  // We can't start without being configured.
39
36
  if (!config) {
40
37
  return;
41
38
  }
42
39
  this.config = {
43
40
  debug: config.debug === true,
44
- mqttTopic: config.mqttTopic ?? RATGDO_MQTT_TOPIC,
41
+ mqttTopic: config.mqttTopic,
45
42
  mqttUrl: config.mqttUrl,
46
43
  options: config.options
47
44
  };
48
- // If we have feature options, put them into their own array, upper-cased for future reference.
49
- if (this.config.options) {
50
- for (const featureOption of this.config.options) {
51
- this.configOptions.push(featureOption.toLowerCase());
52
- }
53
- }
54
45
  // Initialize MQTT, if needed.
55
46
  if (this.config.mqttUrl) {
56
- this.mqtt = new RatgdoMqtt(this);
47
+ this.mqtt = new MqttClient(this.config.mqttUrl, this.config.mqttTopic ?? RATGDO_MQTT_TOPIC, this.log);
57
48
  }
58
49
  this.log.debug("Debug logging on. Expect a lot of data.");
59
50
  // Fire up the Ratgdo API once Homebridge has loaded all the cached accessories it knows about and called configureAccessory() on each.
@@ -102,29 +93,29 @@ export class RatgdoPlatform {
102
93
  this.espHomeEvents[mac] = new EventSource("http://" + address + "/events");
103
94
  // Handle errors in the events API.
104
95
  this.espHomeEvents[mac].addEventListener("error", (payload) => {
105
- let errorMessage;
106
- switch (payload.message) {
107
- case payload.message?.startsWith("connect ECONNREFUSED "):
108
- errorMessage = "Connection to the Ratgdo controller refused";
109
- break;
110
- case payload.message?.startsWith("connect ETIMEDOUT "):
111
- errorMessage = "Connection to the Ratgdo controller has timed out";
112
- break;
113
- case "read ECONNRESET":
114
- errorMessage = "Connection to the Ratgdo controller has been reset";
115
- break;
116
- case "read ETIMEDOUT":
117
- errorMessage = "Connection to the Ratgdo controller has timed out while listening for events";
118
- break;
119
- case "unknown error.":
120
- case undefined:
121
- errorMessage = "An unknown error on the Ratgdo controller has occurred. This will happen occasionally and can generally be ignored";
122
- break;
123
- default:
124
- errorMessage = "Unrecognized error: " + util.inspect(payload, { sorted: true });
125
- break;
126
- }
127
- ratgdoAccessory.log.error("%s.", errorMessage);
96
+ const getErrorMessage = (payload) => {
97
+ const { message } = payload;
98
+ let errorMessage = "Unrecognized error: " + util.inspect(payload, { sorted: true });
99
+ if (typeof message !== "string") {
100
+ return errorMessage;
101
+ }
102
+ if (message.startsWith("connect ECONNREFUSED ")) {
103
+ return "Connection to the Ratgdo controller refused";
104
+ }
105
+ if (message.startsWith("connect ETIMEDOUT ")) {
106
+ return "Connection to the Ratgdo controller has timed out";
107
+ }
108
+ if (message.startsWith("connect EHOSTDOWN ")) {
109
+ return "Unable to connect to the Ratgdo controller. The host appears to be down";
110
+ }
111
+ const errorMessages = {
112
+ "read ECONNRESET": "Connection to the Ratgdo controller has been reset",
113
+ "read ETIMEDOUT": "Connection to the Ratgdo controller has timed out while listening for events",
114
+ "unknown error.": "An unknown error on the Ratgdo controller has occurred. This will happen occasionally and can generally be ignored"
115
+ };
116
+ return errorMessages[message] || errorMessage;
117
+ };
118
+ ratgdoAccessory.log.error("%s.", getErrorMessage(payload));
128
119
  });
129
120
  // Inform the user when we've successfully connected.
130
121
  this.espHomeEvents[mac].addEventListener("open", () => {
@@ -167,7 +158,6 @@ export class RatgdoPlatform {
167
158
  default:
168
159
  ratgdoAccessory.log.error("Unknown door operation detected: %s.", event.current_operation);
169
160
  return;
170
- break;
171
161
  }
172
162
  ratgdoAccessory.updateState("door", state, (event.position !== undefined) ? event.position * 100 : undefined);
173
163
  break;
@@ -204,6 +194,10 @@ export class RatgdoPlatform {
204
194
  }
205
195
  // Configure a discovered garage door opener.
206
196
  configureGdo(address, mac, name, firmwareVersion) {
197
+ // If we've already discovered this device, we're done.
198
+ if (this.discoveredDevices[mac]) {
199
+ return null;
200
+ }
207
201
  // Generate this device's unique identifier.
208
202
  const uuid = this.hap.uuid.generate(mac);
209
203
  // See if we already know about this accessory or if it's truly new.
@@ -215,8 +209,12 @@ export class RatgdoPlatform {
215
209
  mac: mac.replace(/:/g, ""),
216
210
  name: name
217
211
  };
212
+ // Inform the user that we've discovered a device.
213
+ this.log.info("Discovered: %s (address: %s mac: %s ESPHome firmware: v%s).", device.name, device.address, device.mac, device.firmwareVersion);
214
+ // Mark it as discovered.
215
+ this.discoveredDevices[mac] = true;
218
216
  // Check to see if the user has disabled the device.
219
- if (!isOptionEnabled(this.configOptions, device, "Device", this.featureOptionDefault("Device"))) {
217
+ if (!this.featureOptions.test("Device", device.mac)) {
220
218
  // If the accessory already exists, let's remove it.
221
219
  if (accessory) {
222
220
  // Inform the user.
@@ -233,8 +231,6 @@ export class RatgdoPlatform {
233
231
  if (this.configuredDevices[uuid]) {
234
232
  return null;
235
233
  }
236
- // Inform the user.
237
- this.log.info("Discovered: %s (address: %s mac: %s ESPHome firmware: v%s).", device.name, device.address, device.mac, device.firmwareVersion);
238
234
  // It's a new device - let's add it to HomeKit.
239
235
  if (!accessory) {
240
236
  accessory = new this.api.platformAccessory(device.name, uuid);
@@ -242,21 +238,14 @@ export class RatgdoPlatform {
242
238
  this.api.registerPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [accessory]);
243
239
  this.accessories.push(accessory);
244
240
  }
241
+ // Inform the user.
242
+ this.log.info("Configuring: %s (address: %s mac: %s ESPHome firmware: v%s).", device.name, device.address, device.mac, device.firmwareVersion);
245
243
  // Add it to our list of configured devices.
246
244
  this.configuredDevices[uuid] = new RatgdoAccessory(this, accessory, device);
247
245
  // Refresh the accessory cache.
248
246
  this.api.updatePlatformAccessories([accessory]);
249
247
  return this.configuredDevices[uuid];
250
248
  }
251
- // Utility to return the default value for a feature option.
252
- featureOptionDefault(option) {
253
- const defaultValue = this.featureOptionDefaults[option.toLowerCase()];
254
- // If it's unknown to us, assume it's true.
255
- if (defaultValue === undefined) {
256
- return true;
257
- }
258
- return defaultValue;
259
- }
260
249
  // Utility for debug logging.
261
250
  debug(message, ...parameters) {
262
251
  if (this.config.debug) {
@@ -1 +1 @@
1
- {"version":3,"file":"ratgdo-platform.js","sourceRoot":"","sources":["../src/ratgdo-platform.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,OAAO,EAAW,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,6BAA6B,EAAE,yBAAyB,EAAE,yBAAyB,EACtH,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAC3C,OAAO,EAAiB,uBAAuB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC9G,OAAO,WAAW,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,GAAG,MAAM,UAAU,CAAC;AAC3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C,GAAG,CAAC,2BAA2B,CAAC,WAAW,EAAE,aAAa,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;YAC9E,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;QACnC,CAAC;QAED,mBAAmB;QACnB,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,8DAA8D,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,OAAO,EAAE,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,eAAe,CAAC,CAAC;QAE/I,4CAA4C;QAC5C,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,GAAG,IAAI,eAAe,CAAC,IAAI,EAAE,SAAS,EAAE,MAAM,CAAC,CAAC;QAE5E,+BAA+B;QAC/B,IAAI,CAAC,GAAG,CAAC,yBAAyB,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC;QAEhD,OAAO,IAAI,CAAC,iBAAiB,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IAED,6BAA6B;IACtB,KAAK,CAAC,OAAe,EAAE,GAAG,UAAqB;QAEpD,IAAG,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;YAErB,IAAI,CAAC,GAAG,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,UAAU,CAAC,CAAC,CAAC;QACtD,CAAC;IACH,CAAC;CACF"}
@@ -4,12 +4,6 @@ export interface RatgdoDevice {
4
4
  mac: string;
5
5
  name: string;
6
6
  }
7
- export interface RatgdoLogging {
8
- debug: (message: string, ...parameters: unknown[]) => void;
9
- error: (message: string, ...parameters: unknown[]) => void;
10
- info: (message: string, ...parameters: unknown[]) => void;
11
- warn: (message: string, ...parameters: unknown[]) => void;
12
- }
13
7
  export declare enum RatgdoReservedNames {
14
8
  DIMMER_OPENER_AUTOMATION = "Dimmer.Opener.Automation",
15
9
  OCCUPANCY_SENSOR_DOOR_OPEN = "OccupancySensor.DoorOpen",
@@ -1 +1 @@
1
- {"version":3,"file":"ratgdo-types.js","sourceRoot":"","sources":["../src/ratgdo-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAoBH,yBAAyB;AACzB,MAAM,CAAN,IAAY,mBAYX;AAZD,WAAY,mBAAmB;IAE7B,2BAA2B;IAC3B,4EAAqD,CAAA;IAErD,qCAAqC;IACrC,8EAAuD,CAAA;IACvD,yEAAkD,CAAA;IAElD,2BAA2B;IAC3B,wDAAiC,CAAA;IACjC,4EAAqD,CAAA;AACvD,CAAC,EAZW,mBAAmB,KAAnB,mBAAmB,QAY9B"}
1
+ {"version":3,"file":"ratgdo-types.js","sourceRoot":"","sources":["../src/ratgdo-types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAWH,yBAAyB;AACzB,MAAM,CAAN,IAAY,mBAYX;AAZD,WAAY,mBAAmB;IAE7B,2BAA2B;IAC3B,4EAAqD,CAAA;IAErD,qCAAqC;IACrC,8EAAuD,CAAA;IACvD,yEAAkD,CAAA;IAElD,2BAA2B;IAC3B,wDAAiC,CAAA;IACjC,4EAAqD,CAAA;AACvD,CAAC,EAZW,mBAAmB,KAAnB,mBAAmB,QAY9B"}
@@ -42,10 +42,10 @@
42
42
  </tr>
43
43
  </table>
44
44
  </td>
45
- <td id="deviceStatsTable">
45
+ <td id="deviceStatsTable" class="w-75">
46
46
  <table class="table table-sm table-borderless border-bottom m-0 p-0">
47
47
  <tr id="deviceStatsHeader">
48
- <th class="m-0 p-0 w-25"><B>Serial</B></th>
48
+ <th class="m-0 p-0 w-25"><B>MAC Address</B></th>
49
49
  <th class="m-0 p-0 w-25"><B>Firmware<B></th>
50
50
  </tr>
51
51
  <tr>
@@ -63,12 +63,14 @@
63
63
  </div>
64
64
  <div id="pageSupport" class="mt-4" style="display: none;">
65
65
  <h5>Introduction</h5>
66
- <p class="px-4">I hope you enjoy <a target="_blank" href="https://github.com/hjdhjd/homebridge-ratgdo">homebridge-ratgdo</a> as much as I enjoy developing it. All my projects are labors of love. If you'd like to show your appreciation - <a target="_blank" href="https://github.com/hjdhjd/homebridge-ratgdo">star this project on Github</A> and do some good in your community, either financially or with your time: a food bank, an animal shelter (two of my passions), or whatever resonates with you that can give something back to the world around you.</p>
66
+ <p class="px-4">I hope you enjoy this plugin as much as I enjoy developing it. All my projects are labors of love. If you'd like to show your appreciation - <a target="_blank" href="https://github.com/hjdhjd/homebridge-ratgdo">star this project on GitHub</A> and do some good in your community, either financially or with your time: a food bank, an animal shelter (two of my passions), or whatever resonates with you that can give something back to the world around you. If you're looking for a couple of my faves: <a target="_blank" href="https://wck.org/donate">World Central Kitchen</a> and <a target="_blank" href="https://bestfriends.org/donate">Best Friends</a>.</p>
67
67
 
68
68
  <div class="px-4">
69
- Other plugins by <a target="_blank" href="https://github.com/hjdhjd">HJD</a>:
69
+ Plugins by <a target="_blank" href="https://github.com/hjdhjd">HJD</a>:
70
70
 
71
71
  <ul dir="auto">
72
+ <li><a target="_blank" href="https://github.com/hjdhjd/homebridge-hunter-hydrawise">homebridge-hunter-hydrawise: Hunter Hydrawise integration for HomeKit.</a></li>
73
+ <li><a target="_blank" href="https://github.com/hjdhjd/homebridge-ratgdo">homebridge-ratgdo: Ratgdo (non-myQ Liftmaster and Chamberlain) garage door and gate opener support for HomeKit</a></li>
72
74
  <li><a target="_blank" href="https://github.com/hjdhjd/homebridge-unifi-access">homebridge-unifi-access: HomeKit integration for the UniFi Access ecosystem</a></li>
73
75
  <li><a target="_blank" href="https://github.com/hjdhjd/homebridge-unifi-protect">homebridge-unifi-protect: Complete HomeKit integration for the entire UniFi Protect ecosystem</a></li>
74
76
  </ul>
@@ -79,9 +81,6 @@
79
81
  <li>
80
82
  <a target="_blank" href="https://github.com/hjdhjd/homebridge-ratgdo#installation">Installation</a>: installing this plugin, including system requirements.
81
83
  </li>
82
- <li>
83
- <a target="_blank" href="https://github.com/hjdhjd/homebridge-ratgdo#plugin-configuration">Plugin Configuration</a>: how to quickly get up and running.
84
- </li>
85
84
  <li>
86
85
  <a target="_blank" href="https://github.com/hjdhjd/homebridge-ratgdo#notes">Additional Notes</a>: some things you should be aware of, including Ratgdo-specific quirks.
87
86
  </li>
@@ -110,4 +109,17 @@
110
109
  </li>
111
110
  </ul>
112
111
  </div>
113
- <script src="./ui.mjs" type="module"></script>
112
+ <script type="module">
113
+ /* Copyright(C) 2017-2024, HJD (https://github.com/hjdhjd). All rights reserved.
114
+ *
115
+ * Plugin webUI script loader.
116
+ */
117
+
118
+ "use strict";
119
+
120
+ // Ensure we load the webUI dynamically so it isn't cached on each load.
121
+ const script = document.createElement('script');
122
+ script.src = "./ui.mjs?v=" + Date.now().toString();
123
+ script.type = "module";
124
+ document.body.appendChild(script);
125
+ </script>