@homebridge-plugins/homebridge-smarthq 0.1.0-beta.5 → 0.2.0-beta.0

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.
@@ -10,7 +10,7 @@ jobs:
10
10
  build_and_test:
11
11
  uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
12
12
  with:
13
- enable_coverage: flase
13
+ enable_coverage: false
14
14
  secrets:
15
15
  token: ${{ secrets.GITHUB_TOKEN }}
16
16
  lint:
@@ -8,7 +8,7 @@ jobs:
8
8
  build_and_test:
9
9
  uses: homebridge/.github/.github/workflows/nodejs-build-and-test.yml@latest
10
10
  with:
11
- enable_coverage: flase
11
+ enable_coverage: false
12
12
  secrets:
13
13
  token: ${{ secrets.GITHUB_TOKEN }}
14
14
 
package/CHANGELOG.md CHANGED
@@ -6,7 +6,7 @@ All notable changes to this project will be documented in this file. This projec
6
6
 
7
7
  ### What's Changes
8
8
 
9
- - Release of [@homebridge-plugins/homebridge-smarthq](https://github.com/homebridge-plugins/homebridge-smarthq) which allows you to update your see the air qualiry from SmartHQ Web API.
9
+ - Release of [@homebridge-plugins/homebridge-smarthq](https://github.com/homebridge-plugins/homebridge-smarthq) which allows to interact with SmartHQ API.
10
10
 
11
11
  **Full Changelog**: https://github.com/homebridge-plugins/homebridge-smarthq/compare/v0.1.0...v1.0.0
12
12
 
package/README.md CHANGED
@@ -10,7 +10,7 @@
10
10
  <a href="https://paypal.me/donavanbecker"><img title="donate" src="https://badgen.net/badge/donate/paypal/yellow" ></a>
11
11
 
12
12
  <p>The Homebridge <a href="https://airnow.gove">SmartHQ</a>
13
- plugin allows you monitor the current AirQuality for your Zip Code from HomeKit and Siri.
13
+ plugin allows which allows to interact with SmartHQ API.
14
14
  </p>
15
15
 
16
16
  </span>
@@ -22,31 +22,11 @@ plugin allows you monitor the current AirQuality for your Zip Code from HomeKit
22
22
 
23
23
  ## Configuration
24
24
 
25
- 1. Login / create an account at https://airnow.gove/
25
+ 1. Input Username & Password
26
+ 2. Click Save
27
+ 3. Restart Homebridge
26
28
 
27
- <p align="center">
29
+ ## Supported SmartHQ Features
28
30
 
29
- <img src="https://user-images.githubusercontent.com/9875439/133934622-05a9c19e-c5ba-46ee-b0db-0748420813d7.png" width="450px">
31
+ This plugin is in developenet
30
32
 
31
- </p>
32
-
33
- 2. Type in your SmartHQ.gov API Key and Zip Code
34
- 3. Click Save
35
- 4. Restart Homebridge
36
-
37
- ## Supported SmartHQ Quality Providers
38
-
39
- Currently supports AQI Services:
40
-
41
- - [SmartHQ](https://www.airnow.gov/) which is limited to the USA. A valid ZipCode is required.
42
- - [Aqicn](https://www.aqicn.org/) which has international support, provided by the [World SmartHQ Quality Index Project](http://waqi.info/).
43
-
44
- Depending on where exactly you would like to monitor AQI, one service may be more appropriate than the other.
45
-
46
- ## Supported SmartHQ Quality Features
47
-
48
- This plugin will create an DishWasher element. The Home app works well, but the Eve app seems to show more measurements. Measurements retrieved are PM2.5, PM10, & O3 for SmartHQ. Aqicn adds NO2, SO2, CO...
49
-
50
- ## Thanks
51
-
52
- Thank you to [ToddGreenfield](https://github.com/ToddGreenfield) for the the work done on the accesorry based plugin [homebridge-airnow](https://github.com/ToddGreenfield/homebridge-airnow/blob/master/README.md).
@@ -17,20 +17,29 @@
17
17
  },
18
18
  "credentials": {
19
19
  "type": "object",
20
- "items": {
20
+ "properties": {
21
21
  "username": {
22
- "title": "Username",
23
22
  "type": "string",
24
- "required": true,
25
- "default": ""
23
+ "title": "Username",
24
+ "placeholder": "apple@icloud.com",
25
+ "format": "email"
26
26
  },
27
27
  "password": {
28
+ "type": "string",
28
29
  "title": "Password",
30
+ "format": "password",
31
+ "placeholder": "***************",
32
+ "x-schema-form": {
33
+ "type": "password"
34
+ }
35
+ },
36
+ "notice": {
37
+ "title": "Notice",
29
38
  "type": "string",
30
- "required": true,
31
- "default": ""
39
+ "default": "Keep your username and password a secret!"
32
40
  }
33
- }
41
+ },
42
+ "required": ["email", "password"]
34
43
  },
35
44
  "devices": {
36
45
  "type": "array",
@@ -61,115 +70,109 @@
61
70
  "type": "string",
62
71
  "required": true,
63
72
  "default": "",
64
- "condition": {
65
- "functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
66
- },
67
73
  "oneOf": [
68
74
  {
69
75
  "title": "Default Logging",
70
- "enum": [
71
- ""
72
- ]
76
+ "enum": [""]
73
77
  },
74
78
  {
75
79
  "title": "Standard Logging",
76
- "enum": [
77
- "standard"
78
- ]
80
+ "enum": ["standard"]
79
81
  },
80
82
  {
81
83
  "title": "No Logging",
82
- "enum": [
83
- "none"
84
- ]
84
+ "enum": ["none"]
85
85
  },
86
86
  {
87
87
  "title": "Debug Logging",
88
- "enum": [
89
- "debug"
90
- ]
88
+ "enum": ["debug"]
91
89
  }
92
- ]
93
- },
94
- "hide_device": {
95
- "title": "Delete Device",
96
- "type": "boolean",
97
- "description": "Delete this device from the plugin cache.",
90
+ ],
98
91
  "condition": {
99
- "functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
92
+ "functionBody": "return (model.options && model.options.devices && model.options.devices[arrayIndices].id && !model.options.devices[arrayIndices].hide_device && (model.options.devices[arrayIndices].deviceClass === 'Thermostat' || model.options.devices[arrayIndices].deviceClass === 'LeakDetector'));"
100
93
  }
101
94
  }
102
- }
95
+ },
96
+ "required": ["id", "configDeviceName", "logging"]
103
97
  }
