@homebridge-plugins/homebridge-smarthq 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/.gitattributes +2 -0
- package/.github/FUNDING.yml +4 -0
- package/.github/ISSUE_TEMPLATE/bug-report.yml +91 -0
- package/.github/ISSUE_TEMPLATE/config.yml +8 -0
- package/.github/ISSUE_TEMPLATE/feature-request.yml +34 -0
- package/.github/ISSUE_TEMPLATE/support-request.yml +85 -0
- package/.github/ISSUE_TEMPLATE.md +48 -0
- package/.github/PULL_REQUEST_TEMPLATE/pull_request.md +27 -0
- package/.github/dependabot.yml +17 -0
- package/.github/labeler.yml +38 -0
- package/.github/release-drafter.yml +33 -0
- package/.github/workflows/beta-release.yml +55 -0
- package/.github/workflows/build.yml +18 -0
- package/.github/workflows/changerelease.yml +11 -0
- package/.github/workflows/labeler.yml +9 -0
- package/.github/workflows/release-drafter.yml +14 -0
- package/.github/workflows/release.yml +35 -0
- package/.github/workflows/stale.yml +12 -0
- package/CHANGELOG.md +17 -0
- package/LICENSE +14 -0
- package/README.md +52 -0
- package/SECURITY.md +19 -0
- package/branding/Homebridge_x_Air.svg +27 -0
- package/branding/icon.png +0 -0
- package/config.schema.json +163 -0
- package/dist/devices/device.d.ts +47 -0
- package/dist/devices/device.d.ts.map +1 -0
- package/dist/devices/device.js +181 -0
- package/dist/devices/device.js.map +1 -0
- package/dist/devices/dishwashers.d.ts +30 -0
- package/dist/devices/dishwashers.d.ts.map +1 -0
- package/dist/devices/dishwashers.js +78 -0
- package/dist/devices/dishwashers.js.map +1 -0
- package/dist/homebridge-ui/public/index.html +338 -0
- package/dist/homebridge-ui/server.d.ts +2 -0
- package/dist/homebridge-ui/server.d.ts.map +1 -0
- package/dist/homebridge-ui/server.js +48 -0
- package/dist/homebridge-ui/server.js.map +1 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/platform.d.ts +74 -0
- package/dist/platform.d.ts.map +1 -0
- package/dist/platform.js +315 -0
- package/dist/platform.js.map +1 -0
- package/dist/settings.d.ts +30 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +9 -0
- package/dist/settings.js.map +1 -0
- package/docs/.nojekyll +1 -0
- package/docs/assets/highlight.css +22 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1493 -0
- package/docs/index.html +34 -0
- package/docs/modules.html +1 -0
- package/eslint.config.js +50 -0
- package/package.json +91 -0
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { PlatformAccessory } from 'homebridge';
|
|
2
|
+
import type { SmartHQPlatform } from '../platform.js';
|
|
3
|
+
import type { devicesConfig } from '../settings.js';
|
|
4
|
+
import { deviceBase } from './device.js';
|
|
5
|
+
/**
|
|
6
|
+
* Platform Accessory
|
|
7
|
+
* An instance of this class is created for each accessory your platform registers
|
|
8
|
+
* Each accessory may expose multiple services of different service types.
|
|
9
|
+
*/
|
|
10
|
+
export declare class DishWasher extends deviceBase {
|
|
11
|
+
readonly platform: SmartHQPlatform;
|
|
12
|
+
private DishWasher;
|
|
13
|
+
SensorUpdateInProgress: boolean;
|
|
14
|
+
deviceStatus: any;
|
|
15
|
+
constructor(platform: SmartHQPlatform, accessory: PlatformAccessory, device: devicesConfig);
|
|
16
|
+
/**
|
|
17
|
+
* Parse the device status from the SmartHQ api
|
|
18
|
+
*/
|
|
19
|
+
parseStatus(): Promise<void>;
|
|
20
|
+
/**
|
|
21
|
+
* Asks the SmartHQ API for the latest device information
|
|
22
|
+
*/
|
|
23
|
+
refreshStatus(): Promise<void>;
|
|
24
|
+
/**
|
|
25
|
+
* Updates the status for each of the HomeKit Characteristics
|
|
26
|
+
*/
|
|
27
|
+
updateHomeKitCharacteristics(): Promise<void>;
|
|
28
|
+
apiError(e: any): Promise<void>;
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=dishwashers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dishwashers.d.ts","sourceRoot":"","sources":["../../src/devices/dishwashers.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAuB,iBAAiB,EAAW,MAAM,YAAY,CAAA;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAA;AAMnD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC;;;;GAIG;AACH,qBAAa,UAAW,SAAQ,UAAU;IAatC,QAAQ,CAAC,QAAQ,EAAE,eAAe;IAXpC,OAAO,CAAC,UAAU,CAIjB;IAGD,sBAAsB,EAAG,OAAO,CAAA;IAChC,YAAY,EAAE,GAAG,CAAA;gBAGN,QAAQ,EAAE,eAAe,EAClC,SAAS,EAAE,iBAAiB,EAC5B,MAAM,EAAE,aAAa;IA+BvB;;OAEG;IACG,WAAW;IASjB;;OAEG;IACG,aAAa;IAUnB;;OAEG;IACG,4BAA4B,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtC,QAAQ,CAAC,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7C"}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { interval } from 'rxjs';
|
|
2
|
+
import { skipWhile } from 'rxjs/operators';
|
|
3
|
+
// import { request } from 'undici'
|
|
4
|
+
import { deviceBase } from './device.js';
|
|
5
|
+
/**
|
|
6
|
+
* Platform Accessory
|
|
7
|
+
* An instance of this class is created for each accessory your platform registers
|
|
8
|
+
* Each accessory may expose multiple services of different service types.
|
|
9
|
+
*/
|
|
10
|
+
export class DishWasher extends deviceBase {
|
|
11
|
+
platform;
|
|
12
|
+
// Service
|
|
13
|
+
DishWasher;
|
|
14
|
+
// Updates
|
|
15
|
+
SensorUpdateInProgress;
|
|
16
|
+
deviceStatus;
|
|
17
|
+
constructor(platform, accessory, device) {
|
|
18
|
+
super(platform, accessory, device);
|
|
19
|
+
this.platform = platform;
|
|
20
|
+
// AirQuality Sensor Service
|
|
21
|
+
this.debugLog('Configure AirQuality Sensor Service');
|
|
22
|
+
accessory.context.DishWasher = accessory.context.DishWasher ?? {};
|
|
23
|
+
this.DishWasher = {
|
|
24
|
+
Name: this.accessory.displayName,
|
|
25
|
+
Service: this.accessory.getService(this.hap.Service.Switch) ?? this.accessory.addService(this.hap.Service.Switch),
|
|
26
|
+
On: accessory.context.On ?? this.hap.Characteristic.On,
|
|
27
|
+
};
|
|
28
|
+
accessory.context.DishWasher = this.DishWasher;
|
|
29
|
+
// Add AirQuality Sensor Service's Characteristics
|
|
30
|
+
this.DishWasher.Service.setCharacteristic(this.hap.Characteristic.Name, this.DishWasher.Name);
|
|
31
|
+
// this is subject we use to track when we need to POST changes to the SmartHQ API
|
|
32
|
+
this.SensorUpdateInProgress = false;
|
|
33
|
+
// Retrieve initial values and updateHomekit
|
|
34
|
+
this.refreshStatus();
|
|
35
|
+
// Start an update interval
|
|
36
|
+
interval(this.deviceRefreshRate * 10000)
|
|
37
|
+
.pipe(skipWhile(() => this.SensorUpdateInProgress))
|
|
38
|
+
.subscribe(async () => {
|
|
39
|
+
await this.refreshStatus();
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Parse the device status from the SmartHQ api
|
|
44
|
+
*/
|
|
45
|
+
async parseStatus() {
|
|
46
|
+
try {
|
|
47
|
+
//
|
|
48
|
+
}
|
|
49
|
+
catch (e) {
|
|
50
|
+
await this.errorLog(`failed to parseStatus, Error Message: ${JSON.stringify(e.message ?? e)}`);
|
|
51
|
+
await this.apiError(e);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Asks the SmartHQ API for the latest device information
|
|
56
|
+
*/
|
|
57
|
+
async refreshStatus() {
|
|
58
|
+
try {
|
|
59
|
+
await this.parseStatus();
|
|
60
|
+
await this.updateHomeKitCharacteristics();
|
|
61
|
+
}
|
|
62
|
+
catch (e) {
|
|
63
|
+
await this.errorLog(`failed to update status, Error Message: ${JSON.stringify(e.message ?? e)}`);
|
|
64
|
+
await this.apiError(e);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* Updates the status for each of the HomeKit Characteristics
|
|
69
|
+
*/
|
|
70
|
+
async updateHomeKitCharacteristics() {
|
|
71
|
+
// AirQuality
|
|
72
|
+
await this.updateCharacteristic(this.DishWasher.Service, this.hap.Characteristic.On, this.DishWasher.On, 'On');
|
|
73
|
+
}
|
|
74
|
+
async apiError(e) {
|
|
75
|
+
this.DishWasher.Service.updateCharacteristic(this.hap.Characteristic.On, e);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
//# sourceMappingURL=dishwashers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dishwashers.js","sourceRoot":"","sources":["../../src/devices/dishwashers.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
<p class="text-center">
|
|
2
|
+
<img src="https://raw.githubusercontent.com/homebridge-plugins/homebridge-smarthq/latest/branding/Homebridge_x_Air.svg"
|
|
3
|
+
alt="@homebridge-plugins/homebridge-smarthq logo" style="width: 40%" />
|
|
4
|
+
</p>
|
|
5
|
+
<div id="pageIntro" style="display: none">
|
|
6
|
+
<p class="lead text-center">Thank you for installing <strong>@homebridge-plugins/homebridge-smarthq</strong></p>
|
|
7
|
+
<p class="lead text-center">Before continuing:</p>
|
|
8
|
+
<ol>
|
|
9
|
+
<li class="mb-3">Login / create an account at <a href="https://docs.airnowapi.org/faq" target="_blank"
|
|
10
|
+
rel="noreferrer noopener">https://docs.airnowapi.org/faq</a>.</li>
|
|
11
|
+
<li class="mb-3">Click <strong>Web Services</strong>.</li>
|
|
12
|
+
<li>Copy Your API Key in the top right.</li>
|
|
13
|
+
</ol>
|
|
14
|
+
<div class="text-center">
|
|
15
|
+
<button type="button" class="btn btn-primary" id="introLink">Continue →</button>
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
<div id="menuWrapper" class="btn-group w-100 mb-0" role="group" aria-label="UI Menu" style="display: none">
|
|
19
|
+
<button type="button" class="btn btn-primary" id="menuLocation">Location</button>
|
|
20
|
+
<button type="button" class="btn btn-primary" id="menuSettings">Settings</button>
|
|
21
|
+
<button type="button" class="btn btn-primary" id="menuDevices">Devices</button>
|
|
22
|
+
<button type="button" class="btn btn-primary mr-0" id="menuHome">Support</button>
|
|
23
|
+
</div>
|
|
24
|
+
<div id="disabledBanner" class="alert alert-secondary mb-0 mt-3" role="alert" style="display: none">
|
|
25
|
+
Plugin is currently disabled
|
|
26
|
+
<button id="disabledEnable" type="button" class="btn btn-link p-0 m-0 float-right">Enable</button>
|
|
27
|
+
</div>
|
|
28
|
+
<div id="pageLocation" style="display: none;">
|
|
29
|
+
<button type="button" class="btn btn-primary mb-3" id="getLocation">Use Current Location</button>
|
|
30
|
+
<div class="mb-2">
|
|
31
|
+
<label for="latitudeField">Latitude:</label>
|
|
32
|
+
<input type="text" id="latitudeField" name="latitude">
|
|
33
|
+
<button type="button" class="btn btn-outline-secondary btn-sm" id="copyLatitude">Copy</button>
|
|
34
|
+
</div>
|
|
35
|
+
<div>
|
|
36
|
+
<label for="longitudeField">Longitude:</label>
|
|
37
|
+
<input type="text" id="longitudeField" name="longitude">
|
|
38
|
+
<button type="button" class="btn btn-outline-secondary btn-sm" id="copyLongitude">Copy</button>
|
|
39
|
+
</div>
|
|
40
|
+
</div>
|
|
41
|
+
<div id="pageDevices" class="mt-4" style="display: none">
|
|
42
|
+
<div id="deviceInfo">
|
|
43
|
+
<form>
|
|
44
|
+
<div class="form-group">
|
|
45
|
+
<select class="form-control" id="deviceSelect"></select>
|
|
46
|
+
</div>
|
|
47
|
+
</form>
|
|
48
|
+
<table class="table w-100" id="deviceTable" style="display: none">
|
|
49
|
+
<thead>
|
|
50
|
+
<tr class="table-active">
|
|
51
|
+
<th scope="col" style="width: 40%">Device Name</th>
|
|
52
|
+
<th scope="col" style="width: 60%" id="displayName"></th>
|
|
53
|
+
</tr>
|
|
54
|
+
</thead>
|
|
55
|
+
<tbody>
|
|
56
|
+
<tr>
|
|
57
|
+
<th scope="row">Serial Number</th>
|
|
58
|
+
<td id="serialNumber"></td>
|
|
59
|
+
</tr>
|
|
60
|
+
<tr>
|
|
61
|
+
<th scope="row">Model</th>
|
|
62
|
+
<td id="model"></td>
|
|
63
|
+
</tr>
|
|
64
|
+
<tr>
|
|
65
|
+
<th scope="row">Firmware Version</th>
|
|
66
|
+
<td id="firmwareRevision"></td>
|
|
67
|
+
</tr>
|
|
68
|
+
</tbody>
|
|
69
|
+
</table>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
<div id="pageSupport" class="mt-4" style="display: none">
|
|
73
|
+
<p class="text-center lead">Thank you for using <strong>@homebridge-plugins/homebridge-smarthq</strong></p>
|
|
74
|
+
<p class="text-center">The links below will take you to our GitHub wiki</p>
|
|
75
|
+
<h5>Setup</h5>
|
|
76
|
+
<ul>
|
|
77
|
+
<li>
|
|
78
|
+
<a href="https://github.com/homebridge-plugins/homebridge-smarthq/wiki" target="_blank">Wiki Home</a>
|
|
79
|
+
</li>
|
|
80
|
+
<li>
|
|
81
|
+
<a href="https://github.com/homebridge-plugins/homebridge-smarthq/wiki/Configuration" target="_blank">Configuration</a>
|
|
82
|
+
</li>
|
|
83
|
+
<li>
|
|
84
|
+
<a href="https://github.com/homebridge-plugins/homebridge-smarthq/wiki/Beta-Version" target="_blank">Beta Version</a>
|
|
85
|
+
</li>
|
|
86
|
+
<li>
|
|
87
|
+
<a href="https://github.com/homebridge-plugins/homebridge-smarthq/wiki/Node-Version" target="_blank">Node Version</a>
|
|
88
|
+
</li>
|
|
89
|
+
<li>
|
|
90
|
+
<a href="https://github.com/homebridge-plugins/homebridge-smarthq/wiki/Uninstallation" target="_blank">Uninstallation</a>
|
|
91
|
+
</li>
|
|
92
|
+
</ul>
|
|
93
|
+
<h5>Features</h5>
|
|
94
|
+
<ul>
|
|
95
|
+
<li>
|
|
96
|
+
<a href="https://github.com/homebridge-plugins/homebridge-smarthq/wiki/Supported-Devices" target="_blank">Supported
|
|
97
|
+
Devices</a>
|
|
98
|
+
</li>
|
|
99
|
+
<li>
|
|
100
|
+
<a href="https://github.com/homebridge-plugins/homebridge-smarthq/wiki/Fan-Modes" target="_blank">Fan Modes</a>
|
|
101
|
+
</li>
|
|
102
|
+
</ul>
|
|
103
|
+
<h5>Help/About</h5>
|
|
104
|
+
<ul>
|
|
105
|
+
<li>
|
|
106
|
+
<a href="https://github.com/homebridge-plugins/homebridge-smarthq/issues/new/choose" target="_blank">Support Request</a>
|
|
107
|
+
</li>
|
|
108
|
+
<li>
|
|
109
|
+
<a href="https://github.com/homebridge-plugins/homebridge-smarthq/blob/latest/CHANGELOG.md" target="_blank">Changelog</a>
|
|
110
|
+
</li>
|
|
111
|
+
<li>
|
|
112
|
+
<a href="https://github.com/sponsors/donavanbecker" target="_blank">About Me</a>
|
|
113
|
+
</li>
|
|
114
|
+
</ul>
|
|
115
|
+
<h5>Disclaimer</h5>
|
|
116
|
+
<ul>
|
|
117
|
+
<li>I am in no way affiliated with Airnow and this plugin is a personal project that I maintain in my free time.
|
|
118
|
+
</li>
|
|
119
|
+
<li>Use this plugin entirely at your own risk - please see licence for more information.</li>
|
|
120
|
+
</ul>
|
|
121
|
+
</div>
|
|
122
|
+
<script>
|
|
123
|
+
(async () => {
|
|
124
|
+
try {
|
|
125
|
+
const currentConfig = await homebridge.getPluginConfig();
|
|
126
|
+
|
|
127
|
+
const showIntro = () => {
|
|
128
|
+
const introLink = document.getElementById('introLink');
|
|
129
|
+
introLink.addEventListener('click', () => {
|
|
130
|
+
homebridge.showSpinner();
|
|
131
|
+
document.getElementById('pageIntro').style.display = 'none';
|
|
132
|
+
document.getElementById('menuWrapper').style.display = 'inline-flex';
|
|
133
|
+
showLocation();
|
|
134
|
+
homebridge.hideSpinner();
|
|
135
|
+
});
|
|
136
|
+
document.getElementById('menuWrapper').style.display = 'none';
|
|
137
|
+
document.getElementById('pageIntro').style.display = 'block';
|
|
138
|
+
};
|
|
139
|
+
|
|
140
|
+
const showDevices = async () => {
|
|
141
|
+
homebridge.showSpinner();
|
|
142
|
+
homebridge.hideSchemaForm();
|
|
143
|
+
document.getElementById('menuHome').classList.remove('btn-elegant');
|
|
144
|
+
document.getElementById('menuHome').classList.add('btn-primary');
|
|
145
|
+
document.getElementById('menuDevices').classList.add('btn-elegant');
|
|
146
|
+
document.getElementById('menuDevices').classList.remove('btn-primary');
|
|
147
|
+
document.getElementById('menuLocation').classList.remove('btn-elegant');
|
|
148
|
+
document.getElementById('menuLocation').classList.add('btn-primary');
|
|
149
|
+
document.getElementById('menuSettings').classList.remove('btn-elegant');
|
|
150
|
+
document.getElementById('menuSettings').classList.add('btn-primary');
|
|
151
|
+
document.getElementById('pageLocation').style.display = 'none';
|
|
152
|
+
document.getElementById('pageSupport').style.display = 'none';
|
|
153
|
+
document.getElementById('pageDevices').style.display = 'block';
|
|
154
|
+
const cachedAccessories =
|
|
155
|
+
typeof homebridge.getCachedAccessories === 'function'
|
|
156
|
+
? await homebridge.getCachedAccessories()
|
|
157
|
+
: await homebridge.request('/getCachedAccessories');
|
|
158
|
+
if (cachedAccessories.length > 0) {
|
|
159
|
+
cachedAccessories.sort((a, b) => {
|
|
160
|
+
return a.displayName.toLowerCase() > b.displayName.toLowerCase() ? 1 : b.displayName.toLowerCase() > a.displayName.toLowerCase() ? -1 : 0;
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
const deviceSelect = document.getElementById('deviceSelect');
|
|
164
|
+
deviceSelect.innerHTML = '';
|
|
165
|
+
cachedAccessories.forEach((a) => {
|
|
166
|
+
const option = document.createElement('option');
|
|
167
|
+
option.text = a.displayName;
|
|
168
|
+
option.value = a.UUID;
|
|
169
|
+
deviceSelect.add(option);
|
|
170
|
+
});
|
|
171
|
+
const showDeviceInfo = async (UUID) => {
|
|
172
|
+
homebridge.showSpinner();
|
|
173
|
+
const thisAcc = cachedAccessories.find((x) => x.UUID === UUID);
|
|
174
|
+
const context = thisAcc.context;
|
|
175
|
+
document.getElementById('displayName').innerHTML = thisAcc.displayName;
|
|
176
|
+
document.getElementById('serialNumber').innerHTML = context.serialNumber;
|
|
177
|
+
document.getElementById('model').innerHTML = context.model;
|
|
178
|
+
document.getElementById('firmwareRevision').innerHTML = context.firmwareRevision || 'N/A';
|
|
179
|
+
document.getElementById('deviceTable').style.display = 'inline-table';
|
|
180
|
+
homebridge.hideSpinner();
|
|
181
|
+
};
|
|
182
|
+
deviceSelect.addEventListener('change', (event) => showDeviceInfo(event.target.value));
|
|
183
|
+
if (cachedAccessories.length > 0) {
|
|
184
|
+
showDeviceInfo(cachedAccessories[0].UUID);
|
|
185
|
+
} else {
|
|
186
|
+
const option = document.createElement('option');
|
|
187
|
+
option.text = 'No Devices';
|
|
188
|
+
deviceSelect.add(option);
|
|
189
|
+
deviceSelect.disabled = true;
|
|
190
|
+
}
|
|
191
|
+
homebridge.hideSpinner();
|
|
192
|
+
};
|
|
193
|
+
|
|
194
|
+
const showSupport = () => {
|
|
195
|
+
homebridge.showSpinner();
|
|
196
|
+
homebridge.hideSchemaForm();
|
|
197
|
+
document.getElementById('menuHome').classList.add('btn-elegant');
|
|
198
|
+
document.getElementById('menuHome').classList.remove('btn-primary');
|
|
199
|
+
document.getElementById('menuDevices').classList.remove('btn-elegant');
|
|
200
|
+
document.getElementById('menuDevices').classList.add('btn-primary');
|
|
201
|
+
document.getElementById('menuLocation').classList.remove('btn-elegant');
|
|
202
|
+
document.getElementById('menuLocation').classList.add('btn-primary');
|
|
203
|
+
document.getElementById('menuSettings').classList.remove('btn-elegant');
|
|
204
|
+
document.getElementById('menuSettings').classList.add('btn-primary');
|
|
205
|
+
document.getElementById('pageLocation').style.display = 'none';
|
|
206
|
+
document.getElementById('pageSupport').style.display = 'block';
|
|
207
|
+
document.getElementById('pageDevices').style.display = 'none';
|
|
208
|
+
homebridge.hideSpinner();
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
const showLocation = () => {
|
|
212
|
+
document.getElementById('getLocation').addEventListener('click', () => {
|
|
213
|
+
if (navigator.geolocation) {
|
|
214
|
+
navigator.geolocation.getCurrentPosition((position) => {
|
|
215
|
+
const latitude = position.coords.latitude;
|
|
216
|
+
const longitude = position.coords.longitude;
|
|
217
|
+
|
|
218
|
+
// Assign the latitude and longitude to the input fields
|
|
219
|
+
document.getElementById('latitudeField').value = latitude;
|
|
220
|
+
document.getElementById('longitudeField').value = longitude;
|
|
221
|
+
|
|
222
|
+
homebridge.toast.success('Location fetched successfully.', 'Success');
|
|
223
|
+
}, (error) => {
|
|
224
|
+
let errorMessage = 'Error getting location: ';
|
|
225
|
+
switch (error.code) {
|
|
226
|
+
case error.PERMISSION_DENIED:
|
|
227
|
+
errorMessage += 'User denied the request for Geolocation.';
|
|
228
|
+
break;
|
|
229
|
+
case error.POSITION_UNAVAILABLE:
|
|
230
|
+
errorMessage += 'Location information is unavailable.';
|
|
231
|
+
break;
|
|
232
|
+
case error.TIMEOUT:
|
|
233
|
+
errorMessage += 'The request to get user location timed out.';
|
|
234
|
+
break;
|
|
235
|
+
case error.UNKNOWN_ERROR:
|
|
236
|
+
errorMessage += 'An unknown error occurred.';
|
|
237
|
+
break;
|
|
238
|
+
}
|
|
239
|
+
console.error(errorMessage, error);
|
|
240
|
+
homebridge.toast.error(errorMessage, 'Error');
|
|
241
|
+
});
|
|
242
|
+
} else {
|
|
243
|
+
homebridge.toast.error('Geolocation is not supported by this browser.', 'Error');
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
|
|
247
|
+
document.getElementById('copyLatitude').addEventListener('click', () => {
|
|
248
|
+
const latitude = document.getElementById('latitudeField').value;
|
|
249
|
+
navigator.clipboard.writeText(latitude).then(() => {
|
|
250
|
+
homebridge.toast.success('Latitude copied to clipboard.', 'Success');
|
|
251
|
+
}).catch((error) => {
|
|
252
|
+
console.error('Error copying latitude:', error);
|
|
253
|
+
homebridge.toast.error('Error copying latitude: ' + error.message, 'Error');
|
|
254
|
+
});
|
|
255
|
+
});
|
|
256
|
+
|
|
257
|
+
document.getElementById('copyLongitude').addEventListener('click', () => {
|
|
258
|
+
const longitude = document.getElementById('longitudeField').value;
|
|
259
|
+
navigator.clipboard.writeText(longitude).then(() => {
|
|
260
|
+
homebridge.toast.success('Longitude copied to clipboard.', 'Success');
|
|
261
|
+
}).catch((error) => {
|
|
262
|
+
console.error('Error copying longitude:', error);
|
|
263
|
+
homebridge.toast.error('Error copying longitude: ' + error.message, 'Error');
|
|
264
|
+
});
|
|
265
|
+
});
|
|
266
|
+
|
|
267
|
+
homebridge.showSpinner();
|
|
268
|
+
homebridge.hideSchemaForm();
|
|
269
|
+
document.getElementById('menuHome').classList.remove('btn-elegant');
|
|
270
|
+
document.getElementById('menuHome').classList.add('btn-primary');
|
|
271
|
+
document.getElementById('menuDevices').classList.remove('btn-elegant');
|
|
272
|
+
document.getElementById('menuDevices').classList.add('btn-primary');
|
|
273
|
+
document.getElementById('menuLocation').classList.add('btn-elegant');
|
|
274
|
+
document.getElementById('menuLocation').classList.remove('btn-primary');
|
|
275
|
+
document.getElementById('menuSettings').classList.remove('btn-elegant');
|
|
276
|
+
document.getElementById('menuSettings').classList.add('btn-primary');
|
|
277
|
+
document.getElementById('pageLocation').style.display = 'block';
|
|
278
|
+
document.getElementById('pageSupport').style.display = 'none';
|
|
279
|
+
document.getElementById('pageDevices').style.display = 'none';
|
|
280
|
+
homebridge.hideSpinner();
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
document.getElementById('menuLocation').addEventListener('click', showLocation);
|
|
284
|
+
|
|
285
|
+
const showSettings = () => {
|
|
286
|
+
homebridge.showSpinner();
|
|
287
|
+
document.getElementById('menuHome').classList.remove('btn-elegant');
|
|
288
|
+
document.getElementById('menuHome').classList.add('btn-primary');
|
|
289
|
+
document.getElementById('menuDevices').classList.remove('btn-elegant');
|
|
290
|
+
document.getElementById('menuDevices').classList.add('btn-primary');
|
|
291
|
+
document.getElementById('menuLocation').classList.remove('btn-elegant');
|
|
292
|
+
document.getElementById('menuLocation').classList.add('btn-primary');
|
|
293
|
+
document.getElementById('menuSettings').classList.add('btn-elegant');
|
|
294
|
+
document.getElementById('menuSettings').classList.remove('btn-primary');
|
|
295
|
+
document.getElementById('pageLocation').style.display = 'none';
|
|
296
|
+
document.getElementById('pageSupport').style.display = 'none';
|
|
297
|
+
document.getElementById('pageDevices').style.display = 'none';
|
|
298
|
+
homebridge.showSchemaForm();
|
|
299
|
+
homebridge.hideSpinner();
|
|
300
|
+
};
|
|
301
|
+
|
|
302
|
+
const showDisabledBanner = () => {
|
|
303
|
+
document.getElementById('disabledBanner').style.display = 'block';
|
|
304
|
+
};
|
|
305
|
+
|
|
306
|
+
const enablePlugin = async () => {
|
|
307
|
+
homebridge.showSpinner();
|
|
308
|
+
document.getElementById('disabledBanner').style.display = 'none';
|
|
309
|
+
currentConfig[0].disablePlugin = false;
|
|
310
|
+
await homebridge.updatePluginConfig(currentConfig);
|
|
311
|
+
await homebridge.savePluginConfig();
|
|
312
|
+
homebridge.hideSpinner();
|
|
313
|
+
};
|
|
314
|
+
|
|
315
|
+
document.getElementById('menuHome').addEventListener('click', () => showSupport());
|
|
316
|
+
document.getElementById('menuDevices').addEventListener('click', () => showDevices());
|
|
317
|
+
document.getElementById('menuLocation').addEventListener('click', () => showLocation());
|
|
318
|
+
document.getElementById('menuSettings').addEventListener('click', () => showSettings());
|
|
319
|
+
document.getElementById('disabledEnable').addEventListener('click', () => enablePlugin());
|
|
320
|
+
|
|
321
|
+
if (currentConfig.length) {
|
|
322
|
+
document.getElementById('menuWrapper').style.display = 'inline-flex';
|
|
323
|
+
showLocation(); // Set Location as the default tab
|
|
324
|
+
if (currentConfig[0].disablePlugin) {
|
|
325
|
+
showDisabledBanner();
|
|
326
|
+
}
|
|
327
|
+
} else {
|
|
328
|
+
currentConfig.push({ name: 'SmartHQ' });
|
|
329
|
+
await homebridge.updatePluginConfig(currentConfig);
|
|
330
|
+
showIntro();
|
|
331
|
+
}
|
|
332
|
+
} catch (err) {
|
|
333
|
+
homebridge.toast.error(err.message, 'Error');
|
|
334
|
+
} finally {
|
|
335
|
+
homebridge.hideSpinner();
|
|
336
|
+
}
|
|
337
|
+
})();
|
|
338
|
+
</script>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../../src/homebridge-ui/server.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/* Copyright(C) 2021-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
2
|
+
*
|
|
3
|
+
* server.ts: @homebridge-plugins/homebridge-smarthq.
|
|
4
|
+
*/
|
|
5
|
+
import fs from 'node:fs';
|
|
6
|
+
import { HomebridgePluginUiServer } from '@homebridge/plugin-ui-utils';
|
|
7
|
+
import { PLUGIN_NAME } from '../settings.js';
|
|
8
|
+
class PluginUiServer extends HomebridgePluginUiServer {
|
|
9
|
+
constructor() {
|
|
10
|
+
super();
|
|
11
|
+
/*
|
|
12
|
+
A native method getCachedAccessories() was introduced in config-ui-x v4.37.0
|
|
13
|
+
The following is for users who have a lower version of config-ui-x
|
|
14
|
+
*/
|
|
15
|
+
this.onRequest('getCachedAccessories', () => {
|
|
16
|
+
try {
|
|
17
|
+
const plugin = PLUGIN_NAME ?? '@homebridge-plugins/homebridge-smarthq';
|
|
18
|
+
const devicesToReturn = [];
|
|
19
|
+
// The path and file of the cached accessories
|
|
20
|
+
const accFile = `${this.homebridgeStoragePath}/accessories/cachedAccessories`;
|
|
21
|
+
// Check the file exists
|
|
22
|
+
if (fs.existsSync(accFile)) {
|
|
23
|
+
// read the cached accessories file
|
|
24
|
+
const cachedAccessories = JSON.parse(fs.readFileSync(accFile, 'utf8'));
|
|
25
|
+
cachedAccessories.forEach((accessory) => {
|
|
26
|
+
// Check the accessory is from this plugin
|
|
27
|
+
if (accessory.plugin === plugin) {
|
|
28
|
+
// Add the cached accessory to the array
|
|
29
|
+
devicesToReturn.push(accessory.accessory);
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
// Return the array
|
|
34
|
+
return devicesToReturn;
|
|
35
|
+
}
|
|
36
|
+
catch {
|
|
37
|
+
// Just return an empty accessory list in case of any errors
|
|
38
|
+
return [];
|
|
39
|
+
}
|
|
40
|
+
});
|
|
41
|
+
this.ready();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
function startPluginUiServer() {
|
|
45
|
+
return new PluginUiServer();
|
|
46
|
+
}
|
|
47
|
+
startPluginUiServer();
|
|
48
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../../src/homebridge-ui/server.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,MAAM,SAAS,CAAA;AAExB,OAAO,EAAE,wBAAwB,EAAE,MAAM,6BAA6B,CAAA;AAEtE,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAA;AAE5C,MAAM,cAAe,SAAQ,wBAAwB;IACnD;QACE,KAAK,EAAE,CAAA;QACP;;;UAGE;QACF,IAAI,CAAC,SAAS,CAAC,sBAAsB,EAAE,GAAG,EAAE;YAC1C,IAAI,CAAC;gBACH,MAAM,MAAM,GAAG,WAAW,IAAI,wCAAwC,CAAA;gBACtE,MAAM,eAAe,GAAG,EAAE,CAAA;gBAE1B,8CAA8C;gBAC9C,MAAM,OAAO,GAAG,GAAG,IAAI,CAAC,qBAAqB,gCAAgC,CAAA;gBAE7E,wBAAwB;gBACxB,IAAI,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,EAAE,CAAC;oBAC3B,mCAAmC;oBACnC,MAAM,iBAAiB,GAAU,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC,CAAA;oBAE7E,iBAAiB,CAAC,OAAO,CAAC,CAAC,SAAc,EAAE,EAAE;wBAC3C,0CAA0C;wBAC1C,IAAI,SAAS,CAAC,MAAM,KAAK,MAAM,EAAE,CAAC;4BAChC,wCAAwC;4BACxC,eAAe,CAAC,IAAI,CAAC,SAAS,CAAC,SAAkB,CAAC,CAAA;wBACpD,CAAC;oBACH,CAAC,CAAC,CAAA;gBACJ,CAAC;gBACD,mBAAmB;gBACnB,OAAO,eAAe,CAAA;YACxB,CAAC;YAAC,MAAM,CAAC;gBACP,4DAA4D;gBAC5D,OAAO,EAAE,CAAA;YACX,CAAC;QACH,CAAC,CAAC,CAAA;QACF,IAAI,CAAC,KAAK,EAAE,CAAA;IACd,CAAC;CACF;AAED,SAAS,mBAAmB;IAC1B,OAAO,IAAI,cAAc,EAAE,CAAA;AAC7B,CAAC;AAED,mBAAmB,EAAE,CAAA"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,EAAE,MAAM,YAAY,CAAA;8BAMhB,GAAG,KAAG,IAAI;AAA/B,wBAEC"}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { SmartHQPlatform } from './platform.js';
|
|
2
|
+
import { PLATFORM_NAME, PLUGIN_NAME } from './settings.js';
|
|
3
|
+
// Register our platform with homebridge.
|
|
4
|
+
export default (api) => {
|
|
5
|
+
api.registerPlatform(PLUGIN_NAME, PLATFORM_NAME, SmartHQPlatform);
|
|
6
|
+
};
|
|
7
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAA;AAC/C,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAE1D,yCAAyC;AACzC,eAAe,CAAC,GAAQ,EAAQ,EAAE;IAChC,GAAG,CAAC,gBAAgB,CAAC,WAAW,EAAE,aAAa,EAAE,eAAe,CAAC,CAAA;AACnE,CAAC,CAAA"}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
import type { API, DynamicPlatformPlugin, HAP, Logging, PlatformAccessory } from 'homebridge';
|
|
2
|
+
import type { options, SmartHQPlatformConfig } from './settings.js';
|
|
3
|
+
/**
|
|
4
|
+
* HomebridgePlatform
|
|
5
|
+
* This class is the main constructor for your plugin, this is where you should
|
|
6
|
+
* parse the user config and discover/register accessories with Homebridge.
|
|
7
|
+
*/
|
|
8
|
+
export declare class SmartHQPlatform implements DynamicPlatformPlugin {
|
|
9
|
+
accessories: PlatformAccessory[];
|
|
10
|
+
readonly api: API;
|
|
11
|
+
readonly log: Logging;
|
|
12
|
+
protected readonly hap: HAP;
|
|
13
|
+
config: SmartHQPlatformConfig;
|
|
14
|
+
platformConfig: SmartHQPlatformConfig;
|
|
15
|
+
platformLogging: options['logging'];
|
|
16
|
+
platformRefreshRate: options['refreshRate'];
|
|
17
|
+
platformPushRate: options['pushRate'];
|
|
18
|
+
platformUpdateRate: options['updateRate'];
|
|
19
|
+
debugMode: boolean;
|
|
20
|
+
version: string;
|
|
21
|
+
constructor(log: Logging, config: SmartHQPlatformConfig, api: API);
|
|
22
|
+
/**
|
|
23
|
+
* This function is invoked when homebridge restores cached accessories from disk at startup.
|
|
24
|
+
* It should be used to setup event handlers for characteristics and update respective values.
|
|
25
|
+
*/
|
|
26
|
+
configureAccessory(accessory: PlatformAccessory): Promise<void>;
|
|
27
|
+
/**
|
|
28
|
+
* Verify the config passed to the plugin is valid
|
|
29
|
+
*/
|
|
30
|
+
verifyConfig(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* This method is used to discover the your location and devices.
|
|
33
|
+
* Accessories are registered by either their DeviceClass, DeviceModel, or DeviceID
|
|
34
|
+
*/
|
|
35
|
+
discoverDevices(): Promise<void>;
|
|
36
|
+
private createAirQualitySensor;
|
|
37
|
+
unregisterPlatformAccessories(existingAccessory: PlatformAccessory): Promise<void>;
|
|
38
|
+
getPlatformLogSettings(): Promise<void>;
|
|
39
|
+
getPlatformRateSettings(): Promise<void>;
|
|
40
|
+
getPlatformConfigSettings(): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Asynchronously retrieves the version of the plugin from the package.json file.
|
|
43
|
+
*
|
|
44
|
+
* This method reads the package.json file located in the parent directory,
|
|
45
|
+
* parses its content to extract the version, and logs the version using the debug logger.
|
|
46
|
+
* The extracted version is then assigned to the `version` property of the class.
|
|
47
|
+
*
|
|
48
|
+
* @returns {Promise<void>} A promise that resolves when the version has been retrieved and logged.
|
|
49
|
+
*/
|
|
50
|
+
getVersion(): Promise<void>;
|
|
51
|
+
/**
|
|
52
|
+
* Validate and clean a string value for a Name Characteristic.
|
|
53
|
+
* @param displayName - The display name of the accessory.
|
|
54
|
+
* @param name - The name of the characteristic.
|
|
55
|
+
* @param value - The value to be validated and cleaned.
|
|
56
|
+
* @returns The cleaned string value.
|
|
57
|
+
*/
|
|
58
|
+
validateAndCleanDisplayName(displayName: string, name: string, value: string): Promise<string>;
|
|
59
|
+
/**
|
|
60
|
+
* If device level logging is turned on, log to log.warn
|
|
61
|
+
* Otherwise send debug logs to log.debug
|
|
62
|
+
*/
|
|
63
|
+
infoLog(...log: any[]): Promise<void>;
|
|
64
|
+
successLog(...log: any[]): Promise<void>;
|
|
65
|
+
debugSuccessLog(...log: any[]): Promise<void>;
|
|
66
|
+
warnLog(...log: any[]): Promise<void>;
|
|
67
|
+
debugWarnLog(...log: any[]): Promise<void>;
|
|
68
|
+
errorLog(...log: any[]): Promise<void>;
|
|
69
|
+
debugErrorLog(...log: any[]): Promise<void>;
|
|
70
|
+
debugLog(...log: any[]): Promise<void>;
|
|
71
|
+
loggingIsDebug(): Promise<boolean>;
|
|
72
|
+
enablingPlatformLogging(): Promise<boolean>;
|
|
73
|
+
}
|
|
74
|
+
//# sourceMappingURL=platform.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,GAAG,EAAE,qBAAqB,EAAE,GAAG,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAE7F,OAAO,KAAK,EAAiB,OAAO,EAAE,qBAAqB,EAAE,MAAM,eAAe,CAAA;AAQlF;;;;GAIG;AACH,qBAAa,eAAgB,YAAW,qBAAqB;IACpD,WAAW,EAAE,iBAAiB,EAAE,CAAA;IACvC,SAAgB,GAAG,EAAE,GAAG,CAAA;IACxB,SAAgB,GAAG,EAAE,OAAO,CAAA;IAC5B,SAAS,CAAC,QAAQ,CAAC,GAAG,EAAE,GAAG,CAAA;IACpB,MAAM,EAAG,qBAAqB,CAAA;IAErC,cAAc,EAAG,qBAAqB,CAAA;IACtC,eAAe,EAAG,OAAO,CAAC,SAAS,CAAC,CAAA;IACpC,mBAAmB,EAAG,OAAO,CAAC,aAAa,CAAC,CAAA;IAC5C,gBAAgB,EAAG,OAAO,CAAC,UAAU,CAAC,CAAA;IACtC,kBAAkB,EAAG,OAAO,CAAC,YAAY,CAAC,CAAA;IAC1C,SAAS,EAAG,OAAO,CAAA;IACnB,OAAO,EAAG,MAAM,CAAA;gBAGd,GAAG,EAAE,OAAO,EACZ,MAAM,EAAE,qBAAqB,EAC7B,GAAG,EAAE,GAAG;IAuDV;;;OAGG;IACG,kBAAkB,CAAC,SAAS,EAAE,iBAAiB;IAOrD;;OAEG;IACG,YAAY;IAclB;;;OAGG;IACG,eAAe;YAQP,sBAAsB;IAsDvB,6BAA6B,CAAC,iBAAiB,EAAE,iBAAiB;IAMzE,sBAAsB;IAUtB,uBAAuB;IAevB,yBAAyB;IAgB/B;;;;;;;;OAQG;IACG,UAAU,IAAI,OAAO,CAAC,IAAI,CAAC;IAMjC;;;;;;OAMG;IACG,2BAA2B,CAAC,WAAW,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAgCpG;;;OAGG;IACG,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrC,UAAU,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxC,eAAe,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ7C,OAAO,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAMrC,YAAY,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ1C,QAAQ,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAMtC,aAAa,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAQ3C,QAAQ,CAAC,GAAG,GAAG,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC;IAUtC,cAAc,IAAI,OAAO,CAAC,OAAO,CAAC;IAIlC,uBAAuB,IAAI,OAAO,CAAC,OAAO,CAAC;CAGlD"}
|