@camstack/addon-import-alexa 0.2.152 → 0.2.154
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/dist/{MotionZonesSettings-Dxo0EAzN.mjs → MotionZonesSettings-BAg3ARov.mjs} +2 -2
- package/dist/{PrivacyMaskSettings-DwWxpZrj.mjs → PrivacyMaskSettings-C0cYJFNC.mjs} +4 -4
- package/dist/{SceneMonitorEditor-CC0dk5TR.mjs → SceneMonitorEditor-BL8xJKp6.mjs} +123 -124
- package/dist/_stub.js +15 -15
- package/dist/{_virtual_mf-localSharedImportMap___mfe_internal__addon_import_alexa_page-DZkNpxsX.mjs → _virtual_mf-localSharedImportMap___mfe_internal__addon_import_alexa_page-AUGtjsp9.mjs} +3 -3
- package/dist/{_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-Msberbw_.mjs → _virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BU5ExEvB.mjs} +1 -1
- package/dist/addon-import-alexa.css +1 -1
- package/dist/addon.js +148 -16
- package/dist/addon.mjs +148 -16
- package/dist/{hostInit-ChaqVJ-8.mjs → hostInit-CCjS7fR2.mjs} +2 -2
- package/dist/{player-overlays-DNpsEqAe.mjs → player-overlays-COWyo9kN.mjs} +1 -1
- package/dist/remoteEntry.js +1 -1
- package/dist/{responsive-B82v3AbM.mjs → responsive-CLpz8rKp.mjs} +1 -1
- package/dist/{scene-monitor-copy-CPnjwzw6.mjs → scene-monitor-copy-ciy3zaiU.mjs} +63 -50
- package/dist/{square-YTl_L1_3.mjs → square-YnF15tkM.mjs} +1 -1
- package/dist/{trash-2-DCHugLVt.mjs → trash-2-dnzK3zvI.mjs} +1 -1
- package/dist/{virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-BHSk6VHO.mjs → virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-BIrnyj0g.mjs} +1 -1
- package/package.json +1 -1
package/dist/addon.js
CHANGED
|
@@ -1819,7 +1819,7 @@ var Doc = class {
|
|
|
1819
1819
|
};
|
|
1820
1820
|
//#endregion
|
|
1821
1821
|
//#region ../../node_modules/zod/v4/core/versions.js
|
|
1822
|
-
var version = {
|
|
1822
|
+
var version$1 = {
|
|
1823
1823
|
major: 4,
|
|
1824
1824
|
minor: 4,
|
|
1825
1825
|
patch: 3
|
|
@@ -1831,7 +1831,7 @@ var $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
|
1831
1831
|
inst ?? (inst = {});
|
|
1832
1832
|
inst._zod.def = def;
|
|
1833
1833
|
inst._zod.bag = inst._zod.bag || {};
|
|
1834
|
-
inst._zod.version = version;
|
|
1834
|
+
inst._zod.version = version$1;
|
|
1835
1835
|
const checks = [...inst._zod.def.checks ?? []];
|
|
1836
1836
|
if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
|
|
1837
1837
|
for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
|
|
@@ -58066,7 +58066,8 @@ var BATTERY_DEVICE_TYPES = [
|
|
|
58066
58066
|
DeviceType.Switch,
|
|
58067
58067
|
DeviceType.PetFeeder,
|
|
58068
58068
|
DeviceType.Container,
|
|
58069
|
-
DeviceType.Thermostat
|
|
58069
|
+
DeviceType.Thermostat,
|
|
58070
|
+
DeviceType.EventEmitter
|
|
58070
58071
|
];
|
|
58071
58072
|
/** Generic Customize target for the percentage reading (D936). */
|
|
58072
58073
|
var batteryCustomize = {
|
|
@@ -64917,9 +64918,9 @@ var PowerMeterStatusSchema = object({
|
|
|
64917
64918
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
64918
64919
|
kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
64919
64920
|
/** Voltage in volts. */
|
|
64920
|
-
volts: number().optional().meta(readingMeta("voltage")),
|
|
64921
|
+
volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
64921
64922
|
/** Current in amperes. */
|
|
64922
|
-
amps: number().optional().meta(readingMeta("current")),
|
|
64923
|
+
amps: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
64923
64924
|
/** Apparent power in volt-amperes. */
|
|
64924
64925
|
va: number().optional().meta(readingMeta("apparent-power")),
|
|
64925
64926
|
/** Power factor (0..1) if reported. */
|
|
@@ -64927,17 +64928,74 @@ var PowerMeterStatusSchema = object({
|
|
|
64927
64928
|
/** Ms epoch when the slice was last updated. */
|
|
64928
64929
|
lastFetchedAt: number()
|
|
64929
64930
|
});
|
|
64931
|
+
/**
|
|
64932
|
+
* Loads that draw metered mains power (D951). The reading is a feature of the
|
|
64933
|
+
* device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
|
|
64934
|
+
* vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
|
|
64935
|
+
* meter or a standalone energy monitor IS the device. Cover, lock, valve,
|
|
64936
|
+
* camera and the like are left out: their draw is not what anyone meters.
|
|
64937
|
+
*/
|
|
64938
|
+
var POWER_METER_DEVICE_TYPES = [
|
|
64939
|
+
DeviceType.Sensor,
|
|
64940
|
+
DeviceType.Switch,
|
|
64941
|
+
DeviceType.Light,
|
|
64942
|
+
DeviceType.Fan,
|
|
64943
|
+
DeviceType.Climate,
|
|
64944
|
+
DeviceType.Thermostat,
|
|
64945
|
+
DeviceType.Humidifier,
|
|
64946
|
+
DeviceType.WaterHeater,
|
|
64947
|
+
DeviceType.MediaPlayer,
|
|
64948
|
+
DeviceType.Washer,
|
|
64949
|
+
DeviceType.Dryer,
|
|
64950
|
+
DeviceType.Dishwasher,
|
|
64951
|
+
DeviceType.Vacuum,
|
|
64952
|
+
DeviceType.LawnMower,
|
|
64953
|
+
DeviceType.PetFeeder
|
|
64954
|
+
];
|
|
64955
|
+
/** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
|
|
64956
|
+
var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
|
|
64957
|
+
/** One scalar target per reading; each is sourced from a device of its own (D951). */
|
|
64958
|
+
function powerTarget(id, unit) {
|
|
64959
|
+
return {
|
|
64960
|
+
id,
|
|
64961
|
+
cardinality: "scalar",
|
|
64962
|
+
vocabulary: {
|
|
64963
|
+
cap: "power-meter",
|
|
64964
|
+
stateField: id
|
|
64965
|
+
},
|
|
64966
|
+
deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
|
|
64967
|
+
apply: "add",
|
|
64968
|
+
path: id,
|
|
64969
|
+
sources: [{
|
|
64970
|
+
kind: "numeric",
|
|
64971
|
+
requiredUnit: unit,
|
|
64972
|
+
transforms: [{ kind: "identity" }]
|
|
64973
|
+
}],
|
|
64974
|
+
companions: [{
|
|
64975
|
+
kind: "clock",
|
|
64976
|
+
path: "lastFetchedAt",
|
|
64977
|
+
when: "always"
|
|
64978
|
+
}],
|
|
64979
|
+
sourceReport: { status: "assignment-status" },
|
|
64980
|
+
advancedExpression: true
|
|
64981
|
+
};
|
|
64982
|
+
}
|
|
64983
|
+
/** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
|
|
64984
|
+
var powerMeterCustomize = {
|
|
64985
|
+
version: 1,
|
|
64986
|
+
targets: [
|
|
64987
|
+
powerTarget("watts", "W"),
|
|
64988
|
+
powerTarget("kwhTotal", "kWh"),
|
|
64989
|
+
powerTarget("volts", "V"),
|
|
64990
|
+
powerTarget("amps", "A")
|
|
64991
|
+
]
|
|
64992
|
+
};
|
|
64930
64993
|
var powerMeterCapability = {
|
|
64931
64994
|
name: "power-meter",
|
|
64932
64995
|
scope: "device",
|
|
64933
64996
|
deviceNative: true,
|
|
64934
64997
|
mode: "singleton",
|
|
64935
|
-
deviceTypes:
|
|
64936
|
-
DeviceType.Sensor,
|
|
64937
|
-
DeviceType.Washer,
|
|
64938
|
-
DeviceType.Dryer,
|
|
64939
|
-
DeviceType.Dishwasher
|
|
64940
|
-
],
|
|
64998
|
+
deviceTypes: POWER_METER_DEVICE_TYPES,
|
|
64941
64999
|
methods: {},
|
|
64942
65000
|
status: {
|
|
64943
65001
|
schema: PowerMeterStatusSchema,
|
|
@@ -64994,7 +65052,8 @@ var powerMeterCapability = {
|
|
|
64994
65052
|
} },
|
|
64995
65053
|
/** Clock fields: written, but excluded from the compare that decides
|
|
64996
65054
|
* whether persisting is worth a SQLite commit. */
|
|
64997
|
-
volatileStateFields: ["lastFetchedAt"]
|
|
65055
|
+
volatileStateFields: ["lastFetchedAt"],
|
|
65056
|
+
customize: powerMeterCustomize
|
|
64998
65057
|
};
|
|
64999
65058
|
/**
|
|
65000
65059
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
@@ -70382,7 +70441,7 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
70382
70441
|
});
|
|
70383
70442
|
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
70384
70443
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
70385
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
70444
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
70386
70445
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
70387
70446
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
70388
70447
|
new Set(CAP_NAMES);
|
|
@@ -128775,7 +128834,7 @@ var require_alexa_cookie = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
128775
128834
|
module.exports = AlexaCookie();
|
|
128776
128835
|
}));
|
|
128777
128836
|
//#endregion
|
|
128778
|
-
//#region
|
|
128837
|
+
//#region ../../node_modules/alexa-remote2/package.json
|
|
128779
128838
|
var import_alexa_remote = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
128780
128839
|
var https = require("https");
|
|
128781
128840
|
var querystring = require("querystring");
|
|
@@ -131393,6 +131452,76 @@ var import_alexa_remote = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin
|
|
|
131393
131452
|
};
|
|
131394
131453
|
module.exports = AlexaRemote;
|
|
131395
131454
|
})))());
|
|
131455
|
+
//#endregion
|
|
131456
|
+
//#region src/alexa-api-user-agent.ts
|
|
131457
|
+
/**
|
|
131458
|
+
* The `apiUserAgentPostfix` handed to every `alexa-remote2` `init`.
|
|
131459
|
+
*
|
|
131460
|
+
* Left unset, the library computes it with
|
|
131461
|
+
* `require(path.join(__dirname, 'package.json'))`. Bundled into `dist/addon.js`
|
|
131462
|
+
* that resolves to the addon's own `dist/`, where no `package.json` exists, and
|
|
131463
|
+
* `init` throws "Cannot find module …/dist/package.json". Setting it here keeps
|
|
131464
|
+
* the library's own value (`AlexaRemote/<version>`), read at build time.
|
|
131465
|
+
*/
|
|
131466
|
+
var ALEXA_API_USER_AGENT_POSTFIX = `AlexaRemote/${{
|
|
131467
|
+
name: "alexa-remote2",
|
|
131468
|
+
version: "8.0.4",
|
|
131469
|
+
description: "Remote Control for amazon echo devices",
|
|
131470
|
+
author: {
|
|
131471
|
+
"name": "Apollon77",
|
|
131472
|
+
"email": "iobroker@fischer-ka.de"
|
|
131473
|
+
},
|
|
131474
|
+
contributors: [
|
|
131475
|
+
{
|
|
131476
|
+
"name": "soef",
|
|
131477
|
+
"email": "soef@gmx.net"
|
|
131478
|
+
},
|
|
131479
|
+
{
|
|
131480
|
+
"name": "Apollon77",
|
|
131481
|
+
"email": "iobroker@fischer-ka.de"
|
|
131482
|
+
},
|
|
131483
|
+
{
|
|
131484
|
+
"name": "bbindreiter",
|
|
131485
|
+
"email": "bernd.bindreiter@gmail.com"
|
|
131486
|
+
}
|
|
131487
|
+
],
|
|
131488
|
+
homepage: "https://github.com/Apollon77/alexa-remote",
|
|
131489
|
+
license: "MIT",
|
|
131490
|
+
keywords: [
|
|
131491
|
+
"alexa",
|
|
131492
|
+
"echo",
|
|
131493
|
+
"alexa remote",
|
|
131494
|
+
"layla.amazon.de"
|
|
131495
|
+
],
|
|
131496
|
+
dependencies: {
|
|
131497
|
+
"alexa-cookie2": "^5.0.3",
|
|
131498
|
+
"https": "^1.0.0",
|
|
131499
|
+
"querystring": "^0.2.1",
|
|
131500
|
+
"ws": "^8.18.3",
|
|
131501
|
+
"extend": "^3.0.2",
|
|
131502
|
+
"uuid": "^11.1.0"
|
|
131503
|
+
},
|
|
131504
|
+
devDependencies: {
|
|
131505
|
+
"@alcalzone/release-script": "^5.0.0",
|
|
131506
|
+
"@alcalzone/release-script-plugin-license": "^4.0.0",
|
|
131507
|
+
"eslint": "^8.57.1"
|
|
131508
|
+
},
|
|
131509
|
+
scripts: {
|
|
131510
|
+
"test": "node node_modules/mocha/bin/mocha",
|
|
131511
|
+
"release": "release-script"
|
|
131512
|
+
},
|
|
131513
|
+
repository: {
|
|
131514
|
+
"type": "git",
|
|
131515
|
+
"url": "git+https://github.com/Apollon77/alexa-remote.git"
|
|
131516
|
+
},
|
|
131517
|
+
bugs: { "url": "https://github.com/Apollon77/alexa-remote/issues" },
|
|
131518
|
+
engines: { "node": ">=16.0.0" },
|
|
131519
|
+
types: "alexa-remote.d.ts",
|
|
131520
|
+
main: "alexa-remote.js",
|
|
131521
|
+
readmeFilename: "readme.md"
|
|
131522
|
+
}.version}`;
|
|
131523
|
+
//#endregion
|
|
131524
|
+
//#region src/alexa-proxy-login.ts
|
|
131396
131525
|
/**
|
|
131397
131526
|
* A single interactive proxy-login attempt. One instance = one Amazon login.
|
|
131398
131527
|
* Construct → {@link start} → poll {@link getStatus} → on `captured` the
|
|
@@ -131449,6 +131578,7 @@ var AlexaProxyLoginSession = class {
|
|
|
131449
131578
|
proxyPort: this.#opts.proxyPort,
|
|
131450
131579
|
proxyLogLevel: "warn",
|
|
131451
131580
|
amazonPage,
|
|
131581
|
+
apiUserAgentPostfix: ALEXA_API_USER_AGENT_POSTFIX,
|
|
131452
131582
|
logger: (...args) => {
|
|
131453
131583
|
const line = args.map(String).join(" ");
|
|
131454
131584
|
if (SECRET_LINE_RE.test(line)) return;
|
|
@@ -132168,12 +132298,14 @@ var AlexaRemoteClient = class {
|
|
|
132168
132298
|
if (persisted !== null) return {
|
|
132169
132299
|
cookie: persisted.cookieData,
|
|
132170
132300
|
proxyOnly: false,
|
|
132171
|
-
amazonPage
|
|
132301
|
+
amazonPage,
|
|
132302
|
+
apiUserAgentPostfix: ALEXA_API_USER_AGENT_POSTFIX
|
|
132172
132303
|
};
|
|
132173
132304
|
if (creds.cookie !== void 0 && creds.cookie.length > 0) return {
|
|
132174
132305
|
cookie: parseCookieMaterial(creds.cookie),
|
|
132175
132306
|
proxyOnly: false,
|
|
132176
|
-
amazonPage
|
|
132307
|
+
amazonPage,
|
|
132308
|
+
apiUserAgentPostfix: ALEXA_API_USER_AGENT_POSTFIX
|
|
132177
132309
|
};
|
|
132178
132310
|
if (creds.refreshToken !== void 0 && creds.refreshToken.length > 0) throw new AlexaAuthError("a bare refresh token is not sufficient — supply the full cookie / cookieData blob captured by the alexa-remote2 proxy login (it embeds the refresh token)");
|
|
132179
132311
|
throw new AlexaAuthError("no cookie or cookieData blob configured for this account");
|
package/dist/addon.mjs
CHANGED
|
@@ -1818,7 +1818,7 @@ var Doc = class {
|
|
|
1818
1818
|
};
|
|
1819
1819
|
//#endregion
|
|
1820
1820
|
//#region ../../node_modules/zod/v4/core/versions.js
|
|
1821
|
-
var version = {
|
|
1821
|
+
var version$1 = {
|
|
1822
1822
|
major: 4,
|
|
1823
1823
|
minor: 4,
|
|
1824
1824
|
patch: 3
|
|
@@ -1830,7 +1830,7 @@ var $ZodType = /*@__PURE__*/ $constructor("$ZodType", (inst, def) => {
|
|
|
1830
1830
|
inst ?? (inst = {});
|
|
1831
1831
|
inst._zod.def = def;
|
|
1832
1832
|
inst._zod.bag = inst._zod.bag || {};
|
|
1833
|
-
inst._zod.version = version;
|
|
1833
|
+
inst._zod.version = version$1;
|
|
1834
1834
|
const checks = [...inst._zod.def.checks ?? []];
|
|
1835
1835
|
if (inst._zod.traits.has("$ZodCheck")) checks.unshift(inst);
|
|
1836
1836
|
for (const ch of checks) for (const fn of ch._zod.onattach) fn(inst);
|
|
@@ -58065,7 +58065,8 @@ var BATTERY_DEVICE_TYPES = [
|
|
|
58065
58065
|
DeviceType.Switch,
|
|
58066
58066
|
DeviceType.PetFeeder,
|
|
58067
58067
|
DeviceType.Container,
|
|
58068
|
-
DeviceType.Thermostat
|
|
58068
|
+
DeviceType.Thermostat,
|
|
58069
|
+
DeviceType.EventEmitter
|
|
58069
58070
|
];
|
|
58070
58071
|
/** Generic Customize target for the percentage reading (D936). */
|
|
58071
58072
|
var batteryCustomize = {
|
|
@@ -64916,9 +64917,9 @@ var PowerMeterStatusSchema = object({
|
|
|
64916
64917
|
/** Cumulative energy in kilowatt-hours since the meter was reset. */
|
|
64917
64918
|
kwhTotal: number().optional().meta(readingMeta("energy", { label: "Energy" })),
|
|
64918
64919
|
/** Voltage in volts. */
|
|
64919
|
-
volts: number().optional().meta(readingMeta("voltage")),
|
|
64920
|
+
volts: number().optional().meta(readingMeta("voltage", { label: "Voltage" })),
|
|
64920
64921
|
/** Current in amperes. */
|
|
64921
|
-
amps: number().optional().meta(readingMeta("current")),
|
|
64922
|
+
amps: number().optional().meta(readingMeta("current", { label: "Current" })),
|
|
64922
64923
|
/** Apparent power in volt-amperes. */
|
|
64923
64924
|
va: number().optional().meta(readingMeta("apparent-power")),
|
|
64924
64925
|
/** Power factor (0..1) if reported. */
|
|
@@ -64926,17 +64927,74 @@ var PowerMeterStatusSchema = object({
|
|
|
64926
64927
|
/** Ms epoch when the slice was last updated. */
|
|
64927
64928
|
lastFetchedAt: number()
|
|
64928
64929
|
});
|
|
64930
|
+
/**
|
|
64931
|
+
* Loads that draw metered mains power (D951). The reading is a feature of the
|
|
64932
|
+
* device itself — a plug, a lamp, a fan, an air conditioner, a boiler, a
|
|
64933
|
+
* vacuum dock — not a separate sensor beside it. A `Sensor` stays: a clamp
|
|
64934
|
+
* meter or a standalone energy monitor IS the device. Cover, lock, valve,
|
|
64935
|
+
* camera and the like are left out: their draw is not what anyone meters.
|
|
64936
|
+
*/
|
|
64937
|
+
var POWER_METER_DEVICE_TYPES = [
|
|
64938
|
+
DeviceType.Sensor,
|
|
64939
|
+
DeviceType.Switch,
|
|
64940
|
+
DeviceType.Light,
|
|
64941
|
+
DeviceType.Fan,
|
|
64942
|
+
DeviceType.Climate,
|
|
64943
|
+
DeviceType.Thermostat,
|
|
64944
|
+
DeviceType.Humidifier,
|
|
64945
|
+
DeviceType.WaterHeater,
|
|
64946
|
+
DeviceType.MediaPlayer,
|
|
64947
|
+
DeviceType.Washer,
|
|
64948
|
+
DeviceType.Dryer,
|
|
64949
|
+
DeviceType.Dishwasher,
|
|
64950
|
+
DeviceType.Vacuum,
|
|
64951
|
+
DeviceType.LawnMower,
|
|
64952
|
+
DeviceType.PetFeeder
|
|
64953
|
+
];
|
|
64954
|
+
/** Everything but a bare `Sensor`: a sensor that takes its reading from another sensor adds nothing. */
|
|
64955
|
+
var POWER_METER_CUSTOMIZE_DEVICE_TYPES = POWER_METER_DEVICE_TYPES.filter((type) => type !== DeviceType.Sensor);
|
|
64956
|
+
/** One scalar target per reading; each is sourced from a device of its own (D951). */
|
|
64957
|
+
function powerTarget(id, unit) {
|
|
64958
|
+
return {
|
|
64959
|
+
id,
|
|
64960
|
+
cardinality: "scalar",
|
|
64961
|
+
vocabulary: {
|
|
64962
|
+
cap: "power-meter",
|
|
64963
|
+
stateField: id
|
|
64964
|
+
},
|
|
64965
|
+
deviceTypes: POWER_METER_CUSTOMIZE_DEVICE_TYPES,
|
|
64966
|
+
apply: "add",
|
|
64967
|
+
path: id,
|
|
64968
|
+
sources: [{
|
|
64969
|
+
kind: "numeric",
|
|
64970
|
+
requiredUnit: unit,
|
|
64971
|
+
transforms: [{ kind: "identity" }]
|
|
64972
|
+
}],
|
|
64973
|
+
companions: [{
|
|
64974
|
+
kind: "clock",
|
|
64975
|
+
path: "lastFetchedAt",
|
|
64976
|
+
when: "always"
|
|
64977
|
+
}],
|
|
64978
|
+
sourceReport: { status: "assignment-status" },
|
|
64979
|
+
advancedExpression: true
|
|
64980
|
+
};
|
|
64981
|
+
}
|
|
64982
|
+
/** "Power and energy" extension: watts, energy, voltage and current from other devices (D951). */
|
|
64983
|
+
var powerMeterCustomize = {
|
|
64984
|
+
version: 1,
|
|
64985
|
+
targets: [
|
|
64986
|
+
powerTarget("watts", "W"),
|
|
64987
|
+
powerTarget("kwhTotal", "kWh"),
|
|
64988
|
+
powerTarget("volts", "V"),
|
|
64989
|
+
powerTarget("amps", "A")
|
|
64990
|
+
]
|
|
64991
|
+
};
|
|
64929
64992
|
var powerMeterCapability = {
|
|
64930
64993
|
name: "power-meter",
|
|
64931
64994
|
scope: "device",
|
|
64932
64995
|
deviceNative: true,
|
|
64933
64996
|
mode: "singleton",
|
|
64934
|
-
deviceTypes:
|
|
64935
|
-
DeviceType.Sensor,
|
|
64936
|
-
DeviceType.Washer,
|
|
64937
|
-
DeviceType.Dryer,
|
|
64938
|
-
DeviceType.Dishwasher
|
|
64939
|
-
],
|
|
64997
|
+
deviceTypes: POWER_METER_DEVICE_TYPES,
|
|
64940
64998
|
methods: {},
|
|
64941
64999
|
status: {
|
|
64942
65000
|
schema: PowerMeterStatusSchema,
|
|
@@ -64993,7 +65051,8 @@ var powerMeterCapability = {
|
|
|
64993
65051
|
} },
|
|
64994
65052
|
/** Clock fields: written, but excluded from the compare that decides
|
|
64995
65053
|
* whether persisting is worth a SQLite commit. */
|
|
64996
|
-
volatileStateFields: ["lastFetchedAt"]
|
|
65054
|
+
volatileStateFields: ["lastFetchedAt"],
|
|
65055
|
+
customize: powerMeterCustomize
|
|
64997
65056
|
};
|
|
64998
65057
|
/**
|
|
64999
65058
|
* Presence cap. Models HA `person.*` and `device_tracker.*` entities
|
|
@@ -70381,7 +70440,7 @@ method(object({}), array(TrainingBaseModelSchema).readonly(), { auth: "admin" })
|
|
|
70381
70440
|
});
|
|
70382
70441
|
DeviceFeature.FanSpeed, DeviceFeature.FanPreset, DeviceFeature.FanDirection, DeviceFeature.FanOscillating, DeviceFeature.CoverPositionable, DeviceFeature.CoverTilt, DeviceFeature.ValvePositionable, DeviceFeature.MediaPlayerVolume, DeviceFeature.ClimateFanMode;
|
|
70383
70442
|
SOURCE_CAPS.filter((cap) => cap !== "switch" && cap !== "motion");
|
|
70384
|
-
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
70443
|
+
DeviceType.Camera, DeviceType.Sensor, DeviceType.Button, DeviceType.Switch, DeviceType.PetFeeder, DeviceType.Container, DeviceType.Thermostat, DeviceType.EventEmitter, DeviceType.Camera, DeviceType.Hub, DeviceType.Light, DeviceType.Siren, DeviceType.Switch, DeviceType.Sensor, DeviceType.Thermostat, DeviceType.Climate, DeviceType.Button, DeviceType.EventEmitter, DeviceType.Update, DeviceType.Generic, DeviceType.Notifier, DeviceType.Script, DeviceType.Automation, DeviceType.Lock, DeviceType.Cover, DeviceType.Valve, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.Fan, DeviceType.MediaPlayer, DeviceType.AlarmPanel, DeviceType.Control, DeviceType.Presence, DeviceType.Weather, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.Container, DeviceType.Image, DeviceType.PetFeeder, DeviceType.Dishwasher, DeviceType.Washer, DeviceType.Dryer, DeviceType.Camera, DeviceType.Camera, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Switch, DeviceType.Light, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.Humidifier, DeviceType.WaterHeater, DeviceType.MediaPlayer, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.PetFeeder, DeviceType.Washer, DeviceType.Dryer, DeviceType.Dishwasher, DeviceType.Vacuum, DeviceType.LawnMower, DeviceType.MediaPlayer, DeviceType.WaterHeater, DeviceType.Humidifier, DeviceType.Fan, DeviceType.Climate, DeviceType.Thermostat, DeviceType.PetFeeder;
|
|
70385
70444
|
String.raw`rose\(active(\d+), changed(\d+), (\d+(?:\.\d+)?)\)`;
|
|
70386
70445
|
DeviceRole.BinarySensor, DeviceRole.MotionSensor;
|
|
70387
70446
|
new Set(CAP_NAMES);
|
|
@@ -128774,7 +128833,7 @@ var require_alexa_cookie = /* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
|
128774
128833
|
module.exports = AlexaCookie();
|
|
128775
128834
|
}));
|
|
128776
128835
|
//#endregion
|
|
128777
|
-
//#region
|
|
128836
|
+
//#region ../../node_modules/alexa-remote2/package.json
|
|
128778
128837
|
var import_alexa_remote = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
|
|
128779
128838
|
var https = __require("https");
|
|
128780
128839
|
var querystring = __require("querystring");
|
|
@@ -131392,6 +131451,76 @@ var import_alexa_remote = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin
|
|
|
131392
131451
|
};
|
|
131393
131452
|
module.exports = AlexaRemote;
|
|
131394
131453
|
})))());
|
|
131454
|
+
//#endregion
|
|
131455
|
+
//#region src/alexa-api-user-agent.ts
|
|
131456
|
+
/**
|
|
131457
|
+
* The `apiUserAgentPostfix` handed to every `alexa-remote2` `init`.
|
|
131458
|
+
*
|
|
131459
|
+
* Left unset, the library computes it with
|
|
131460
|
+
* `require(path.join(__dirname, 'package.json'))`. Bundled into `dist/addon.js`
|
|
131461
|
+
* that resolves to the addon's own `dist/`, where no `package.json` exists, and
|
|
131462
|
+
* `init` throws "Cannot find module …/dist/package.json". Setting it here keeps
|
|
131463
|
+
* the library's own value (`AlexaRemote/<version>`), read at build time.
|
|
131464
|
+
*/
|
|
131465
|
+
var ALEXA_API_USER_AGENT_POSTFIX = `AlexaRemote/${{
|
|
131466
|
+
name: "alexa-remote2",
|
|
131467
|
+
version: "8.0.4",
|
|
131468
|
+
description: "Remote Control for amazon echo devices",
|
|
131469
|
+
author: {
|
|
131470
|
+
"name": "Apollon77",
|
|
131471
|
+
"email": "iobroker@fischer-ka.de"
|
|
131472
|
+
},
|
|
131473
|
+
contributors: [
|
|
131474
|
+
{
|
|
131475
|
+
"name": "soef",
|
|
131476
|
+
"email": "soef@gmx.net"
|
|
131477
|
+
},
|
|
131478
|
+
{
|
|
131479
|
+
"name": "Apollon77",
|
|
131480
|
+
"email": "iobroker@fischer-ka.de"
|
|
131481
|
+
},
|
|
131482
|
+
{
|
|
131483
|
+
"name": "bbindreiter",
|
|
131484
|
+
"email": "bernd.bindreiter@gmail.com"
|
|
131485
|
+
}
|
|
131486
|
+
],
|
|
131487
|
+
homepage: "https://github.com/Apollon77/alexa-remote",
|
|
131488
|
+
license: "MIT",
|
|
131489
|
+
keywords: [
|
|
131490
|
+
"alexa",
|
|
131491
|
+
"echo",
|
|
131492
|
+
"alexa remote",
|
|
131493
|
+
"layla.amazon.de"
|
|
131494
|
+
],
|
|
131495
|
+
dependencies: {
|
|
131496
|
+
"alexa-cookie2": "^5.0.3",
|
|
131497
|
+
"https": "^1.0.0",
|
|
131498
|
+
"querystring": "^0.2.1",
|
|
131499
|
+
"ws": "^8.18.3",
|
|
131500
|
+
"extend": "^3.0.2",
|
|
131501
|
+
"uuid": "^11.1.0"
|
|
131502
|
+
},
|
|
131503
|
+
devDependencies: {
|
|
131504
|
+
"@alcalzone/release-script": "^5.0.0",
|
|
131505
|
+
"@alcalzone/release-script-plugin-license": "^4.0.0",
|
|
131506
|
+
"eslint": "^8.57.1"
|
|
131507
|
+
},
|
|
131508
|
+
scripts: {
|
|
131509
|
+
"test": "node node_modules/mocha/bin/mocha",
|
|
131510
|
+
"release": "release-script"
|
|
131511
|
+
},
|
|
131512
|
+
repository: {
|
|
131513
|
+
"type": "git",
|
|
131514
|
+
"url": "git+https://github.com/Apollon77/alexa-remote.git"
|
|
131515
|
+
},
|
|
131516
|
+
bugs: { "url": "https://github.com/Apollon77/alexa-remote/issues" },
|
|
131517
|
+
engines: { "node": ">=16.0.0" },
|
|
131518
|
+
types: "alexa-remote.d.ts",
|
|
131519
|
+
main: "alexa-remote.js",
|
|
131520
|
+
readmeFilename: "readme.md"
|
|
131521
|
+
}.version}`;
|
|
131522
|
+
//#endregion
|
|
131523
|
+
//#region src/alexa-proxy-login.ts
|
|
131395
131524
|
/**
|
|
131396
131525
|
* A single interactive proxy-login attempt. One instance = one Amazon login.
|
|
131397
131526
|
* Construct → {@link start} → poll {@link getStatus} → on `captured` the
|
|
@@ -131448,6 +131577,7 @@ var AlexaProxyLoginSession = class {
|
|
|
131448
131577
|
proxyPort: this.#opts.proxyPort,
|
|
131449
131578
|
proxyLogLevel: "warn",
|
|
131450
131579
|
amazonPage,
|
|
131580
|
+
apiUserAgentPostfix: ALEXA_API_USER_AGENT_POSTFIX,
|
|
131451
131581
|
logger: (...args) => {
|
|
131452
131582
|
const line = args.map(String).join(" ");
|
|
131453
131583
|
if (SECRET_LINE_RE.test(line)) return;
|
|
@@ -132167,12 +132297,14 @@ var AlexaRemoteClient = class {
|
|
|
132167
132297
|
if (persisted !== null) return {
|
|
132168
132298
|
cookie: persisted.cookieData,
|
|
132169
132299
|
proxyOnly: false,
|
|
132170
|
-
amazonPage
|
|
132300
|
+
amazonPage,
|
|
132301
|
+
apiUserAgentPostfix: ALEXA_API_USER_AGENT_POSTFIX
|
|
132171
132302
|
};
|
|
132172
132303
|
if (creds.cookie !== void 0 && creds.cookie.length > 0) return {
|
|
132173
132304
|
cookie: parseCookieMaterial(creds.cookie),
|
|
132174
132305
|
proxyOnly: false,
|
|
132175
|
-
amazonPage
|
|
132306
|
+
amazonPage,
|
|
132307
|
+
apiUserAgentPostfix: ALEXA_API_USER_AGENT_POSTFIX
|
|
132176
132308
|
};
|
|
132177
132309
|
if (creds.refreshToken !== void 0 && creds.refreshToken.length > 0) throw new AlexaAuthError("a bare refresh token is not sufficient — supply the full cookie / cookieData blob captured by the alexa-remote2 proxy login (it embeds the refresh token)");
|
|
132178
132310
|
throw new AlexaAuthError("no cookie or cookieData blob configured for this account");
|
|
@@ -36,7 +36,7 @@ async function r() {
|
|
|
36
36
|
}
|
|
37
37
|
},
|
|
38
38
|
"@camstack/types": {
|
|
39
|
-
version: "1.2.
|
|
39
|
+
version: "1.2.427",
|
|
40
40
|
scope: "default",
|
|
41
41
|
shareConfig: {
|
|
42
42
|
singleton: !0,
|
|
@@ -81,7 +81,7 @@ async function r() {
|
|
|
81
81
|
}
|
|
82
82
|
},
|
|
83
83
|
"@camstack/ui-library": {
|
|
84
|
-
version: "1.2.
|
|
84
|
+
version: "1.2.336",
|
|
85
85
|
scope: "default",
|
|
86
86
|
shareConfig: {
|
|
87
87
|
singleton: !0,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as e, d as t, u as n, v as r } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare__react__loadShare__.js-DwXXYAlk.mjs";
|
|
2
2
|
import { n as i, r as a, t as o } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-CUiVYNMY.mjs";
|
|
3
|
-
import { h as s, m as c } from "./responsive-
|
|
3
|
+
import { h as s, m as c } from "./responsive-CLpz8rKp.mjs";
|
|
4
4
|
var l = s("chevron-down", [["path", {
|
|
5
5
|
d: "m6 9 6 6 6-6",
|
|
6
6
|
key: "qrunsl"
|
package/dist/remoteEntry.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-
|
|
1
|
+
import { n as e, t } from "./virtual_mf-REMOTE_ENTRY_ID___mfe_internal__addon_import_alexa_page__remoteEntry_js-BIrnyj0g.mjs";
|
|
2
2
|
export { t as get, e as init };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { S as e, d as t, g as n, i as r, l as i, n as a, r as o, u as s, v as c, y as l } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare__react__loadShare__.js-DwXXYAlk.mjs";
|
|
2
2
|
import "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-CUiVYNMY.mjs";
|
|
3
|
-
import { c as u } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-
|
|
3
|
+
import { c as u } from "./_virtual_mf___mfe_internal__addon_import_alexa_page__loadShare___mf_0_camstack_mf_1_types__loadShare__.js-BU5ExEvB.mjs";
|
|
4
4
|
//#region ../../node_modules/lucide-react/dist/esm/shared/src/utils/mergeClasses.js
|
|
5
5
|
e();
|
|
6
6
|
var d = (...e) => e.filter((e, t, n) => !!e && e.trim() !== "" && n.indexOf(e) === t).join(" ").trim(), f = (e) => e.replace(/([a-z0-9])([A-Z])/g, "$1-$2").toLowerCase(), p = (e) => e.replace(/^([A-Z])|[\s-_]+(\w)/g, (e, t, n) => n ? n.toUpperCase() : t.toLowerCase()), m = (e) => {
|