104
98
  },
105
99
  "options": {
106
100
  "type": "object",
107
- "items": {
101
+ "properties": {
108
102
  "refreshRate": {
109
- "title": "Device Refresh Rate",
103
+ "title": "Refresh Rate",
110
104
  "type": "number",
111
- "minimum": 1800,
112
- "placeholder": 1800,
113
- "description": "Indicates the number of seconds between polls of the SmartHQ service.",
114
- "condition": {
115
- "functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
116
- }
105
+ "minimum": 30,
106
+ "placeholder": 120,
107
+ "description": "Indicates the number of seconds between polls of the Meater service."
117
108
  },
118
109
  "logging": {
119
- "title": "Device Logging Override Setting",
110
+ "title": "Logging Setting",
120
111
  "type": "string",
121
112
  "required": true,
122
113
  "default": "",
123
- "condition": {
124
- "functionBody": "return (model.devices && model.devices[arrayIndices].city && model.devices[arrayIndices].zipCode);"
125
- },
126
114
  "oneOf": [
127
115
  {
128
116
  "title": "Default Logging",
129
- "enum": [
130
- ""
131
- ]
117
+ "enum": [""]
132
118
  },
133
119
  {
134
120
  "title": "Standard Logging",
135
- "enum": [
136
- "standard"
137
- ]
121
+ "enum": ["standard"]
138
122
  },
139
123
  {
140
124
  "title": "No Logging",
141
- "enum": [
142
- "none"
143
- ]
125
+ "enum": ["none"]
144
126
  },
145
127
  {
146
128
  "title": "Debug Logging",
147
- "enum": [
148
- "debug"
149
- ]
129
+ "enum": ["debug"]
150
130
  }
151
131
  ]
152
132
  }
153
- }
133
+ },
134
+ "required": ["logging"]
154
135
  }
