iobroker.iot 3.5.2 → 4.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/README.md +24 -9
- package/admin/assets/index-Y479CE6x.js +681 -0
- package/admin/index_m.html +1 -1
- package/admin/rules/assets/{ActionVisu-D9x2f6zu.js → ActionVisu-DE8dgNVF.js} +1 -1
- package/admin/rules/assets/{ActionVisu__loadShare__react__loadShare__-Cg21Ef1U.js → ActionVisu__loadShare__react__loadShare__-BKaC-p5K.js} +1 -1
- package/admin/rules/assets/{ActionVisu__loadShare__react_mf_2_dom__loadShare__-B1zRWn0u.js → ActionVisu__loadShare__react_mf_2_dom__loadShare__-Bs1o8DtQ.js} +2 -2
- package/admin/rules/assets/ActionVisu__mf_v__runtimeInit__mf_v__-DtUoI3FU.js +5 -0
- package/admin/rules/assets/bootstrap-Ba57tu25.js +1 -0
- package/admin/rules/assets/hostInit-hos3Txsy.js +1 -1
- package/admin/rules/assets/{index-Duo7mFlZ.js → index-CbxmbJvB.js} +2 -2
- package/admin/rules/assets/{index-CAAeiKCc.js → index-DjPMvPni.js} +2 -2
- package/admin/rules/assets/index-_Y2FN5EZ.js +1152 -0
- package/admin/rules/assets/{virtualExposes-BqVak7rX.js → virtualExposes-BNZJTatg.js} +2 -2
- package/admin/rules/customRuleBlocks.js +2 -2
- package/io-package.json +27 -27
- package/package.json +17 -14
- package/admin/assets/index-Df2NS929.js +0 -681
- package/admin/rules/assets/ActionVisu__mf_v__runtimeInit__mf_v__-Cz053nO7.js +0 -10
- package/admin/rules/assets/bootstrap-BCFKIiwZ.js +0 -1
- package/admin/rules/assets/index-BwcOGyWI.js +0 -1152
- package/lib/AlexaSmartHomeV3/Alexa/AlexaResponse.js +0 -262
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/Base.js +0 -124
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/BrightnessController.js +0 -15
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorController.js +0 -10
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/ColorTemperatureController.js +0 -15
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/ContactSensor.js +0 -10
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/LockController.js +0 -10
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/ModeController.js +0 -69
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/MotionSensor.js +0 -10
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/PercentageController.js +0 -10
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/PowerController.js +0 -15
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/Speaker.js +0 -20
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/TemperatureSensor.js +0 -10
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/ThermostatController.js +0 -34
- package/lib/AlexaSmartHomeV3/Alexa/Capabilities/index.js +0 -14
- package/lib/AlexaSmartHomeV3/Alexa/Directives/Base.js +0 -27
- package/lib/AlexaSmartHomeV3/Alexa/Directives/ChangeReport.js +0 -75
- package/lib/AlexaSmartHomeV3/Alexa/Directives/Discovery.js +0 -39
- package/lib/AlexaSmartHomeV3/Alexa/Directives/ReportState.js +0 -50
- package/lib/AlexaSmartHomeV3/Alexa/Directives/index.js +0 -13
- package/lib/AlexaSmartHomeV3/Alexa/ModeValues/Base.js +0 -38
- package/lib/AlexaSmartHomeV3/Alexa/ModeValues/Closed.js +0 -55
- package/lib/AlexaSmartHomeV3/Alexa/ModeValues/Open.js +0 -56
- package/lib/AlexaSmartHomeV3/Alexa/ModeValues/index.js +0 -14
- package/lib/AlexaSmartHomeV3/Alexa/Properties/AdjustableProperty.js +0 -11
- package/lib/AlexaSmartHomeV3/Alexa/Properties/Base.js +0 -108
- package/lib/AlexaSmartHomeV3/Alexa/Properties/Brightness.js +0 -14
- package/lib/AlexaSmartHomeV3/Alexa/Properties/Color.js +0 -40
- package/lib/AlexaSmartHomeV3/Alexa/Properties/ColorTemperatureInKelvin.js +0 -62
- package/lib/AlexaSmartHomeV3/Alexa/Properties/DetectionState.js +0 -22
- package/lib/AlexaSmartHomeV3/Alexa/Properties/LockState.js +0 -40
- package/lib/AlexaSmartHomeV3/Alexa/Properties/Mode.js +0 -32
- package/lib/AlexaSmartHomeV3/Alexa/Properties/Muted.js +0 -17
- package/lib/AlexaSmartHomeV3/Alexa/Properties/Percentage.js +0 -14
- package/lib/AlexaSmartHomeV3/Alexa/Properties/PowerState.js +0 -25
- package/lib/AlexaSmartHomeV3/Alexa/Properties/TargetSetpoint.js +0 -28
- package/lib/AlexaSmartHomeV3/Alexa/Properties/Temperature.js +0 -20
- package/lib/AlexaSmartHomeV3/Alexa/Properties/ThermostatMode.js +0 -52
- package/lib/AlexaSmartHomeV3/Alexa/Properties/Volume.js +0 -19
- package/lib/AlexaSmartHomeV3/Alexa/Properties/index.js +0 -14
- package/lib/AlexaSmartHomeV3/Controls/AdjustableControl.js +0 -22
- package/lib/AlexaSmartHomeV3/Controls/AdjustablePercentageControl.js +0 -28
- package/lib/AlexaSmartHomeV3/Controls/AirCondition.js +0 -144
- package/lib/AlexaSmartHomeV3/Controls/Blind.js +0 -12
- package/lib/AlexaSmartHomeV3/Controls/ContactSensor.js +0 -17
- package/lib/AlexaSmartHomeV3/Controls/Control.js +0 -352
- package/lib/AlexaSmartHomeV3/Controls/Ct.js +0 -172
- package/lib/AlexaSmartHomeV3/Controls/Dimmer.js +0 -124
- package/lib/AlexaSmartHomeV3/Controls/Door.js +0 -9
- package/lib/AlexaSmartHomeV3/Controls/Gate.js +0 -42
- package/lib/AlexaSmartHomeV3/Controls/Hue.js +0 -207
- package/lib/AlexaSmartHomeV3/Controls/Light.js +0 -54
- package/lib/AlexaSmartHomeV3/Controls/Lock.js +0 -36
- package/lib/AlexaSmartHomeV3/Controls/Motion.js +0 -17
- package/lib/AlexaSmartHomeV3/Controls/ReadOnlyDetector.js +0 -25
- package/lib/AlexaSmartHomeV3/Controls/Slider.js +0 -10
- package/lib/AlexaSmartHomeV3/Controls/Socket.js +0 -21
- package/lib/AlexaSmartHomeV3/Controls/Temperature.js +0 -22
- package/lib/AlexaSmartHomeV3/Controls/Thermostat.js +0 -86
- package/lib/AlexaSmartHomeV3/Controls/VacuumCleaner.js +0 -28
- package/lib/AlexaSmartHomeV3/Controls/Volume.js +0 -109
- package/lib/AlexaSmartHomeV3/Controls/VolumeGroup.js +0 -9
- package/lib/AlexaSmartHomeV3/Controls/Window.js +0 -9
- package/lib/AlexaSmartHomeV3/Controls/index.js +0 -14
- package/lib/AlexaSmartHomeV3/Device.js +0 -84
- package/lib/AlexaSmartHomeV3/DeviceManager.js +0 -415
- package/lib/AlexaSmartHomeV3/Exceptions/AlexaV3Exception.js +0 -8
- package/lib/AlexaSmartHomeV3/Exceptions/HourlyDeviceRateLimitExceeded.js +0 -5
- package/lib/AlexaSmartHomeV3/Exceptions/OverallDailyRateLimitExceeded.js +0 -5
- package/lib/AlexaSmartHomeV3/Helpers/AdapterProvider.js +0 -46
- package/lib/AlexaSmartHomeV3/Helpers/FileHelper.js +0 -70
- package/lib/AlexaSmartHomeV3/Helpers/IotProxy.js +0 -44
- package/lib/AlexaSmartHomeV3/Helpers/Logger.js +0 -95
- package/lib/AlexaSmartHomeV3/Helpers/RateLimiter.js +0 -82
- package/lib/AlexaSmartHomeV3/Helpers/Utils.js +0 -583
- package/lib/Utils.js +0 -608
- package/lib/adminCommonSocket.js +0 -781
- package/lib/alexaCustom.js +0 -622
- package/lib/alexaSmartHomeV2.js +0 -2792
- package/lib/alexaSmartHomeV3.js +0 -117
- package/lib/alisa.js +0 -2412
- package/lib/devices.js +0 -20
- package/lib/functions.js +0 -21
- package/lib/googleHome.js +0 -3323
- package/lib/notifications.js +0 -37
- package/lib/remote.js +0 -1363
- package/lib/rooms.js +0 -45
- package/lib/texts.js +0 -79
- package/lib/translate.js +0 -19
- package/lib/visuApp.js +0 -157
- package/main.js +0 -1444
package/lib/alexaSmartHomeV3.js
DELETED
|
@@ -1,117 +0,0 @@
|
|
|
1
|
-
const AdapterProvider = require('./AlexaSmartHomeV3/Helpers/AdapterProvider');
|
|
2
|
-
const DeviceManager = require('./AlexaSmartHomeV3/DeviceManager');
|
|
3
|
-
const IotProxy = require('./AlexaSmartHomeV3/Helpers/IotProxy');
|
|
4
|
-
const RateLimiter = require('./AlexaSmartHomeV3/Helpers/RateLimiter');
|
|
5
|
-
|
|
6
|
-
class AlexaSH3 {
|
|
7
|
-
constructor(options) {
|
|
8
|
-
this.deviceManager = new DeviceManager();
|
|
9
|
-
AdapterProvider.init(options.adapter);
|
|
10
|
-
IotProxy.init(options.iotDevice, options.iotClientId, options.adapter.config.login);
|
|
11
|
-
RateLimiter.init();
|
|
12
|
-
// Subscribe on enum changes
|
|
13
|
-
options.adapter.subscribeForeignObjects('enum.functions.*');
|
|
14
|
-
options.adapter.subscribeForeignObjects('enum.rooms.*');
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
setLanguage(lang) {
|
|
18
|
-
this.deviceManager.language = lang;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
async process(event) {
|
|
22
|
-
return await this.deviceManager.handleAlexaEvent(event);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
async updateDevices() {
|
|
26
|
-
return await this.deviceManager.collectEndpoints();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
async getDevices() {
|
|
30
|
-
const endpoints = this.deviceManager ? this.deviceManager.endpoints : [];
|
|
31
|
-
|
|
32
|
-
const result = [];
|
|
33
|
-
|
|
34
|
-
for (let p = 0; p < endpoints.length; p++) {
|
|
35
|
-
const endpoint = endpoints[p];
|
|
36
|
-
const controls = [];
|
|
37
|
-
|
|
38
|
-
for (let c = 0; c < endpoint.controls.length; c++) {
|
|
39
|
-
const control = endpoint.controls[c];
|
|
40
|
-
let supported = [];
|
|
41
|
-
let enforced = [];
|
|
42
|
-
control._supported.forEach(item =>
|
|
43
|
-
item._properties.forEach(
|
|
44
|
-
prop => !supported.includes(prop.constructor.name) && supported.push(prop.constructor.name),
|
|
45
|
-
),
|
|
46
|
-
);
|
|
47
|
-
control._enforced.forEach(item =>
|
|
48
|
-
item._properties.forEach(
|
|
49
|
-
prop => !enforced.includes(prop.constructor.name) && enforced.push(prop.constructor.name),
|
|
50
|
-
),
|
|
51
|
-
);
|
|
52
|
-
|
|
53
|
-
supported = supported.map(prop => prop.replace(/^[A-Z]/, c => c.toLowerCase())).sort();
|
|
54
|
-
|
|
55
|
-
enforced = enforced.map(prop => prop.replace(/^[A-Z]/, c => c.toLowerCase())).sort();
|
|
56
|
-
|
|
57
|
-
controls.push({
|
|
58
|
-
type: control.log._component,
|
|
59
|
-
states: control._states,
|
|
60
|
-
// always sort by id, so the GUI can address the group by the first control
|
|
61
|
-
supported,
|
|
62
|
-
// always sort by id, so the GUI can address the group by the first control
|
|
63
|
-
enforced,
|
|
64
|
-
state: await control.reportState(),
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
// always sort by id, so the GUI can address the group by the first control
|
|
68
|
-
controls.sort((c1, c2) => (c1.type > c2.type ? -1 : c1.type < c2.type ? 1 : 0));
|
|
69
|
-
|
|
70
|
-
const device = {
|
|
71
|
-
controls,
|
|
72
|
-
friendlyName: endpoint.friendlyName,
|
|
73
|
-
autoDetected: endpoint.autoDetected,
|
|
74
|
-
funcName: endpoint.funcName,
|
|
75
|
-
roomName: endpoint.roomName,
|
|
76
|
-
id: endpoint.id,
|
|
77
|
-
type: endpoint.log._component,
|
|
78
|
-
state: await endpoint.reportState(),
|
|
79
|
-
};
|
|
80
|
-
result.push(device);
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
return result;
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
async handleStateUpdate(id, state) {
|
|
87
|
-
return await this.deviceManager.handleStateUpdate(id, state);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
async handleObjectChange(id, obj) {
|
|
91
|
-
// Handle enum changes
|
|
92
|
-
if (obj) {
|
|
93
|
-
// An object was changed
|
|
94
|
-
// console.log(`object ${id} changed: ${JSON.stringify(obj)}`);
|
|
95
|
-
} else {
|
|
96
|
-
// An object was deleted
|
|
97
|
-
// console.log(`object ${id} deleted`);
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
// either an enum was deleted or changed => re-collect devices
|
|
101
|
-
|
|
102
|
-
// intentionally not waiting for the promise to resolve
|
|
103
|
-
this.deviceManager.collectEndpoints();
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
pauseEvents() {
|
|
107
|
-
this.deviceManager.pauseEvents();
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
async destroy() {
|
|
111
|
-
await this.deviceManager.destroy();
|
|
112
|
-
await AdapterProvider.get().unsubscribeForeignObjectsAsync('enum.functions.*');
|
|
113
|
-
await AdapterProvider.get().unsubscribeForeignObjectsAsync('enum.rooms.*');
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
|
|
117
|
-
module.exports = AlexaSH3;
|