homebridge-ismartgate-sensor 1.4.5 → 1.4.6
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/CHANGELOG.md +5 -0
- package/index.js +21 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
package/index.js
CHANGED
|
@@ -167,22 +167,41 @@ iSmartGate.prototype = {
|
|
|
167
167
|
this.log.debug('Obtained status.', response.data)
|
|
168
168
|
|
|
169
169
|
// Find the CurrentTemperature
|
|
170
|
-
|
|
170
|
+
if (response.data[0] > -270 && response.data[0] < 100) {
|
|
171
|
+
this.CurrentTemperature = response.data[0] / 1000
|
|
172
|
+
}
|
|
173
|
+
else {
|
|
174
|
+
this.log.warn('Unexpected temperature detected.', response.data)
|
|
175
|
+
this.log.warn('Check sensor battery')
|
|
176
|
+
this.CurrentTemperature = 0
|
|
177
|
+
}
|
|
171
178
|
|
|
172
179
|
// Find the BatteryLevel
|
|
173
180
|
switch (response.data[1]) {
|
|
174
181
|
case 'full':
|
|
175
182
|
this.BatteryLevel = 100
|
|
176
183
|
break
|
|
184
|
+
case '90':
|
|
185
|
+
this.BatteryLevel = 90
|
|
186
|
+
break
|
|
177
187
|
case '80':
|
|
178
188
|
this.BatteryLevel = 80
|
|
179
189
|
break
|
|
190
|
+
case '70':
|
|
191
|
+
this.BatteryLevel = 70
|
|
192
|
+
break
|
|
180
193
|
case '60':
|
|
181
194
|
this.BatteryLevel = 60
|
|
182
195
|
break
|
|
196
|
+
case '50':
|
|
197
|
+
this.BatteryLevel = 50
|
|
198
|
+
break
|
|
183
199
|
case '40':
|
|
184
200
|
this.BatteryLevel = 40
|
|
185
201
|
break
|
|
202
|
+
case '30':
|
|
203
|
+
this.BatteryLevel = 30
|
|
204
|
+
break
|
|
186
205
|
case '20':
|
|
187
206
|
this.BatteryLevel = 20
|
|
188
207
|
break
|
|
@@ -192,6 +211,7 @@ iSmartGate.prototype = {
|
|
|
192
211
|
|
|
193
212
|
default:
|
|
194
213
|
this.log.warn('Unexpected BatteryLevel detected.', response.data)
|
|
214
|
+
this.log.warn('Check sensor battery')
|
|
195
215
|
this.BatteryLevel = 0
|
|
196
216
|
break
|
|
197
217
|
}
|
package/package.json
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-ismartgate-sensor",
|
|
3
3
|
"displayName": "ismartgate sensor",
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.6",
|
|
5
5
|
"author": "John Valiquette",
|
|
6
6
|
"dependencies": {
|
|
7
|
-
"axios": "^1.
|
|
7
|
+
"axios": "^1.21.0"
|
|
8
8
|
},
|
|
9
9
|
"deprecated": false,
|
|
10
10
|
"description": "Homebridge plug-in for iSmartGate HomeKit devices to expose their Temperature & Battery sensor, which would otherwise be hidden.",
|
|
11
11
|
"engines": {
|
|
12
|
-
"homebridge": "^1.11.0 || ^2.
|
|
13
|
-
"node": "^
|
|
12
|
+
"homebridge": "^1.11.0 || ^2.1.0",
|
|
13
|
+
"node": "^22.19.0 || ^24.18.0 || ^26.4.0"
|
|
14
14
|
},
|
|
15
15
|
"keywords": [
|
|
16
16
|
"homebridge-plugin",
|