homebridge-melcloud-control 4.2.3-beta.51 → 4.2.3-beta.53
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/config.schema.json +18 -18
- package/package.json +1 -1
- package/src/deviceata.js +5 -3
- package/src/melcloudata.js +2 -2
package/config.schema.json
CHANGED
|
@@ -555,19 +555,19 @@
|
|
|
555
555
|
]
|
|
556
556
|
},
|
|
557
557
|
{
|
|
558
|
-
"title": "Motion Sensor",
|
|
558
|
+
"title": "Switch + Motion Sensor",
|
|
559
559
|
"enum": [
|
|
560
560
|
1
|
|
561
561
|
]
|
|
562
562
|
},
|
|
563
563
|
{
|
|
564
|
-
"title": "Occupancy Sensor",
|
|
564
|
+
"title": "Switch + Occupancy Sensor",
|
|
565
565
|
"enum": [
|
|
566
566
|
2
|
|
567
567
|
]
|
|
568
568
|
},
|
|
569
569
|
{
|
|
570
|
-
"title": "Contact Sensor",
|
|
570
|
+
"title": "Switch + Contact Sensor",
|
|
571
571
|
"enum": [
|
|
572
572
|
3
|
|
573
573
|
]
|
|
@@ -624,19 +624,19 @@
|
|
|
624
624
|
]
|
|
625
625
|
},
|
|
626
626
|
{
|
|
627
|
-
"title": "Motion Sensor",
|
|
627
|
+
"title": "Switch + Motion Sensor",
|
|
628
628
|
"enum": [
|
|
629
629
|
1
|
|
630
630
|
]
|
|
631
631
|
},
|
|
632
632
|
{
|
|
633
|
-
"title": "Occupancy Sensor",
|
|
633
|
+
"title": "Switch + Occupancy Sensor",
|
|
634
634
|
"enum": [
|
|
635
635
|
2
|
|
636
636
|
]
|
|
637
637
|
},
|
|
638
638
|
{
|
|
639
|
-
"title": "Contact Sensor",
|
|
639
|
+
"title": "Switch + Contact Sensor",
|
|
640
640
|
"enum": [
|
|
641
641
|
3
|
|
642
642
|
]
|
|
@@ -1330,19 +1330,19 @@
|
|
|
1330
1330
|
]
|
|
1331
1331
|
},
|
|
1332
1332
|
{
|
|
1333
|
-
"title": "Motion Sensor",
|
|
1333
|
+
"title": "Switch + Motion Sensor",
|
|
1334
1334
|
"enum": [
|
|
1335
1335
|
1
|
|
1336
1336
|
]
|
|
1337
1337
|
},
|
|
1338
1338
|
{
|
|
1339
|
-
"title": "Occupancy Sensor",
|
|
1339
|
+
"title": "Switch + Occupancy Sensor",
|
|
1340
1340
|
"enum": [
|
|
1341
1341
|
2
|
|
1342
1342
|
]
|
|
1343
1343
|
},
|
|
1344
1344
|
{
|
|
1345
|
-
"title": "Contact Sensor",
|
|
1345
|
+
"title": "Switch + Contact Sensor",
|
|
1346
1346
|
"enum": [
|
|
1347
1347
|
3
|
|
1348
1348
|
]
|
|
@@ -1399,19 +1399,19 @@
|
|
|
1399
1399
|
]
|
|
1400
1400
|
},
|
|
1401
1401
|
{
|
|
1402
|
-
"title": "Motion Sensor",
|
|
1402
|
+
"title": "Switch + Motion Sensor",
|
|
1403
1403
|
"enum": [
|
|
1404
1404
|
1
|
|
1405
1405
|
]
|
|
1406
1406
|
},
|
|
1407
1407
|
{
|
|
1408
|
-
"title": "Occupancy Sensor",
|
|
1408
|
+
"title": "Switch + Occupancy Sensor",
|
|
1409
1409
|
"enum": [
|
|
1410
1410
|
2
|
|
1411
1411
|
]
|
|
1412
1412
|
},
|
|
1413
1413
|
{
|
|
1414
|
-
"title": "Contact Sensor",
|
|
1414
|
+
"title": "Switch + Contact Sensor",
|
|
1415
1415
|
"enum": [
|
|
1416
1416
|
3
|
|
1417
1417
|
]
|
|
@@ -1887,19 +1887,19 @@
|
|
|
1887
1887
|
]
|
|
1888
1888
|
},
|
|
1889
1889
|
{
|
|
1890
|
-
"title": "Motion Sensor",
|
|
1890
|
+
"title": "Switch + Motion Sensor",
|
|
1891
1891
|
"enum": [
|
|
1892
1892
|
1
|
|
1893
1893
|
]
|
|
1894
1894
|
},
|
|
1895
1895
|
{
|
|
1896
|
-
"title": "Occupancy Sensor",
|
|
1896
|
+
"title": "Switch + Occupancy Sensor",
|
|
1897
1897
|
"enum": [
|
|
1898
1898
|
2
|
|
1899
1899
|
]
|
|
1900
1900
|
},
|
|
1901
1901
|
{
|
|
1902
|
-
"title": "Contact Sensor",
|
|
1902
|
+
"title": "Switch + Contact Sensor",
|
|
1903
1903
|
"enum": [
|
|
1904
1904
|
3
|
|
1905
1905
|
]
|
|
@@ -1956,19 +1956,19 @@
|
|
|
1956
1956
|
]
|
|
1957
1957
|
},
|
|
1958
1958
|
{
|
|
1959
|
-
"title": "Motion Sensor",
|
|
1959
|
+
"title": "Switch + Motion Sensor",
|
|
1960
1960
|
"enum": [
|
|
1961
1961
|
1
|
|
1962
1962
|
]
|
|
1963
1963
|
},
|
|
1964
1964
|
{
|
|
1965
|
-
"title": "Occupancy Sensor",
|
|
1965
|
+
"title": "Switch + Occupancy Sensor",
|
|
1966
1966
|
"enum": [
|
|
1967
1967
|
2
|
|
1968
1968
|
]
|
|
1969
1969
|
},
|
|
1970
1970
|
{
|
|
1971
|
-
"title": "Contact Sensor",
|
|
1971
|
+
"title": "Switch + Contact Sensor",
|
|
1972
1972
|
"enum": [
|
|
1973
1973
|
3
|
|
1974
1974
|
]
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "4.2.3-beta.
|
|
4
|
+
"version": "4.2.3-beta.53",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|
package/src/deviceata.js
CHANGED
|
@@ -997,7 +997,7 @@ class DeviceAta extends EventEmitter {
|
|
|
997
997
|
.onSet(async (state) => {
|
|
998
998
|
try {
|
|
999
999
|
sceneData.Enabled = state;
|
|
1000
|
-
await this.melCloudAta.send(this.accountType, this.displayType,
|
|
1000
|
+
await this.melCloudAta.send(this.accountType, this.displayType, deviceData, 'scene', sceneData);
|
|
1001
1001
|
if (this.logInfo) this.emit('info', `Scene ${name}: ${state ? 'Enabled' : 'Disabled'}`);
|
|
1002
1002
|
} catch (error) {
|
|
1003
1003
|
if (this.logWarn) this.emit('warn', `Set scene error: ${error}`);
|
|
@@ -1007,10 +1007,12 @@ class DeviceAta extends EventEmitter {
|
|
|
1007
1007
|
accessory.addService(sceneControlService);
|
|
1008
1008
|
|
|
1009
1009
|
if (this.logDebug) this.emit('debug', `Prepare scene control sensor service`);
|
|
1010
|
-
const
|
|
1010
|
+
const serviceType = scene.serviceType;
|
|
1011
|
+
const characteristicType = scene.characteristicType;
|
|
1012
|
+
const sceneControlSensorService = new serviceType(serviceName1, `sceneControlSensorService${id}`);
|
|
1011
1013
|
sceneControlSensorService.addOptionalCharacteristic(Characteristic.ConfiguredName);
|
|
1012
1014
|
sceneControlSensorService.setCharacteristic(Characteristic.ConfiguredName, serviceName1);
|
|
1013
|
-
sceneControlSensorService.getCharacteristic(
|
|
1015
|
+
sceneControlSensorService.getCharacteristic(characteristicType)
|
|
1014
1016
|
.onGet(async () => {
|
|
1015
1017
|
const state = scene.state;
|
|
1016
1018
|
return state;
|
package/src/melcloudata.js
CHANGED
|
@@ -128,7 +128,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
128
128
|
};
|
|
129
129
|
};
|
|
130
130
|
|
|
131
|
-
async send(accountType, displayType, deviceData, effectiveFlags) {
|
|
131
|
+
async send(accountType, displayType, deviceData, effectiveFlags, scene) {
|
|
132
132
|
try {
|
|
133
133
|
let method = null
|
|
134
134
|
let payload = {};
|
|
@@ -225,7 +225,7 @@ class MelCloudAta extends EventEmitter {
|
|
|
225
225
|
break;
|
|
226
226
|
case 'scene':
|
|
227
227
|
method = 'PUT';
|
|
228
|
-
path = ApiUrlsHome.PutScene[
|
|
228
|
+
path = ApiUrlsHome.PutScene[scene.Enabled ? 'Eneble' : 'Disable'].replace('sceneid', deviceData.Id);
|
|
229
229
|
deviceData.Headers.Referer = ApiUrlsHome.Referers.GetPutScenes;
|
|
230
230
|
break;
|
|
231
231
|
default:
|