homebridge-rtl 0.0.30 → 0.0.32
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 +41 -3
- package/package.json +1 -1
- package/sensor.js +10 -4
package/README.md
CHANGED
|
@@ -14,7 +14,7 @@ Contributor added sensors:
|
|
|
14
14
|
* [Mighty Mule Driveway alarm](https://www.amazon.com/Mighty-Mule-Wireless-Driveway-FM231/dp/B003765W0W) see [instructions here](MIGHTY-MULE-DRIVEWAY-ALARM-INSTRUCTIONS.md)
|
|
15
15
|
|
|
16
16
|
## Features
|
|
17
|
-
* Supported sensors include Motion, Temperature and Humidity
|
|
17
|
+
* Supported sensors include Motion, Contact, Temperature and Humidity
|
|
18
18
|
* Also shows "not responding" if the sensor stops sending data
|
|
19
19
|
* For temperature and humidity sensors, has ability to create alarms if the current value exceeds a alarm value
|
|
20
20
|
|
|
@@ -32,7 +32,7 @@ I have tested this on both a Mac and a RPI3
|
|
|
32
32
|
* `platform`: "rtl_433"
|
|
33
33
|
* `name`: "Front Porch" - Name of device for display in the Home App
|
|
34
34
|
* `id`: id number of device - To find the ID of your device, run homebridge in DEBUG mode, and it will log the message received from all rtl_433 devices. See below for examples
|
|
35
|
-
* `type`: Type of sensor device. Supported sensors are `motion`, `temperature`, `humidity`
|
|
35
|
+
* `type`: Type of sensor device. Supported sensors are `motion`, `temperature`, `humidity`, and `contact`
|
|
36
36
|
* `alarm`: Optional, Create a fake contact sensor called name + Alarm. Value is temperature in Celsius that if exceeded will trigger contact sensor.
|
|
37
37
|
* `humidity`: Optional, For devices of type `temperature` that emits also humidity set to `true` and humidity will shows in HomeKit/Eve app in the sensor.
|
|
38
38
|
|
|
@@ -46,7 +46,18 @@ Example configuration:
|
|
|
46
46
|
"id": "1e3e8",
|
|
47
47
|
"name": "Front Porch",
|
|
48
48
|
"type": "motion"
|
|
49
|
-
}
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"id": "92",
|
|
52
|
+
"name": "Outside temperature",
|
|
53
|
+
"type": "temperature"
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
"id": "834551",
|
|
57
|
+
"name": "Front Door Sensor",
|
|
58
|
+
"type": "contact"
|
|
59
|
+
}
|
|
60
|
+
]
|
|
50
61
|
}]
|
|
51
62
|
```
|
|
52
63
|
|
|
@@ -58,6 +69,10 @@ Example configuration:
|
|
|
58
69
|
Message {"time" : "2019-04-03 09:43:05", "model" : "Skylink HA-434TL motion sensor", "motion" : "false", "id" : "1e3e8", "raw" : "5e3e8"}
|
|
59
70
|
|
|
60
71
|
id is 1e3e8
|
|
72
|
+
|
|
73
|
+
Message {"time" : "2022-03-23 20:11:54.643434", "protocol" : 68, "model" : "Kerui-Security", "id" : 840811, "cmd" : 10, "motion" : 1, "state" : "motion" }
|
|
74
|
+
|
|
75
|
+
id is 840811
|
|
61
76
|
```
|
|
62
77
|
|
|
63
78
|
* Temperature sensor log entries
|
|
@@ -85,6 +100,29 @@ Message {"time" : "2020-03-14 14:40:41", "model" : "Acurite tower sensor", "id"
|
|
|
85
100
|
id is 15424
|
|
86
101
|
```
|
|
87
102
|
|
|
103
|
+
```
|
|
104
|
+
Message {"time" : "2022-03-23 21:28:05.748872", "protocol" : 38, "model" : "Generic-Temperature", "id" : 92, "battery_ok" : 1, "temperature_C" : 6.100 }
|
|
105
|
+
|
|
106
|
+
id is 92 the channel 1 for tiny AVIDSEN Weather station
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
```
|
|
110
|
+
Message {"time" : "2022-03-29 21:32:16.707696", "protocol" : 19, "model" : "Nexus-TH", "id" : 36, "channel" : 1, "battery_ok" : 1, "temperature_C" : 11.800, "humidity" : 77 }
|
|
111
|
+
Message {"time" : "2022-03-29 21:32:35.938421", "protocol" : 19, "model" : "Nexus-TH", "id" : 31, "channel" : 2, "battery_ok" : 1, "temperature_C" : 12.800, "humidity" : 66 }
|
|
112
|
+
Message {"time" : "2022-03-29 21:32:47.165018", "protocol" : 19, "model" : "Nexus-TH", "id" : 198, "channel" : 3, "battery_ok" : 1, "temperature_C" : 20.900, "humidity" : 45 }
|
|
113
|
+
|
|
114
|
+
id are 36, 31 and 198 (Bresser Temeo Hygro Quadro)
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
* Contact Sensor log entries (Door or Window Open/Close)
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
Message {"time" : "2022-03-23 20:12:15.579712", "protocol" : 68, "model" : "Kerui-Security", "id" : 843552, "cmd" : 14, "opened" : 1, "state" : "open" }
|
|
121
|
+
Message {"time" : "2022-03-23 20:12:18.993887", "protocol" : 68, "model" : "Kerui-Security", "id" : 843552, "cmd" : 7, "opened" : 0, "state" : "close" }
|
|
122
|
+
|
|
123
|
+
id is 843552
|
|
124
|
+
```
|
|
125
|
+
|
|
88
126
|
## Credits
|
|
89
127
|
* merbanan - RTL_433 Sensor decoder
|
|
90
128
|
* simont77 - History Service
|
package/package.json
CHANGED
package/sensor.js
CHANGED
|
@@ -249,6 +249,9 @@ Rtl433Accessory.prototype = {
|
|
|
249
249
|
this.sensorService
|
|
250
250
|
.setCharacteristic(Characteristic.ContactSensorState, ( data.opened === 1 ? Characteristic.ContactSensorState.CONTACT_NOT_DETECTED : Characteristic.ContactSensorState.CONTACT_DETECTED ));
|
|
251
251
|
|
|
252
|
+
//this.timeout = setTimeout(deviceTimeout.bind(this), this.deviceTimeout * 60 * 1000);
|
|
253
|
+
clearTimeout(this.timeout);
|
|
254
|
+
|
|
252
255
|
if (data.battery !== undefined || data.battery_ok != undefined) {
|
|
253
256
|
this.sensorService
|
|
254
257
|
.setCharacteristic(Characteristic.StatusLowBattery, (data.battery === "OK" || data.battery_ok === 1 ? Characteristic.StatusLowBattery.BATTERY_LEVEL_NORMAL : Characteristic.StatusLowBattery.BATTERY_LEVEL_LOW));
|
|
@@ -352,8 +355,8 @@ Rtl433Accessory.prototype = {
|
|
|
352
355
|
this.sensorService = new Service.ContactSensor(this.name);
|
|
353
356
|
this.sensorService.addCharacteristic(CustomCharacteristic.LastActivation);
|
|
354
357
|
|
|
355
|
-
this.timeoutCharacteristic = Characteristic.ContactSensorState;
|
|
356
|
-
this.timeout = setTimeout(deviceTimeout.bind(this), this.deviceTimeout * 60 * 1000); // 5 minutes
|
|
358
|
+
//this.timeoutCharacteristic = Characteristic.ContactSensorState;
|
|
359
|
+
//this.timeout = setTimeout(deviceTimeout.bind(this), this.deviceTimeout * 60 * 1000); // 5 minutes
|
|
357
360
|
|
|
358
361
|
this.sensorService.log = this.log;
|
|
359
362
|
informationService
|
|
@@ -374,8 +377,10 @@ Rtl433Accessory.prototype = {
|
|
|
374
377
|
|
|
375
378
|
function deviceTimeout() {
|
|
376
379
|
this.log("Timeout", this.name);
|
|
377
|
-
|
|
378
|
-
|
|
380
|
+
|
|
381
|
+
if (this.sensorService !== undefined && this.timeoutCharacteristic !== undefined )
|
|
382
|
+
this.sensorService
|
|
383
|
+
.getCharacteristic(this.timeoutCharacteristic).updateValue(new Error("No response"));
|
|
379
384
|
}
|
|
380
385
|
|
|
381
386
|
function roundInt(string) {
|
|
@@ -422,3 +427,4 @@ function duplicateMessage(last, current) {
|
|
|
422
427
|
}
|
|
423
428
|
return false;
|
|
424
429
|
}
|
|
430
|
+
|