homebridge-ratgdo 0.0.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.
- package/LICENSE.md +16 -0
- package/README.md +5 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/platform.js +98 -0
- package/dist/platform.js.map +1 -0
- package/dist/platformAccessory.js +104 -0
- package/dist/platformAccessory.js.map +1 -0
- package/dist/settings.js +12 -0
- package/dist/settings.js.map +1 -0
- package/package.json +40 -0
package/LICENSE.md
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
Internet Systems Consortium license
|
|
2
|
+
===================================
|
|
3
|
+
|
|
4
|
+
Copyright (c) `2023`, `HJD https://github.com/hjdhjd`
|
|
5
|
+
|
|
6
|
+
Permission to use, copy, modify, and/or distribute this software for any purpose
|
|
7
|
+
with or without fee is hereby granted, provided that the above copyright notice
|
|
8
|
+
and this permission notice appear in all copies.
|
|
9
|
+
|
|
10
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
11
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
|
12
|
+
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
13
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
|
14
|
+
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
15
|
+
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
|
16
|
+
THIS SOFTWARE.
|
package/README.md
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAEA,yCAA2C;AAC3C,yCAAuD;AAKvD,iBAAS,CAAC,GAAQ,EAAE,EAAE;IACpB,GAAG,CAAC,gBAAgB,CAAC,wBAAa,EAAE,oCAAyB,CAAC,CAAC;AACjE,CAAC,CAAA"}
|
package/dist/platform.js
ADDED
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExampleHomebridgePlatform = void 0;
|
|
4
|
+
const settings_1 = require("./settings");
|
|
5
|
+
const platformAccessory_1 = require("./platformAccessory");
|
|
6
|
+
/**
|
|
7
|
+
* HomebridgePlatform
|
|
8
|
+
* This class is the main constructor for your plugin, this is where you should
|
|
9
|
+
* parse the user config and discover/register accessories with Homebridge.
|
|
10
|
+
*/
|
|
11
|
+
class ExampleHomebridgePlatform {
|
|
12
|
+
constructor(log, config, api) {
|
|
13
|
+
this.log = log;
|
|
14
|
+
this.config = config;
|
|
15
|
+
this.api = api;
|
|
16
|
+
this.Service = this.api.hap.Service;
|
|
17
|
+
this.Characteristic = this.api.hap.Characteristic;
|
|
18
|
+
// this is used to track restored cached accessories
|
|
19
|
+
this.accessories = [];
|
|
20
|
+
this.log.debug("Finished initializing platform:", this.config.name);
|
|
21
|
+
// When this event is fired it means Homebridge has restored all cached accessories from disk.
|
|
22
|
+
// Dynamic Platform plugins should only register new accessories after this event was fired,
|
|
23
|
+
// in order to ensure they weren't added to homebridge already. This event can also be used
|
|
24
|
+
// to start discovery of new accessories.
|
|
25
|
+
this.api.on("didFinishLaunching", () => {
|
|
26
|
+
log.debug("Executed didFinishLaunching callback");
|
|
27
|
+
// run the method to discover / register your devices as accessories
|
|
28
|
+
this.discoverDevices();
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* This function is invoked when homebridge restores cached accessories from disk at startup.
|
|
33
|
+
* It should be used to setup event handlers for characteristics and update respective values.
|
|
34
|
+
*/
|
|
35
|
+
configureAccessory(accessory) {
|
|
36
|
+
this.log.info("Loading accessory from cache:", accessory.displayName);
|
|
37
|
+
// add the restored accessory to the accessories cache so we can track if it has already been registered
|
|
38
|
+
this.accessories.push(accessory);
|
|
39
|
+
}
|
|
40
|
+
/**
|
|
41
|
+
* This is an example method showing how to register discovered accessories.
|
|
42
|
+
* Accessories must only be registered once, previously created accessories
|
|
43
|
+
* must not be registered again to prevent "duplicate UUID" errors.
|
|
44
|
+
*/
|
|
45
|
+
discoverDevices() {
|
|
46
|
+
// EXAMPLE ONLY
|
|
47
|
+
// A real plugin you would discover accessories from the local network, cloud services
|
|
48
|
+
// or a user-defined array in the platform config.
|
|
49
|
+
const exampleDevices = [
|
|
50
|
+
{
|
|
51
|
+
exampleUniqueId: "ABCD",
|
|
52
|
+
exampleDisplayName: "Bedroom"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
exampleUniqueId: "EFGH",
|
|
56
|
+
exampleDisplayName: "Kitchen"
|
|
57
|
+
}
|
|
58
|
+
];
|
|
59
|
+
// loop over the discovered devices and register each one if it has not already been registered
|
|
60
|
+
for (const device of exampleDevices) {
|
|
61
|
+
// generate a unique id for the accessory this should be generated from
|
|
62
|
+
// something globally unique, but constant, for example, the device serial
|
|
63
|
+
// number or MAC address
|
|
64
|
+
const uuid = this.api.hap.uuid.generate(device.exampleUniqueId);
|
|
65
|
+
// see if an accessory with the same uuid has already been registered and restored from
|
|
66
|
+
// the cached devices we stored in the `configureAccessory` method above
|
|
67
|
+
const existingAccessory = this.accessories.find(accessory => accessory.UUID === uuid);
|
|
68
|
+
if (existingAccessory) {
|
|
69
|
+
// the accessory already exists
|
|
70
|
+
this.log.info("Restoring existing accessory from cache:", existingAccessory.displayName);
|
|
71
|
+
// if you need to update the accessory.context then you should run `api.updatePlatformAccessories`. eg.:
|
|
72
|
+
// existingAccessory.context.device = device;
|
|
73
|
+
// this.api.updatePlatformAccessories([existingAccessory]);
|
|
74
|
+
// create the accessory handler for the restored accessory
|
|
75
|
+
// this is imported from `platformAccessory.ts`
|
|
76
|
+
new platformAccessory_1.ExamplePlatformAccessory(this, existingAccessory);
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
// the accessory does not yet exist, so we need to create it
|
|
80
|
+
this.log.info("Adding new accessory:", device.exampleDisplayName);
|
|
81
|
+
// create a new accessory
|
|
82
|
+
const accessory = new this.api.platformAccessory(device.exampleDisplayName, uuid);
|
|
83
|
+
// store a copy of the device object in the `accessory.context`
|
|
84
|
+
// the `context` property can be used to store any data about the accessory you may need
|
|
85
|
+
accessory.context.device = device;
|
|
86
|
+
// create the accessory handler for the newly create accessory
|
|
87
|
+
// this is imported from `platformAccessory.ts`
|
|
88
|
+
new platformAccessory_1.ExamplePlatformAccessory(this, accessory);
|
|
89
|
+
// link the accessory to your platform
|
|
90
|
+
this.api.registerPlatformAccessories(settings_1.PLUGIN_NAME, settings_1.PLATFORM_NAME, [accessory]);
|
|
91
|
+
}
|
|
92
|
+
// it is possible to remove platform accessories at any time using `api.unregisterPlatformAccessories`, eg.:
|
|
93
|
+
// this.api.unregisterPlatformAccessories(PLUGIN_NAME, PLATFORM_NAME, [accessory]);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
exports.ExampleHomebridgePlatform = ExampleHomebridgePlatform;
|
|
98
|
+
//# sourceMappingURL=platform.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";;;AAEA,yCAAwD;AACxD,2DAA+D;AAE/D;;;;GAIG;AACH,MAAa,yBAAyB;IAOpC,YACkB,GAAW,EACX,MAAsB,EACtB,GAAQ;QAFR,QAAG,GAAH,GAAG,CAAQ;QACX,WAAM,GAAN,MAAM,CAAgB;QACtB,QAAG,GAAH,GAAG,CAAK;QATV,YAAO,GAAmB,IAAI,CAAC,GAAG,CAAC,GAAG,CAAC,OAAO,CAAC;QAC/C,mBAAc,GAA0B,IAAI,CAAC,GAAG,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AAC,IAAI,KAAK,IAAI,CAAC,CAAC;YAEtF,IAAI,iBAAiB,EAAE;gBACrB,+BAA+B;gBAC/B,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,0CAA0C,EAAE,iBAAiB,CAAC,WAAW,CAAC,CAAC;gBAEzF,wGAAwG;gBACxG,6CAA6C;gBAC7C,2DAA2D;gBAE3D,0DAA0D;gBAC1D,+CAA+C;gBAC/C,IAAI,4CAAwB,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC;aAEvD;iBAAM;gBACL,4DAA4D;gBAC5D,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,uBAAuB,EAAE,MAAM,CAAC,kBAAkB,CAAC,CAAC;gBAElE,yBAAyB;gBACzB,MAAM,SAAS,GAAG,IAAI,IAAI,CAAC,GAAG,CAAC,iBAAiB,CAAC,MAAM,CAAC,kBAAkB,EAAE,IAAI,CAAC,CAAC;gBAElF,+DAA+D;gBAC/D,wFAAwF;gBACxF,SAAS,CAAC,OAAO,CAAC,MAAM,GAAG,MAAM,CAAC;gBAElC,8DAA8D;gBAC9D,+CAA+C;gBAC/C,IAAI,4CAAwB,CAAC,IAAI,EAAE,SAAS,CAAC,CAAC;gBAE9C,sCAAsC;gBACtC,IAAI,CAAC,GAAG,CAAC,2BAA2B,CAAC,sBAAW,EAAE,wBAAa,EAAE,CAAC,SAAS,CAAC,CAAC,CAAC;aAC/E;YAED,4GAA4G;YAC5G,mFAAmF;SACpF;IAEH,CAAC;CACF;AAzGD,8DAyGC"}
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ExamplePlatformAccessory = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Platform Accessory
|
|
6
|
+
* An instance of this class is created for each accessory your platform registers
|
|
7
|
+
* Each accessory may expose multiple services of different service types.
|
|
8
|
+
*/
|
|
9
|
+
class ExamplePlatformAccessory {
|
|
10
|
+
constructor(platform, accessory) {
|
|
11
|
+
this.platform = platform;
|
|
12
|
+
this.accessory = accessory;
|
|
13
|
+
/**
|
|
14
|
+
* These are just used to create a working example
|
|
15
|
+
* You should implement your own code to track the state of your accessory
|
|
16
|
+
*/
|
|
17
|
+
this.exampleStates = {
|
|
18
|
+
On: false,
|
|
19
|
+
Brightness: 100
|
|
20
|
+
};
|
|
21
|
+
// set accessory information
|
|
22
|
+
this.accessory.getService(this.platform.Service.AccessoryInformation)
|
|
23
|
+
.setCharacteristic(this.platform.Characteristic.Manufacturer, "Default-Manufacturer")
|
|
24
|
+
.setCharacteristic(this.platform.Characteristic.Model, "Default-Model")
|
|
25
|
+
.setCharacteristic(this.platform.Characteristic.SerialNumber, "Default-Serial");
|
|
26
|
+
// get the LightBulb service if it exists, otherwise create a new LightBulb service
|
|
27
|
+
// you can create multiple services for each accessory
|
|
28
|
+
this.service = this.accessory.getService(this.platform.Service.Lightbulb) || this.accessory.addService(this.platform.Service.Lightbulb);
|
|
29
|
+
// To avoid "Cannot add a Service with the same UUID another Service without also defining a unique 'subtype' property." error,
|
|
30
|
+
// when creating multiple services of the same type, you need to use the following syntax to specify a name and subtype id:
|
|
31
|
+
// this.accessory.getService('NAME') ?? this.accessory.addService(this.platform.Service.Lightbulb, 'NAME', 'USER_DEFINED_SUBTYPE');
|
|
32
|
+
// set the service name, this is what is displayed as the default name on the Home app
|
|
33
|
+
// in this example we are using the name we stored in the `accessory.context` in the `discoverDevices` method.
|
|
34
|
+
this.service.setCharacteristic(this.platform.Characteristic.Name, accessory.context.device.exampleDisplayName);
|
|
35
|
+
// each service must implement at-minimum the "required characteristics" for the given service type
|
|
36
|
+
// see https://developers.homebridge.io/#/service/Lightbulb
|
|
37
|
+
// register handlers for the On/Off Characteristic
|
|
38
|
+
this.service.getCharacteristic(this.platform.Characteristic.On)
|
|
39
|
+
.on("set", this.setOn.bind(this)) // SET - bind to the `setOn` method below
|
|
40
|
+
.on("get", this.getOn.bind(this)); // GET - bind to the `getOn` method below
|
|
41
|
+
// register handlers for the Brightness Characteristic
|
|
42
|
+
this.service.getCharacteristic(this.platform.Characteristic.Brightness)
|
|
43
|
+
.on("set", this.setBrightness.bind(this)); // SET - bind to the 'setBrightness` method below
|
|
44
|
+
// EXAMPLE ONLY
|
|
45
|
+
// Example showing how to update the state of a Characteristic asynchronously instead
|
|
46
|
+
// of using the `on('get')` handlers.
|
|
47
|
+
//
|
|
48
|
+
// Here we change update the brightness to a random value every 5 seconds using
|
|
49
|
+
// the `updateCharacteristic` method.
|
|
50
|
+
setInterval(() => {
|
|
51
|
+
// assign the current brightness a random value between 0 and 100
|
|
52
|
+
const currentBrightness = Math.floor(Math.random() * 100);
|
|
53
|
+
// push the new value to HomeKit
|
|
54
|
+
this.service.updateCharacteristic(this.platform.Characteristic.Brightness, currentBrightness);
|
|
55
|
+
this.platform.log.debug("Pushed updated current Brightness state to HomeKit:", currentBrightness);
|
|
56
|
+
}, 10000);
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* Handle "SET" requests from HomeKit
|
|
60
|
+
* These are sent when the user changes the state of an accessory, for example, turning on a Light bulb.
|
|
61
|
+
*/
|
|
62
|
+
setOn(value, callback) {
|
|
63
|
+
// implement your own code to turn your device on/off
|
|
64
|
+
this.exampleStates.On = value;
|
|
65
|
+
this.platform.log.debug("Set Characteristic On ->", value);
|
|
66
|
+
// you must call the callback function
|
|
67
|
+
callback(null);
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* Handle the "GET" requests from HomeKit
|
|
71
|
+
* These are sent when HomeKit wants to know the current state of the accessory, for example, checking if a Light bulb is on.
|
|
72
|
+
*
|
|
73
|
+
* GET requests should return as fast as possbile. A long delay here will result in
|
|
74
|
+
* HomeKit being unresponsive and a bad user experience in general.
|
|
75
|
+
*
|
|
76
|
+
* If your device takes time to respond you should update the status of your device
|
|
77
|
+
* asynchronously instead using the `updateCharacteristic` method instead.
|
|
78
|
+
|
|
79
|
+
* @example
|
|
80
|
+
* this.service.updateCharacteristic(this.platform.Characteristic.On, true)
|
|
81
|
+
*/
|
|
82
|
+
getOn(callback) {
|
|
83
|
+
// implement your own code to check if the device is on
|
|
84
|
+
const isOn = this.exampleStates.On;
|
|
85
|
+
this.platform.log.debug("Get Characteristic On ->", isOn);
|
|
86
|
+
// you must call the callback function
|
|
87
|
+
// the first argument should be null if there were no errors
|
|
88
|
+
// the second argument should be the value to return
|
|
89
|
+
callback(null, isOn);
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* Handle "SET" requests from HomeKit
|
|
93
|
+
* These are sent when the user changes the state of an accessory, for example, changing the Brightness
|
|
94
|
+
*/
|
|
95
|
+
setBrightness(value, callback) {
|
|
96
|
+
// implement your own code to set the brightness
|
|
97
|
+
this.exampleStates.Brightness = value;
|
|
98
|
+
this.platform.log.debug("Set Characteristic Brightness -> ", value);
|
|
99
|
+
// you must call the callback function
|
|
100
|
+
callback(null);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
exports.ExamplePlatformAccessory = ExamplePlatformAccessory;
|
|
104
|
+
//# sourceMappingURL=platformAccessory.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platformAccessory.js","sourceRoot":"","sources":["../src/platformAccessory.ts"],"names":[],"mappings":";;;AAIA;;;;GAIG;AACH,MAAa,wBAAwB;IAYnC,YACmB,QAAmC,EACnC,SAA4B;QAD5B,aAAQ,GAAR,QAAQ,CAA2B;QACnC,cAAS,GAAT,SAAS,CAAmB;QAX/C;;;WAGG;QACK,kBAAa,GAAG;YACtB,EAAE,EAAE,KAAK;YACT,UAAU,EAAE,GAAG;SAChB,CAAA;QAOC,4BAA4B;QAC5B,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,oBAAoB,CAAE;aACnE,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,YAAY,EAAE,sBAAsB,CAAC;aACpF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AmC,EAAE,KAAK,CAAC,CAAC;QAEpE,sCAAsC;QACtC,QAAQ,CAAC,IAAI,CAAC,CAAC;IACjB,CAAC;CAEF;AAxHD,4DAwHC"}
|
package/dist/settings.js
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PLUGIN_NAME = exports.PLATFORM_NAME = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* This is the name of the platform that users will use to register the plugin in the Homebridge config.json
|
|
6
|
+
*/
|
|
7
|
+
exports.PLATFORM_NAME = "ExampleHomebridgePlugin";
|
|
8
|
+
/**
|
|
9
|
+
* This must match the name of your plugin as defined the package.json
|
|
10
|
+
*/
|
|
11
|
+
exports.PLUGIN_NAME = "homebridge-plugin-name";
|
|
12
|
+
//# sourceMappingURL=settings.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings.js","sourceRoot":"","sources":["../src/settings.ts"],"names":[],"mappings":";;;AAAA;;GAEG;AACU,QAAA,aAAa,GAAG,yBAAyB,CAAC;AAEvD;;GAEG;AACU,QAAA,WAAW,GAAG,wBAAwB,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
{
|
|
2
|
+
"displayName": "Homebridge RatGDO",
|
|
3
|
+
"name": "homebridge-ratgdo",
|
|
4
|
+
"version": "0.0.1",
|
|
5
|
+
"description": "HomeKit integration for LiftMaster and Chamberlain garage door openers, without requiring myQ.",
|
|
6
|
+
"license": "ISC",
|
|
7
|
+
"repository": {
|
|
8
|
+
"type": "git",
|
|
9
|
+
"url": "git://github.com/hjdhjd/homebridge-ratgdo.git"
|
|
10
|
+
},
|
|
11
|
+
"bugs": {
|
|
12
|
+
"url": "https://github.com/hjdhjd/homebridge-ratgdo/issues"
|
|
13
|
+
},
|
|
14
|
+
"engines": {
|
|
15
|
+
"node": ">=18.0",
|
|
16
|
+
"homebridge": ">1.2.0"
|
|
17
|
+
},
|
|
18
|
+
"main": "dist/index.js",
|
|
19
|
+
"scripts": {
|
|
20
|
+
"lint": "eslint src/**.ts",
|
|
21
|
+
"watch": "npm run build && npm link && nodemon",
|
|
22
|
+
"build": "rimraf ./dist && tsc",
|
|
23
|
+
"prepublishOnly": "npm run lint && npm run build"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"homebridge-plugin"
|
|
27
|
+
],
|
|
28
|
+
"dependencies": {},
|
|
29
|
+
"devDependencies": {
|
|
30
|
+
"@types/node": "^20.8.7",
|
|
31
|
+
"@typescript-eslint/eslint-plugin": "^6.8.0",
|
|
32
|
+
"@typescript-eslint/parser": "^6.8.0",
|
|
33
|
+
"eslint": "^8.52.0",
|
|
34
|
+
"homebridge": "^1.6.1",
|
|
35
|
+
"nodemon": "^3.0.1",
|
|
36
|
+
"rimraf": "^5.0.5",
|
|
37
|
+
"ts-node": "^10.9.1",
|
|
38
|
+
"typescript": "^5.2.2"
|
|
39
|
+
}
|
|
40
|
+
}
|