homebridge-econet-rheem 1.5.10 → 1.5.12-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.
Files changed (73) hide show
  1. package/CHANGELOG.md +14 -2
  2. package/dist/homebridge/index.js.map +1 -0
  3. package/dist/{platform.d.ts → homebridge/platform.d.ts} +4 -1
  4. package/dist/homebridge/platform.js +98 -0
  5. package/dist/homebridge/platform.js.map +1 -0
  6. package/dist/homebridge/settings.js.map +1 -0
  7. package/dist/{accessories → homebridge}/thermostatAccessory.d.ts +1 -1
  8. package/dist/{accessories → homebridge}/thermostatAccessory.js +8 -6
  9. package/dist/homebridge/thermostatAccessory.js.map +1 -0
  10. package/dist/{accessories → homebridge}/waterHeaterAccessory.d.ts +1 -1
  11. package/dist/{accessories → homebridge}/waterHeaterAccessory.js +7 -5
  12. package/dist/homebridge/waterHeaterAccessory.js.map +1 -0
  13. package/dist/lang/en.d.ts +52 -0
  14. package/dist/lang/en.js +64 -0
  15. package/dist/lang/en.js.map +1 -0
  16. package/dist/model/api.d.ts +36 -0
  17. package/dist/model/api.js +367 -0
  18. package/dist/model/api.js.map +1 -0
  19. package/dist/model/auth.d.ts +11 -0
  20. package/dist/model/auth.js +52 -0
  21. package/dist/model/auth.js.map +1 -0
  22. package/dist/model/{enums.d.ts → constants.d.ts} +4 -0
  23. package/dist/model/{enums.js → constants.js} +6 -1
  24. package/dist/model/constants.js.map +1 -0
  25. package/dist/model/equipment.d.ts +9 -9
  26. package/dist/model/equipment.js +15 -29
  27. package/dist/model/equipment.js.map +1 -1
  28. package/dist/model/recoverySimulator.d.ts +2 -2
  29. package/dist/model/recoverySimulator.js +7 -8
  30. package/dist/model/recoverySimulator.js.map +1 -1
  31. package/dist/model/thermostat.d.ts +6 -6
  32. package/dist/model/thermostat.js +62 -70
  33. package/dist/model/thermostat.js.map +1 -1
  34. package/dist/model/types.d.ts +82 -0
  35. package/dist/model/types.js +12 -0
  36. package/dist/model/types.js.map +1 -0
  37. package/dist/model/waterHeater.d.ts +7 -5
  38. package/dist/model/waterHeater.js +34 -37
  39. package/dist/model/waterHeater.js.map +1 -1
  40. package/dist/tools/storage.d.ts +3 -0
  41. package/dist/tools/storage.js +22 -0
  42. package/dist/tools/storage.js.map +1 -0
  43. package/dist/tools/temperature.d.ts +3 -0
  44. package/dist/tools/temperature.js +14 -0
  45. package/dist/tools/temperature.js.map +1 -0
  46. package/dist/tools/time.d.ts +4 -0
  47. package/dist/tools/time.js +5 -0
  48. package/dist/tools/time.js.map +1 -0
  49. package/dist/tools/version.d.ts +1 -0
  50. package/dist/tools/version.js +18 -0
  51. package/dist/tools/version.js.map +1 -0
  52. package/example_responses/auth.json +45 -0
  53. package/example_responses/locations.json +1656 -0
  54. package/package.json +4 -2
  55. package/src/homebridge-ui/public/index.html +104 -0
  56. package/dist/accessories/thermostatAccessory.js.map +0 -1
  57. package/dist/accessories/waterHeaterAccessory.js.map +0 -1
  58. package/dist/index.js.map +0 -1
  59. package/dist/model/econet.d.ts +0 -48
  60. package/dist/model/econet.js +0 -319
  61. package/dist/model/econet.js.map +0 -1
  62. package/dist/model/enums.js.map +0 -1
  63. package/dist/model/utils.d.ts +0 -9
  64. package/dist/model/utils.js +0 -53
  65. package/dist/model/utils.js.map +0 -1
  66. package/dist/platform.js +0 -101
  67. package/dist/platform.js.map +0 -1
  68. package/dist/settings.js.map +0 -1
  69. package/notes +0 -7
  70. /package/dist/{index.d.ts → homebridge/index.d.ts} +0 -0
  71. /package/dist/{index.js → homebridge/index.js} +0 -0
  72. /package/dist/{settings.d.ts → homebridge/settings.d.ts} +0 -0
  73. /package/dist/{settings.js → homebridge/settings.js} +0 -0