155
136
  }
156
137
  },
157
138
  "layout": [
158
- "credentials.username",
159
- "credentials.password",
160
139
  {
161
- "key": "devices",
162
- "notitle": false,
163
- "type": "tabarray",
164
- "title": "{{ value || 'New SmartHQ Device' }}",
140
+ "type": "fieldset",
141
+ "title": "SmartHQ Account Info",
165
142
  "expandable": true,
166
143
  "expanded": false,
167
- "orderable": false,
168
144
  "items": [
169
- "devices[].firmware",
170
- "devices[].refreshRate",
171
- "devices[].logging",
172
- "devices[].hide_device"
145
+ {
146
+ "type": "help",
147
+ "helpvalue": "<h5></h5><em class='primary-text'>This is for Manual Setup Only.</em>"
148
+ },
149
+ "credentials.username",
150
+ "credentials.password"
151
+ ]
152
+ },
153
+ {
154
+ "type": "fieldset",
155
+ "title": "SmartHQ Device Settings",
156
+ "expandable": true,
157
+ "expanded": false,
158
+ "items": [
159
+ {
160
+ "key": "devices",
161
+ "notitle": true,
162
+ "type": "tabarray",
163
+ "title": "{{ value.configDeviceName || value.id || 'New SmartHQ Device' }}",
164
+ "expandable": true,
165
+ "expanded": false,
166
+ "orderable": false,
167
+ "items": [
168
+ "devices[].configDeviceName",
169
+ "devices[].hide_device",
170
+ "devices[].firmware",
171
+ "devices[].external",
172
+ "devices[].refreshRate",
173
+ "devices[].logging"
174
+ ]
175
+ }
173
176
  ]
174
177
  },
175
178
  {
@@ -0,0 +1,9 @@
1
+ {
2
+ "applianceId": "FCB97E120A84",
3
+ "type": "Dishwasher",
4
+ "brand": "GE",
5
+ "jid": "fcb97e120a84_c62i0foew16fpd0",
6
+ "nickname": "Dishwasher",
7
+ "online": "ONLINE",
8
+ "onlineTime": "2024-11-13T11:48:16.422Z"
9
+ }
@@ -2,18 +2,15 @@ import type { CharacteristicValue, PlatformAccessory } from 'homebridge';
2
2
  import type { SmartHQPlatform } from '../platform.js';
3
3
  import type { devicesConfig, SmartHqContext } from '../settings.js';
4
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
5
  export declare class SmartHQDishWasher extends deviceBase {
11
6
  readonly platform: SmartHQPlatform;
12
7
  readonly device: SmartHqContext['device'] & devicesConfig;
13
8
  private DishWasher;
14
9
  SensorUpdateInProgress: boolean;
15
10
  deviceStatus: any;
16
- constructor(platform: SmartHQPlatform, accessory: PlatformAccessory, device: SmartHqContext['device'] & devicesConfig);
11
+ constructor(platform: SmartHQPlatform, accessory: PlatformAccessory<SmartHqContext>, device: SmartHqContext['device'] & devicesConfig);
12
+ readErd(erd: string): Promise<string>;
13
+ writeErd(erd: string, value: string | boolean): Promise<undefined>;
17
14
  /**
18
15
  * Parse the device status from the SmartHQ api
19
16
  */
@@ -30,4 +27,4 @@ export declare class SmartHQDishWasher extends deviceBase {
30
27
  updateHomeKitCharacteristics(): Promise<void>;
31
28
  apiError(e: any): Promise<void>;
32
29
  }
33
- //# sourceMappingURL=dishwashers.d.ts.map
30
+ //# sourceMappingURL=dishwasher.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dishwasher.d.ts","sourceRoot":"","sources":["../../src/devices/dishwasher.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAW,MAAM,YAAY,CAAA;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAMnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,qBAAa,iBAAkB,SAAQ,UAAU;IAa7C,QAAQ,CAAC,QAAQ,EAAE,eAAe;IAElC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IAb3D,OAAO,CAAC,UAAU,CAIjB;IAGD,sBAAsB,EAAG,OAAO,CAAA;IAChC,YAAY,EAAE,GAAG,CAAA;gBAGN,QAAQ,EAAE,eAAe,EAClC,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC,EACnC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IAsDrD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMrC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAYnD;;OAEG;IACG,WAAW;IAUjB;;OAEG;IACG,aAAa;IAYb,KAAK,CAAC,EAAE,EAAE,mBAAmB;IAS7B,KAAK,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAW3C;;OAEG;IACG,4BAA4B,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtC,QAAQ,CAAC,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7C"}
@@ -1,11 +1,7 @@
1
- import { interval } from 'rxjs';
2
- import { skipWhile } from 'rxjs/operators';
1
+ import axios from 'axios';
2
+ import { interval, skipWhile } from 'rxjs';
3
+ import { ERD_TYPES } from '../settings.js';
3
4
  import { deviceBase } from './device.js';
4
- /**
5
- * Platform Accessory
6
- * An instance of this class is created for each accessory your platform registers
7
- * Each accessory may expose multiple services of different service types.
8
- */
9
5
  export class SmartHQDishWasher extends deviceBase {
10
6
  platform;
11
7
  device;
@@ -18,20 +14,39 @@ export class SmartHQDishWasher extends deviceBase {
18
14
  super(platform, accessory, device);
19
15
  this.platform = platform;
20
16
  this.device = device;
21
- // AirQuality Sensor Service
22
- this.debugLog('Configure AirQuality Sensor Service');
23
- accessory.context.DishWasher = accessory.context.DishWasher ?? {};
24
- this.DishWasher = {
25
- Name: this.accessory.displayName,
26
- Service: this.accessory.getService(this.hap.Service.Switch) ?? this.accessory.addService(this.hap.Service.Switch),
27
- On: accessory.context.On ?? this.hap.Characteristic.On,
28
- };
29
- accessory.context.DishWasher = this.DishWasher;
30
- // Add AirQuality Sensor Service's Characteristics
31
- this.DishWasher.Service.setCharacteristic(this.hap.Characteristic.Name, this.DishWasher.Name)
32
- .getCharacteristic(this.hap.Characteristic.On)
33
- .onSet(this.setOn.bind(this))
34
- .onGet(this.getOn.bind(this));
17
+ this.debugLog(`Dishwasher Features: ${JSON.stringify(accessory.context.device.features)}`);
18
+ accessory.context.device.features.forEach((feature) => {
19
+ /* [
20
+ "COMMON_V1_CONTROL_LOCK",
21
+ "COMMON_V1_SABBATH",
22
+ "COMMON_V1_SOUND_LEVEL",
23
+ "DISHWASHER_V1_CYCLE_DEFINITIONS",
24
+ "DISHWASHER_V1_CYCLE_SETTINGS_BOTTLE_BLAST_OPTION",
25
+ "DISHWASHER_V1_CYCLE_SETTINGS_DELAY_START",
26
+ "DISHWASHER_V1_CYCLE_SETTINGS_DRY_TEMP_SELECTION",
27
+ "DISHWASHER_V1_CYCLE_SETTINGS_SELECTED_CYCLE",
28
+ "DISHWASHER_V1_CYCLE_SETTINGS_STEAM_OPTION",
29
+ "DISHWASHER_V1_CYCLE_SETTINGS_WASH_TEMP_SELECTION",
30
+ "DISHWASHER_V1_CYCLE_SETTINGS_WASH_ZONE_SELECTION",
31
+ "DISHWASHER_V1_FOUNDATION",
32
+ "DISHWASHER_V1_REMAINING_DELAY_START_TIME",
33
+ "DISHWASHER_V1_REMOTE_CYCLE_CONTROL",
34
+ "DISHWASHER_V1_SERVICE",
35
+ "DISHWASHER_V2_SMART_ASSIST",
36
+ "RESOURCE_MANAGEMENT_V1_ELECTRICAL_ENERGY_USAGE_V2"
37
+ ] */
38
+ switch (feature) {
39
+ case 'DISHWASHER_V1_FOUNDATION': {
40
+ const dishwasher = this.accessory.getService(accessory.context.device.nickname)
41
+ || this.accessory.addService(this.platform.Service.Lightbulb, accessory.context.device.nickname, 'Dishwasher');
42
+ dishwasher
43
+ .getCharacteristic(this.platform.Characteristic.On)
44
+ .onGet(() => this.readErd(ERD_TYPES.DISHWASHER_CYCLE).then(r => Number.parseInt(r) !== 0))
45
+ .onSet(value => this.writeErd(ERD_TYPES.DISHWASHER_CYCLE, value));
46
+ break;
47
+ }
48
+ }
49
+ });
35
50
  // this is subject we use to track when we need to POST changes to the SmartHQ API
36
51
  this.SensorUpdateInProgress = false;
37
52
  // Retrieve initial values and updateHomekit
@@ -43,13 +58,29 @@ export class SmartHQDishWasher extends deviceBase {
43
58
  await this.refreshStatus();
44
59
  });
45
60
  }
61
+ async readErd(erd) {
62
+ const d = await axios
63
+ .get(`/appliance/${this.accessory.context.device.applianceId}/erd/${erd}`);
64
+ return String(d.data.value);
65
+ }
66
+ async writeErd(erd, value) {
67
+ await axios
68
+ .post(`/appliance/${this.accessory.context.device.applianceId}/erd/${erd}`, {
69
+ kind: 'appliance#erdListEntry',
70
+ userId: this.accessory.context.userId,
71
+ applianceId: this.accessory.context.device.applianceId,
72
+ erd,
73
+ value: typeof value === 'boolean' ? (value ? '01' : '00') : value,
74
+ });
75
+ return undefined;
76
+ }
46
77
  /**
47
78
  * Parse the device status from the SmartHQ api
48
79
  */
49
80
  async parseStatus() {
50
81
  try {
51
82
  // On
52
- this.DishWasher.On = this.deviceStatus.is_on;
83
+ // this.DishWasher.On = this.deviceStatus.is_on
53
84
  }
54
85
  catch (e) {
55
86
  await this.errorLog(`failed to parseStatus, Error Message: ${JSON.stringify(e.message ?? e)}`);
@@ -62,7 +93,7 @@ export class SmartHQDishWasher extends deviceBase {
62
93
  async refreshStatus() {
63
94
  try {
64
95
  // const status = await this.platform.client.getDeviceStatus(this.device.device_id)
65
- this.deviceStatus = status;
96
+ // this.deviceStatus = status
66
97
  await this.parseStatus();
67
98
  await this.updateHomeKitCharacteristics();
68
99
  }
@@ -102,4 +133,4 @@ export class SmartHQDishWasher extends deviceBase {
102
133
  this.DishWasher.Service.updateCharacteristic(this.hap.Characteristic.On, e);
103
134
  }
104
135
  }
105
- //# sourceMappingURL=dishwashers.js.map
136
+ //# sourceMappingURL=dishwasher.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dishwasher.js","sourceRoot":"","sources":["../../src/devices/dishwasher.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,MAAM,CAAA;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,OAAO,iBAAkB,SAAQ,UAAU;IAapC;IAEA;IAdX,UAAU;IACF,UAAU,CAIjB;IAED,UAAU;IACV,sBAAsB,CAAU;IAChC,YAAY,CAAK;IAEjB,YACW,QAAyB,EAClC,SAA4C,EACnC,MAAgD;QAEzD,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAJzB,aAAQ,GAAR,QAAQ,CAAiB;QAEzB,WAAM,GAAN,MAAM,CAA0C;QAIzD,IAAI,CAAC,QAAQ,CAAC,wBAAwB,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAA;QAC1F,SAAS,C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CAAC,EAAE,EAAE,IAAI,CAAC,UAAU,CAAC,EAAE,EAAE,IAAI,CAAC,CAAA;IAChH,CAAC;IAEM,KAAK,CAAC,QAAQ,CAAC,CAAM;QAC1B,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,GAAG,CAAC,cAAc,CAAC,EAAE,EAAE,CAAC,CAAC,CAAA;IAC7E,CAAC;CACF"}
@@ -1 +1 @@
1
- {"version":3,"file":"oven.d.ts","sourceRoot":"","sources":["../../src/devices/oven.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAOnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,qBAAa,WAAY,SAAQ,UAAU;IAEvC,QAAQ,CAAC,QAAQ,EAAE,eAAe;IAElC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;gBAFhD,QAAQ,EAAE,eAAe,EAClC,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC,EACnC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IAkDrD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMrC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;CAWpD"}
1
+ {"version":3,"file":"oven.d.ts","sourceRoot":"","sources":["../../src/devices/oven.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAEnD,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAOnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,qBAAa,WAAY,SAAQ,UAAU;IAEvC,QAAQ,CAAC,QAAQ,EAAE,eAAe;IAElC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;gBAFhD,QAAQ,EAAE,eAAe,EAClC,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC,EACnC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IAkDrD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMrC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;CAWpD"}
@@ -20,8 +20,8 @@ export class SmartHQOven extends deviceBase {
20
20
  ]; */
21
21
  switch (feature) {
22
22
  case 'COOKING_V1_UPPER_OVEN_FOUNDATION': {
23
- const ovenLight = this.accessory.getService('Upper Oven Light')
24
- || this.accessory.addService(this.platform.Service.Lightbulb, 'Upper Oven Light', 'Oven');
23
+ const ovenLight = this.accessory.getService(accessory.context.device.nickname)
24
+ || this.accessory.addService(this.platform.Service.Lightbulb, accessory.context.device.nickname, 'Oven');
25
25
  ovenLight
26
26
  .getCharacteristic(this.platform.Characteristic.On)
27
27
  .onGet(() => this.readErd(ERD_TYPES.UPPER_OVEN_LIGHT).then(r => Number.parseInt(r) !== 0))
@@ -29,9 +29,9 @@ export class SmartHQOven extends deviceBase {
29
29
  break;
30
30
  }
31
31
  case 'COOKING_V1_EXTENDED_COOKTOP_FOUNDATION': {
32
- this.accessory.getService('Upper Oven Mode')
32
+ this.accessory.getService(accessory.context.device.nickname)
33
33
  || this.accessory
34
- .addService(this.platform.Service.StatefulProgrammableSwitch, 'Upper Oven Mode', 'Oven')
34
+ .addService(this.platform.Service.StatefulProgrammableSwitch, accessory.context.device.nickname, 'Oven')
35
35
  .getCharacteristic(this.platform.Characteristic.TargetTemperature)
36
36
  .onGet(async () => {
37
37
  const erdVal = await this.readErd(ERD_TYPES.UPPER_OVEN_COOK_MODE);
@@ -1 +1 @@
1
- {"version":3,"file":"oven.js","sourceRoot":"","sources":["../../src/devices/oven.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAA;AAEpC,OAAO,KAAK,MAAM,OAAO,CAAA;AAEzB,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,MAAM,OAAO,WAAY,SAAQ,UAAU;IAE9B;IAEA;IAHX,YACW,QAAyB,EAClC,SAA4C,EACnC,MAAgD;QAEzD,KAAK,CAAC,QAAQ,EAAE,SAAS,EAAE,MAAM,CAAC,CAAA;QAJzB,aAAQ,GAAR,QAAQ,CAAiB;QAEzB,WAAM,GAAN,MAAM,CAA0C;QAGzD,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;YACpD;;;;;;;iBAOK;YAEL,QAAQ,OAAO,EAAE,CAAC;gBAChB,KAAK,kCAAkC,CAAC,CAAC,CAAC;oBACxC,MAAM,SAAS,GACX,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,kBAAkB,CAAC;2BAC5C,IAAI,CAAC,SAAS,CAAC,UAAU,CAAC,IAAI,CAAC,QAAQ,CAAC,OAAO,CAAC,SAAS,EAAE,kBAAkB,EAAE,MAAM,CAAC,CAAA;oBAE3F,SAAS;yBACN,iBAAiB,CAAC,IAAI,CAAC,QAAQ,CAAC,cAAc,CAAC,EAAE,CAAC;yBAClD,KAAK,CAAC,GAAG,EAAE,CAAC,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC,gBAAgB,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,KA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;QACvB,MAAM,CAAC,GAAG,MAAM,KAAK;aAClB,GAAG,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,QAAQ,GAAG,EAAE,CAAC,CAAA;QAC5E,OAAO,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;IAC7B,CAAC;IAED,KAAK,CAAC,QAAQ,CAAC,GAAW,EAAE,KAAuB;QACjD,MAAM,KAAK;aACR,IAAI,CAAC,cAAc,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW,QAAQ,GAAG,EAAE,EAAE;YAC1E,IAAI,EAAE,wBAAwB;YAC9B,MAAM,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM;YACrC,WAAW,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,MAAM,CAAC,WAAW;YACtD,GAAG;YACH,KAAK,EAAE,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK;SAClE,CAAC,CAAA;QACJ,OAAO,SAAS,CAAA;IAClB,CAAC;CACF;AAED,SAAS,IAAI,CAAC,OAAe;IAC3B,OAAO,CAAC,OAAO,GAAG,CAAC,CAAC,GAAG,CAAC,GAAG,EAAE,CAAA;AAC/B,CAAC;AAED,SAAS,IAAI,CAAC,UAAkB;IAC9B,OAAO,CAAC,CAAC,UAAU,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAA;AACpC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import type { CharacteristicValue, PlatformAccessory } from 'homebridge';
2
+ import type { SmartHQPlatform } from '../platform.js';
3
+ import type { devicesConfig, SmartHqContext } from '../settings.js';
4
+ import { deviceBase } from './device.js';
5
+ export declare class SmartHQRefrigerator extends deviceBase {
6
+ readonly platform: SmartHQPlatform;
7
+ readonly device: SmartHqContext['device'] & devicesConfig;
8
+ private Refrigerator;
9
+ SensorUpdateInProgress: boolean;
10
+ deviceStatus: any;
11
+ constructor(platform: SmartHQPlatform, accessory: PlatformAccessory<SmartHqContext>, device: SmartHqContext['device'] & devicesConfig);
12
+ readErd(erd: string): Promise<string>;
13
+ writeErd(erd: string, value: string | boolean): Promise<undefined>;
14
+ /**
15
+ * Parse the device status from the SmartHQ api
16
+ */
17
+ parseStatus(): Promise<void>;
18
+ /**
19
+ * Asks the SmartHQ API for the latest device information
20
+ */
21
+ refreshStatus(): Promise<void>;
22
+ setContactSensorState(ContactSensorState: CharacteristicValue): Promise<void>;
23
+ getContactSensorState(): Promise<CharacteristicValue>;
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=refrigerator.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"refrigerator.d.ts","sourceRoot":"","sources":["../../src/devices/refrigerator.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,iBAAiB,EAAW,MAAM,YAAY,CAAA;AAEjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAA;AACrD,OAAO,KAAK,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAMnE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAA;AAExC,qBAAa,mBAAoB,SAAQ,UAAU;IAa/C,QAAQ,CAAC,QAAQ,EAAE,eAAe;IAElC,QAAQ,CAAC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IAb3D,OAAO,CAAC,YAAY,CAInB;IAGD,sBAAsB,EAAG,OAAO,CAAA;IAChC,YAAY,EAAE,GAAG,CAAA;gBAGN,QAAQ,EAAE,eAAe,EAClC,SAAS,EAAE,iBAAiB,CAAC,cAAc,CAAC,EACnC,MAAM,EAAE,cAAc,CAAC,QAAQ,CAAC,GAAG,aAAa;IAsCrD,OAAO,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC;IAMrC,QAAQ,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO;IAYnD;;OAEG;IACG,WAAW;IAUjB;;OAEG;IACG,aAAa;IAYb,qBAAqB,CAAC,kBAAkB,EAAE,mBAAmB;IAS7D,qBAAqB,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAW3D;;OAEG;IACG,4BAA4B,IAAI,OAAO,CAAC,IAAI,CAAC;IAKtC,QAAQ,CAAC,CAAC,EAAE,GAAG,GAAG,OAAO,CAAC,IAAI,CAAC;CAG7C"}