homebridge-gpio-electic-rim-lock 2.2.0 → 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.
- package/README.md +5 -0
- package/config.schema.json +1 -0
- package/index.js +6 -0
- package/package.json +3 -1
package/README.md
CHANGED
|
@@ -51,3 +51,8 @@ Fields:
|
|
|
51
51
|
* name - The door name visible in HomeKit, can be anything (required).
|
|
52
52
|
* pin - The physical GPIO pin number that controls the relay (required).
|
|
53
53
|
* duratin - Number of milliseconds to trigger the relay. Defaults to 500 millseconds (0,5 second) if not specified.
|
|
54
|
+
|
|
55
|
+
## Compatibility
|
|
56
|
+
|
|
57
|
+
This plugin is designed to run **only on Raspberry Pi** hardware because it uses the `rpio` library for GPIO access.
|
|
58
|
+
It **will not work on other Linux systems** or in Docker containers without GPIO support.
|
package/config.schema.json
CHANGED
package/index.js
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
var Service, Characteristic;
|
|
4
4
|
var rpio = require('rpio');
|
|
5
|
+
var os = require('os');
|
|
5
6
|
|
|
6
7
|
module.exports = function(homebridge) {
|
|
7
8
|
Service = homebridge.hap.Service;
|
|
@@ -36,6 +37,11 @@ function ElecticRimLockAccessory(log, config) {
|
|
|
36
37
|
return;
|
|
37
38
|
}
|
|
38
39
|
|
|
40
|
+
// Warn if not running on Raspberry Pi
|
|
41
|
+
if (os.arch() !== 'arm') {
|
|
42
|
+
this.log.warn("⚠ This plugin is intended to run only on Raspberry Pi. Some features may not work.");
|
|
43
|
+
}
|
|
44
|
+
|
|
39
45
|
if (this.duration == null || this.duration % 1 !== 0) this.duration = 500;
|
|
40
46
|
|
|
41
47
|
this.log("Tiro GPIO version: " + this.version);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-gpio-electic-rim-lock",
|
|
3
|
-
"version": "2.2.
|
|
3
|
+
"version": "2.2.1",
|
|
4
4
|
"description": "Homebridge plugin to open electric rim locks via Raspberry Pi GPIO pins",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
},
|
|
13
13
|
"keywords": [
|
|
14
14
|
"homebridge-plugin",
|
|
15
|
+
"homebridge-gpio",
|
|
16
|
+
"raspberry-pi-only",
|
|
15
17
|
"homebridge",
|
|
16
18
|
"homekit",
|
|
17
19
|
"smart home",
|