@@ -0,0 +1,22 @@
1
+ import fs from 'fs';
2
+ export const STORAGE_FILE_NAME = 'econetRheem.json';
3
+ function readStorage(filePath) {
4
+ if (!fs.existsSync(filePath)) {
5
+ return {};
6
+ }
7
+ const data = fs.readFileSync(filePath, 'utf-8');
8
+ return JSON.parse(data);
9
+ }
10
+ function writeStorage(filePath, storage) {
11
+ fs.writeFileSync(filePath, JSON.stringify(storage, null, 2));
12
+ }
13
+ export function safeGetItem(filePath, key) {
14
+ const storage = readStorage(filePath);
15
+ return storage[key] ?? null;
16
+ }
17
+ export function safeSetItem(filePath, key, value) {
18
+ const storage = readStorage(filePath);
19
+ storage[key] = value;
20
+ writeStorage(filePath, storage);
21
+ }
22
+ //# sourceMappingURL=storage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../../src/tools/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AAEpB,MAAM,CAAC,MAAM,iBAAiB,GAAG,kBAAkB,CAAC;AAEpD,SAAS,WAAW,CAAC,QAAgB;IACnC,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAC7B,OAAO,EAAE,CAAC;IACZ,CAAC;IACD,MAAM,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAChD,OAAO,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;AAC1B,CAAC;AACD,SAAS,YAAY,CAAC,QAAgB,EAAE,OAA+B;IACrE,EAAE,CAAC,aAAa,CAAC,QAAQ,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;AAC/D,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAgB,EAAE,GAAW;IACvD,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,IAAI,CAAC;AAC9B,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,QAAgB,EAAE,GAAW,EAAE,KAAa;IACtE,MAAM,OAAO,GAAG,WAAW,CAAC,QAAQ,CAAC,CAAC;IACtC,OAAO,CAAC,GAAG,CAAC,GAAG,KAAK,CAAC;IACrB,YAAY,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;AAClC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { TemperatureUnits } from '../model/constants.js';
2
+ export declare const toCelsius: (temp: number, units: TemperatureUnits) => number;
3
+ export declare const fromCelsius: (temp: number, units: TemperatureUnits) => number;
@@ -0,0 +1,14 @@
1
+ import { TemperatureUnits } from '../model/constants.js';
2
+ const fahrenheitToCelsius = (fahrenheit) => {
3
+ return Number(((fahrenheit - 32) * 5 / 9).toFixed(1));
4
+ };
5
+ const celsiusToFahrenheit = (celsius) => {
6
+ return Math.round((celsius * 9 / 5) + 32);
7
+ };
8
+ export const toCelsius = (temp, units) => {
9
+ return units === TemperatureUnits.FAHRENHEIT ? fahrenheitToCelsius(temp) : temp;
10
+ };
11
+ export const fromCelsius = (temp, units) => {
12
+ return units === TemperatureUnits.FAHRENHEIT ? celsiusToFahrenheit(temp) : temp;
13
+ };
14
+ //# sourceMappingURL=temperature.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"temperature.js","sourceRoot":"","sources":["../../src/tools/temperature.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAEzD,MAAM,mBAAmB,GAAG,CAAC,UAAkB,EAAU,EAAE;IACzD,OAAO,MAAM,CAAC,CAAC,CAAC,UAAU,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC;AACxD,CAAC,CAAC;AACF,MAAM,mBAAmB,GAAG,CAAC,OAAe,EAAU,EAAE;IACtD,OAAO,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AAC5C,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,IAAY,EAAE,KAAuB,EAAU,EAAE;IACzE,OAAO,KAAK,KAAK,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClF,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAE,KAAuB,EAAU,EAAE;IAC3E,OAAO,KAAK,KAAK,gBAAgB,CAAC,UAAU,CAAC,CAAC,CAAC,mBAAmB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AAClF,CAAC,CAAC"}
@@ -0,0 +1,4 @@
1
+ export declare const SECOND = 1000;
2
+ export declare const MINUTE: number;
3
+ export declare const HOUR: number;
4
+ export declare const DAY: number;
@@ -0,0 +1,5 @@
1
+ export const SECOND = 1000;
2
+ export const MINUTE = 60 * SECOND;
3
+ export const HOUR = 60 * MINUTE;
4
+ export const DAY = 24 * HOUR;
5
+ //# sourceMappingURL=time.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"time.js","sourceRoot":"","sources":["../../src/tools/time.ts"],"names":[],"mappings":"AACA,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,CAAC;AAC3B,MAAM,CAAC,MAAM,MAAM,GAAG,EAAE,GAAG,MAAM,CAAC;AAClC,MAAM,CAAC,MAAM,IAAI,GAAG,EAAE,GAAG,MAAM,CAAC;AAChC,MAAM,CAAC,MAAM,GAAG,GAAG,EAAE,GAAG,IAAI,CAAC"}
@@ -0,0 +1 @@
1
+ export default function getVersion(): string;
@@ -0,0 +1,18 @@
1
+ import fs from 'fs';
2
+ import path from 'path';
3
+ import { fileURLToPath } from 'url';
4
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
5
+ function loadPackageJson() {
6
+ const __dirname = path.dirname(fileURLToPath(import.meta.url));
7
+ const packageJSONPath = path.join(__dirname, '../../package.json');
8
+ return JSON.parse(fs.readFileSync(packageJSONPath, { encoding: 'utf8' }));
9
+ }
10
+ export default function getVersion() {
11
+ try {
12
+ return loadPackageJson().version;
13
+ }
14
+ catch (error) {
15
+ return '0.0.0';
16
+ }
17
+ }
18
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../../src/tools/version.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAC;AACpB,OAAO,IAAI,MAAM,MAAM,CAAC;AACxB,OAAO,EAAE,aAAa,EAAE,MAAM,KAAK,CAAC;AAEpC,8DAA8D;AAC9D,SAAS,eAAe;IACtB,MAAM,SAAS,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;IAC/D,MAAM,eAAe,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,oBAAoB,CAAC,CAAC;IACnE,OAAO,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC,YAAY,CAAC,eAAe,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AAC5E,CAAC;AAED,MAAM,CAAC,OAAO,UAAU,UAAU;IAChC,IAAI,CAAC;QACH,OAAO,eAAe,EAAE,CAAC,OAAO,CAAC;IACnC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,OAAO,CAAC;IACjB,CAAC;AACH,CAAC"}
@@ -0,0 +1,45 @@
1
+ {
2
+ "options":{
3
+ "@CONNECTIVITY":{
4
+ "last_connected":1748457902331,
5
+ "last_disconnected":1748459364489
6
+ },
7
+ "_id":"****redacted****",
8
+ "account_id":"****redacted****",
9
+ "address":"****redacted****",
10
+ "allow_email_notifications":false,
11
+ "allow_product_alert_emails":true,
12
+ "allow_product_alert_text_msg":false,
13
+ "allow_push_notifications":true,
14
+ "allow_special_offers_emails":false,
15
+ "allow_special_offers_text_msg":false,
16
+ "allow_text_notifications":false,
17
+ "app_brand":"rheem",
18
+ "app_version":"6.9.0",
19
+ "cb_service_account":false,
20
+ "city":"****redacted****",
21
+ "connected":false,
22
+ "country":"US",
23
+ "created_at":"2021-05-23T22:57:16.000Z",
24
+ "creation_date":1621810634,
25
+ "email":"****redacted****",
26
+ "first_name":"****redacted****",
27
+ "is_phone_verified":true,
28
+ "last_name":"****redacted****",
29
+ "legacy_user":0,
30
+ "os_version":"ios",
31
+ "phone_number":"****redacted****",
32
+ "postal_code":"****redacted****",
33
+ "receive_marketing_messages":false,
34
+ "report_state":true,
35
+ "role":0,
36
+ "security_code":0,
37
+ "state":"CA",
38
+ "success":true,
39
+ "temperature_display_unit":"Fahrenheit",
40
+ "updated_at":"2025-05-28T19:09:24.489Z",
41
+ "user_id":"****redacted****"
42
+ },
43
+ "user_id":"****redacted****",
44
+ "user_token":"****redacted****"
45
+ }