homebridge-pax-calima 2.4.3 → 2.4.4
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 +4 -0
- package/config.schema.json +7 -9
- package/index.js +11 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -192,6 +192,10 @@ This plugin meets all Homebridge 2.0 requirements:
|
|
|
192
192
|
|
|
193
193
|
## Release notes
|
|
194
194
|
|
|
195
|
+
### 2.4.4
|
|
196
|
+
- **Fixed:** Silent Hours time fields no longer show a raw regex pattern as validation hint in the Homebridge UI — replaced with plain human-readable placeholder text (e.g. `23:00`) and a description
|
|
197
|
+
- **Improved:** Invalid time format now logs a clear warning message rather than silently disabling the schedule
|
|
198
|
+
|
|
195
199
|
### 2.4.3
|
|
196
200
|
- **Silent Hours** reworked — now supports a config schedule (`silentHoursStart` / `silentHoursEnd`) that runs automatically, an optional HomeKit switch (`showSilentSwitch: true`) for Goodnight scenes and irregular schedules, or both together. The switch takes priority when toggled manually; the schedule runs as a background default. Any existing Silent Hours switch from earlier versions is automatically removed unless `showSilentSwitch` is enabled.
|
|
197
201
|
- **Light sensor** (`showLight`) added as opt-in — confirmed via live testing that the characteristic returns a static value regardless of lighting conditions.
|
package/config.schema.json
CHANGED
|
@@ -13,22 +13,20 @@
|
|
|
13
13
|
"silentHoursStart": {
|
|
14
14
|
"title": "Silent Hours — Start Time",
|
|
15
15
|
"type": "string",
|
|
16
|
-
"
|
|
17
|
-
"
|
|
18
|
-
"description": "When the fan stops boosting at night. 24-hour format. Leave blank to disable the schedule."
|
|
16
|
+
"placeholder": "23:00",
|
|
17
|
+
"description": "When the fan stops boosting at night. Enter in 24-hour format, e.g. 23:00. Leave blank to disable the schedule."
|
|
19
18
|
},
|
|
20
19
|
"silentHoursEnd": {
|
|
21
20
|
"title": "Silent Hours — End Time",
|
|
22
21
|
"type": "string",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"description": "When the fan resumes boosting in the morning. Both start and end must be set for the schedule to activate."
|
|
22
|
+
"placeholder": "07:00",
|
|
23
|
+
"description": "When the fan resumes boosting in the morning. Enter in 24-hour format, e.g. 07:00. Both start and end must be set for the schedule to activate."
|
|
26
24
|
},
|
|
27
25
|
"showSilentSwitch": {
|
|
28
26
|
"title": "Show Silent Hours Switch in Home",
|
|
29
27
|
"type": "boolean",
|
|
30
28
|
"default": false,
|
|
31
|
-
"description": "Adds a Silent Hours on/off switch to your accessory in the Home app. Useful for including in a Goodnight scene or automation.
|
|
29
|
+
"description": "Adds a Silent Hours on/off switch to your accessory in the Home app. Useful for including in a Goodnight scene or automation. Good for shift workers or irregular schedules."
|
|
32
30
|
},
|
|
33
31
|
"showHumidity": {
|
|
34
32
|
"title": "Show Humidity Sensor",
|
|
@@ -57,8 +55,8 @@
|
|
|
57
55
|
"mac": {
|
|
58
56
|
"title": "MAC Address",
|
|
59
57
|
"type": "string",
|
|
60
|
-
"
|
|
61
|
-
"description": "MAC address of the fan
|
|
58
|
+
"placeholder": "58:2b:db:xx:xx:xx",
|
|
59
|
+
"description": "MAC address of the fan — found in the official Pax or Vent-Axia app under About Device."
|
|
62
60
|
},
|
|
63
61
|
"pin": {
|
|
64
62
|
"title": "PIN Code",
|
package/index.js
CHANGED
|
@@ -15,13 +15,19 @@ const MAC_PREFIX = '58:2b:db';
|
|
|
15
15
|
const POLL_MS = 10000;
|
|
16
16
|
const RECONNECT_MS = 15000;
|
|
17
17
|
|
|
18
|
-
function parseTime(str) {
|
|
18
|
+
function parseTime(str, label) {
|
|
19
19
|
if (!str || typeof str !== 'string') return null;
|
|
20
20
|
const parts = str.split(':');
|
|
21
|
-
if (parts.length !== 2)
|
|
21
|
+
if (parts.length !== 2 || parts[0] === '' || parts[1] === '') {
|
|
22
|
+
console.warn('[PaxCalima] ' + (label || 'Silent Hours') + ' time "' + str + '" is not valid — use 24-hour format e.g. 23:00. Silent Hours schedule disabled.');
|
|
23
|
+
return null;
|
|
24
|
+
}
|
|
22
25
|
const hour = parseInt(parts[0], 10);
|
|
23
26
|
const minute = parseInt(parts[1], 10);
|
|
24
|
-
if (isNaN(hour) || isNaN(minute) || hour < 0 || hour > 23 || minute < 0 || minute > 59)
|
|
27
|
+
if (isNaN(hour) || isNaN(minute) || hour < 0 || hour > 23 || minute < 0 || minute > 59) {
|
|
28
|
+
console.warn('[PaxCalima] ' + (label || 'Silent Hours') + ' time "' + str + '" is out of range — use 24-hour format e.g. 23:00. Silent Hours schedule disabled.');
|
|
29
|
+
return null;
|
|
30
|
+
}
|
|
25
31
|
return { hour, minute };
|
|
26
32
|
}
|
|
27
33
|
|
|
@@ -124,8 +130,8 @@ class PaxCalimaAccessory {
|
|
|
124
130
|
this.showHumidity = options.showHumidity || false;
|
|
125
131
|
this.showLight = options.showLight || false;
|
|
126
132
|
this.showSilentSwitch = options.showSilentSwitch || false;
|
|
127
|
-
this.silentStart = parseTime(options.silentHoursStart);
|
|
128
|
-
this.silentEnd = parseTime(options.silentHoursEnd);
|
|
133
|
+
this.silentStart = parseTime(options.silentHoursStart, 'silentHoursStart');
|
|
134
|
+
this.silentEnd = parseTime(options.silentHoursEnd, 'silentHoursEnd');
|
|
129
135
|
|
|
130
136
|
this.currentRPM = 0;
|
|
131
137
|
this.humidity = 0;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-pax-calima",
|
|
3
3
|
"displayName": "Vent-Axia Svara / Pax Calima",
|
|
4
|
-
"version": "2.4.
|
|
4
|
+
"version": "2.4.4",
|
|
5
5
|
"description": "Bring your Pax Calima or Vent-Axia Svara bathroom fan into Apple Home via Bluetooth — live temperature and fan speed with Silent Hours scheduling and full automation support.",
|
|
6
6
|
"main": "index.js",
|
|
7
7
|
"keywords": [
|