homebridge-melcloud-control 3.0.7-beta.3 → 3.0.7-beta.30
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 +198 -194
- package/homebridge-ui/public/index.html +41 -21
- package/homebridge-ui/server.js +2 -1
- package/package.json +1 -1
package/config.schema.json
CHANGED
|
@@ -220,6 +220,11 @@
|
|
|
220
220
|
"type": "integer",
|
|
221
221
|
"required": false
|
|
222
222
|
},
|
|
223
|
+
"typeString": {
|
|
224
|
+
"title": "Type",
|
|
225
|
+
"type": "string",
|
|
226
|
+
"required": false
|
|
227
|
+
},
|
|
223
228
|
"name": {
|
|
224
229
|
"title": "Name",
|
|
225
230
|
"type": "string",
|
|
@@ -691,6 +696,11 @@
|
|
|
691
696
|
"type": "integer",
|
|
692
697
|
"required": false
|
|
693
698
|
},
|
|
699
|
+
"typeString": {
|
|
700
|
+
"title": "Type",
|
|
701
|
+
"type": "string",
|
|
702
|
+
"required": false
|
|
703
|
+
},
|
|
694
704
|
"name": {
|
|
695
705
|
"title": "Name",
|
|
696
706
|
"type": "string",
|
|
@@ -1029,6 +1039,11 @@
|
|
|
1029
1039
|
"type": "integer",
|
|
1030
1040
|
"required": false
|
|
1031
1041
|
},
|
|
1042
|
+
"typeString": {
|
|
1043
|
+
"title": "Type",
|
|
1044
|
+
"type": "string",
|
|
1045
|
+
"required": false
|
|
1046
|
+
},
|
|
1032
1047
|
"name": {
|
|
1033
1048
|
"title": "Name",
|
|
1034
1049
|
"type": "string",
|
|
@@ -1437,231 +1452,213 @@
|
|
|
1437
1452
|
"type": "tabarray",
|
|
1438
1453
|
"title": "{{ value.name || 'account' }}",
|
|
1439
1454
|
"items": [
|
|
1455
|
+
"accounts[].name",
|
|
1456
|
+
"accounts[].user",
|
|
1440
1457
|
{
|
|
1441
|
-
"key": "accounts[]",
|
|
1442
|
-
"type": "
|
|
1443
|
-
"title": "MELCloud Credentials",
|
|
1444
|
-
"expandable": true,
|
|
1445
|
-
"expanded": false,
|
|
1446
|
-
"items": [
|
|
1447
|
-
"accounts[].name",
|
|
1448
|
-
"accounts[].user",
|
|
1449
|
-
{
|
|
1450
|
-
"key": "accounts[].passwd",
|
|
1451
|
-
"type": "password"
|
|
1452
|
-
},
|
|
1453
|
-
"accounts[].language"
|
|
1454
|
-
]
|
|
1458
|
+
"key": "accounts[].passwd",
|
|
1459
|
+
"type": "password"
|
|
1455
1460
|
},
|
|
1461
|
+
"accounts[].language",
|
|
1456
1462
|
{
|
|
1457
1463
|
"key": "accounts[]",
|
|
1458
|
-
"type": "
|
|
1459
|
-
"title": "
|
|
1460
|
-
"expandable": true,
|
|
1461
|
-
"expanded": false,
|
|
1464
|
+
"type": "tabarray",
|
|
1465
|
+
"title": "{{ value.title }}",
|
|
1462
1466
|
"items": [
|
|
1463
1467
|
{
|
|
1464
1468
|
"key": "accounts[]",
|
|
1465
|
-
"
|
|
1466
|
-
"title": "{{ value.title }}",
|
|
1469
|
+
"title": "Air Conditioner",
|
|
1467
1470
|
"items": [
|
|
1468
1471
|
{
|
|
1469
|
-
"key": "accounts[]",
|
|
1470
|
-
"
|
|
1472
|
+
"key": "accounts[].ataDevices",
|
|
1473
|
+
"type": "tabarray",
|
|
1474
|
+
"title": "{{ value.name }}",
|
|
1471
1475
|
"items": [
|
|
1472
1476
|
{
|
|
1473
|
-
"key": "accounts[].ataDevices",
|
|
1474
|
-
"
|
|
1475
|
-
|
|
1477
|
+
"key": "accounts[].ataDevices[].id",
|
|
1478
|
+
"readonly": true
|
|
1479
|
+
},
|
|
1480
|
+
{
|
|
1481
|
+
"key": "accounts[].ataDevices[].typeString",
|
|
1482
|
+
"readonly": true
|
|
1483
|
+
},
|
|
1484
|
+
{
|
|
1485
|
+
"key": "accounts[].ataDevices[]",
|
|
1486
|
+
"type": "section",
|
|
1487
|
+
"title": "Configuration",
|
|
1488
|
+
"expandable": true,
|
|
1489
|
+
"expanded": false,
|
|
1490
|
+
"items": [
|
|
1491
|
+
"accounts[].ataDevices[].name",
|
|
1492
|
+
"accounts[].ataDevices[].displayMode",
|
|
1493
|
+
"accounts[].ataDevices[].heatDryFanMode",
|
|
1494
|
+
"accounts[].ataDevices[].coolDryFanMode",
|
|
1495
|
+
"accounts[].ataDevices[].autoDryFanMode",
|
|
1496
|
+
"accounts[].ataDevices[].presets"
|
|
1497
|
+
]
|
|
1498
|
+
},
|
|
1499
|
+
{
|
|
1500
|
+
"key": "accounts[].ataDevices[]",
|
|
1501
|
+
"type": "section",
|
|
1502
|
+
"title": "Temperature Sensors",
|
|
1503
|
+
"expandable": true,
|
|
1504
|
+
"expanded": false,
|
|
1505
|
+
"items": [
|
|
1506
|
+
"accounts[].ataDevices[].temperatureSensor",
|
|
1507
|
+
"accounts[].ataDevices[].temperatureSensorOutdoor"
|
|
1508
|
+
]
|
|
1509
|
+
},
|
|
1510
|
+
{
|
|
1511
|
+
"key": "accounts[].ataDevices[]",
|
|
1512
|
+
"type": "section",
|
|
1513
|
+
"title": "Buttons / Sensors",
|
|
1514
|
+
"expandable": true,
|
|
1515
|
+
"expanded": false,
|
|
1476
1516
|
"items": [
|
|
1477
1517
|
{
|
|
1478
|
-
"key": "accounts[].ataDevices[].
|
|
1479
|
-
"
|
|
1480
|
-
|
|
1481
|
-
{
|
|
1482
|
-
"key": "accounts[].ataDevices[].type",
|
|
1483
|
-
"readonly": true
|
|
1484
|
-
},
|
|
1485
|
-
{
|
|
1486
|
-
"key": "accounts[].ataDevices[]",
|
|
1487
|
-
"type": "section",
|
|
1488
|
-
"title": "Device Config",
|
|
1489
|
-
"expandable": true,
|
|
1490
|
-
"expanded": false,
|
|
1491
|
-
"items": [
|
|
1492
|
-
"accounts[].ataDevices[].name",
|
|
1493
|
-
"accounts[].ataDevices[].displayMode",
|
|
1494
|
-
"accounts[].ataDevices[].heatDryFanMode",
|
|
1495
|
-
"accounts[].ataDevices[].coolDryFanMode",
|
|
1496
|
-
"accounts[].ataDevices[].autoDryFanMode",
|
|
1497
|
-
"accounts[].ataDevices[].presets"
|
|
1498
|
-
]
|
|
1499
|
-
},
|
|
1500
|
-
{
|
|
1501
|
-
"key": "accounts[].ataDevices[]",
|
|
1502
|
-
"type": "section",
|
|
1503
|
-
"title": "Temperature Sensors",
|
|
1504
|
-
"expandable": true,
|
|
1505
|
-
"expanded": false,
|
|
1518
|
+
"key": "accounts[].ataDevices[].buttonsSensors",
|
|
1519
|
+
"type": "tabarray",
|
|
1520
|
+
"title": "{{ value.name || 'button/sensor' }}",
|
|
1506
1521
|
"items": [
|
|
1507
|
-
"accounts[].ataDevices[].
|
|
1508
|
-
"accounts[].ataDevices[].
|
|
1509
|
-
|
|
1510
|
-
|
|
1511
|
-
{
|
|
1512
|
-
"key": "accounts[].ataDevices[]",
|
|
1513
|
-
"type": "section",
|
|
1514
|
-
"title": "Buttons / Sensors",
|
|
1515
|
-
"expandable": true,
|
|
1516
|
-
"expanded": false,
|
|
1517
|
-
"items": [
|
|
1518
|
-
{
|
|
1519
|
-
"key": "accounts[].ataDevices[].buttonsSensors",
|
|
1520
|
-
"type": "tabarray",
|
|
1521
|
-
"title": "{{ value.name || 'button/sensor' }}",
|
|
1522
|
-
"items": [
|
|
1523
|
-
"accounts[].ataDevices[].buttonsSensors[].name",
|
|
1524
|
-
"accounts[].ataDevices[].buttonsSensors[].mode",
|
|
1525
|
-
"accounts[].ataDevices[].buttonsSensors[].displayType",
|
|
1526
|
-
"accounts[].ataDevices[].buttonsSensors[].namePrefix"
|
|
1527
|
-
]
|
|
1528
|
-
}
|
|
1522
|
+
"accounts[].ataDevices[].buttonsSensors[].name",
|
|
1523
|
+
"accounts[].ataDevices[].buttonsSensors[].mode",
|
|
1524
|
+
"accounts[].ataDevices[].buttonsSensors[].displayType",
|
|
1525
|
+
"accounts[].ataDevices[].buttonsSensors[].namePrefix"
|
|
1529
1526
|
]
|
|
1530
1527
|
}
|
|
1531
1528
|
]
|
|
1532
1529
|
}
|
|
1533
1530
|
]
|
|
1534
|
-
}
|
|
1531
|
+
}
|
|
1532
|
+
]
|
|
1533
|
+
},
|
|
1534
|
+
{
|
|
1535
|
+
"key": "accounts[]",
|
|
1536
|
+
"title": "Heat Pump",
|
|
1537
|
+
"items": [
|
|
1535
1538
|
{
|
|
1536
|
-
"key": "accounts[]",
|
|
1537
|
-
"
|
|
1539
|
+
"key": "accounts[].atwDevices",
|
|
1540
|
+
"type": "tabarray",
|
|
1541
|
+
"title": "{{ value.name }}",
|
|
1538
1542
|
"items": [
|
|
1539
1543
|
{
|
|
1540
|
-
"key": "accounts[].atwDevices",
|
|
1541
|
-
"
|
|
1542
|
-
|
|
1544
|
+
"key": "accounts[].atwDevices[].id",
|
|
1545
|
+
"readonly": true
|
|
1546
|
+
},
|
|
1547
|
+
{
|
|
1548
|
+
"key": "accounts[].atwDevices[].typeString",
|
|
1549
|
+
"readonly": true
|
|
1550
|
+
},
|
|
1551
|
+
{
|
|
1552
|
+
"key": "accounts[].atwDevices[]",
|
|
1553
|
+
"type": "section",
|
|
1554
|
+
"title": "Configuration",
|
|
1555
|
+
"expandable": true,
|
|
1556
|
+
"expanded": false,
|
|
1557
|
+
"items": [
|
|
1558
|
+
"accounts[].atwDevices[].name",
|
|
1559
|
+
"accounts[].atwDevices[].displayMode",
|
|
1560
|
+
"accounts[].atwDevices[].presets"
|
|
1561
|
+
]
|
|
1562
|
+
},
|
|
1563
|
+
{
|
|
1564
|
+
"key": "accounts[].atwDevices[]",
|
|
1565
|
+
"type": "section",
|
|
1566
|
+
"title": "Temperature Sensors",
|
|
1567
|
+
"expandable": true,
|
|
1568
|
+
"expanded": false,
|
|
1569
|
+
"items": [
|
|
1570
|
+
"accounts[].atwDevices[].temperatureSensor",
|
|
1571
|
+
"accounts[].atwDevices[].temperatureSensorFlow",
|
|
1572
|
+
"accounts[].atwDevices[].temperatureSensorReturn",
|
|
1573
|
+
"accounts[].atwDevices[].temperatureSensorFlowZone1",
|
|
1574
|
+
"accounts[].atwDevices[].temperatureSensorReturnZone1",
|
|
1575
|
+
"accounts[].atwDevices[].temperatureSensorFlowWaterTank",
|
|
1576
|
+
"accounts[].atwDevices[].temperatureSensorReturnWaterTank",
|
|
1577
|
+
"accounts[].atwDevices[].temperatureSensorFlowZone2",
|
|
1578
|
+
"accounts[].atwDevices[].temperatureSensorReturnZone2"
|
|
1579
|
+
]
|
|
1580
|
+
},
|
|
1581
|
+
{
|
|
1582
|
+
"key": "accounts[].atwDevices[]",
|
|
1583
|
+
"type": "section",
|
|
1584
|
+
"title": "Buttons / Sensors",
|
|
1585
|
+
"expandable": true,
|
|
1586
|
+
"expanded": false,
|
|
1543
1587
|
"items": [
|
|
1544
1588
|
{
|
|
1545
|
-
"key": "accounts[].atwDevices[].
|
|
1546
|
-
"
|
|
1547
|
-
|
|
1548
|
-
{
|
|
1549
|
-
"key": "accounts[].atwDevices[].type",
|
|
1550
|
-
"readonly": true
|
|
1551
|
-
},
|
|
1552
|
-
{
|
|
1553
|
-
"key": "accounts[].atwDevices[]",
|
|
1554
|
-
"type": "section",
|
|
1555
|
-
"title": "Device Config",
|
|
1556
|
-
"expandable": true,
|
|
1557
|
-
"expanded": false,
|
|
1558
|
-
"items": [
|
|
1559
|
-
"accounts[].atwDevices[].name",
|
|
1560
|
-
"accounts[].atwDevices[].displayMode",
|
|
1561
|
-
"accounts[].atwDevices[].presets"
|
|
1562
|
-
]
|
|
1563
|
-
},
|
|
1564
|
-
{
|
|
1565
|
-
"key": "accounts[].atwDevices[]",
|
|
1566
|
-
"type": "section",
|
|
1567
|
-
"title": "Temperature Sensors",
|
|
1568
|
-
"expandable": true,
|
|
1569
|
-
"expanded": false,
|
|
1589
|
+
"key": "accounts[].atwDevices[].buttonsSensors",
|
|
1590
|
+
"type": "tabarray",
|
|
1591
|
+
"title": "{{ value.name || 'button/sensor' }}",
|
|
1570
1592
|
"items": [
|
|
1571
|
-
"accounts[].atwDevices[].
|
|
1572
|
-
"accounts[].atwDevices[].
|
|
1573
|
-
"accounts[].atwDevices[].
|
|
1574
|
-
"accounts[].atwDevices[].
|
|
1575
|
-
"accounts[].atwDevices[].temperatureSensorReturnZone1",
|
|
1576
|
-
"accounts[].atwDevices[].temperatureSensorFlowWaterTank",
|
|
1577
|
-
"accounts[].atwDevices[].temperatureSensorReturnWaterTank",
|
|
1578
|
-
"accounts[].atwDevices[].temperatureSensorFlowZone2",
|
|
1579
|
-
"accounts[].atwDevices[].temperatureSensorReturnZone2"
|
|
1580
|
-
]
|
|
1581
|
-
},
|
|
1582
|
-
{
|
|
1583
|
-
"key": "accounts[].atwDevices[]",
|
|
1584
|
-
"type": "section",
|
|
1585
|
-
"title": "Buttons / Sensors",
|
|
1586
|
-
"expandable": true,
|
|
1587
|
-
"expanded": false,
|
|
1588
|
-
"items": [
|
|
1589
|
-
{
|
|
1590
|
-
"key": "accounts[].atwDevices[].buttonsSensors",
|
|
1591
|
-
"type": "tabarray",
|
|
1592
|
-
"title": "{{ value.name || 'button/sensor' }}",
|
|
1593
|
-
"items": [
|
|
1594
|
-
"accounts[].atwDevices[].buttonsSensors[].name",
|
|
1595
|
-
"accounts[].atwDevices[].buttonsSensors[].mode",
|
|
1596
|
-
"accounts[].atwDevices[].buttonsSensors[].displayType",
|
|
1597
|
-
"accounts[].atwDevices[].buttonsSensors[].namePrefix"
|
|
1598
|
-
]
|
|
1599
|
-
}
|
|
1593
|
+
"accounts[].atwDevices[].buttonsSensors[].name",
|
|
1594
|
+
"accounts[].atwDevices[].buttonsSensors[].mode",
|
|
1595
|
+
"accounts[].atwDevices[].buttonsSensors[].displayType",
|
|
1596
|
+
"accounts[].atwDevices[].buttonsSensors[].namePrefix"
|
|
1600
1597
|
]
|
|
1601
1598
|
}
|
|
1602
1599
|
]
|
|
1603
1600
|
}
|
|
1604
1601
|
]
|
|
1605
|
-
}
|
|
1602
|
+
}
|
|
1603
|
+
]
|
|
1604
|
+
},
|
|
1605
|
+
{
|
|
1606
|
+
"key": "accounts[]",
|
|
1607
|
+
"title": "Energy Recovery Ventilation",
|
|
1608
|
+
"items": [
|
|
1606
1609
|
{
|
|
1607
|
-
"key": "accounts[]",
|
|
1608
|
-
"
|
|
1610
|
+
"key": "accounts[].ervDevices",
|
|
1611
|
+
"type": "tabarray",
|
|
1612
|
+
"title": "{{ value.name }}",
|
|
1609
1613
|
"items": [
|
|
1610
1614
|
{
|
|
1611
|
-
"key": "accounts[].ervDevices",
|
|
1612
|
-
"
|
|
1613
|
-
|
|
1615
|
+
"key": "accounts[].ervDevices[].id",
|
|
1616
|
+
"readonly": true
|
|
1617
|
+
},
|
|
1618
|
+
{
|
|
1619
|
+
"key": "accounts[].ervDevices[].typeString",
|
|
1620
|
+
"readonly": true
|
|
1621
|
+
},
|
|
1622
|
+
{
|
|
1623
|
+
"key": "accounts[].ervDevices[]",
|
|
1624
|
+
"type": "section",
|
|
1625
|
+
"title": "Configuration",
|
|
1626
|
+
"expandable": true,
|
|
1627
|
+
"expanded": false,
|
|
1628
|
+
"items": [
|
|
1629
|
+
"accounts[].ervDevices[].name",
|
|
1630
|
+
"accounts[].ervDevices[].displayMode",
|
|
1631
|
+
"accounts[].ervDevices[].presets"
|
|
1632
|
+
]
|
|
1633
|
+
},
|
|
1634
|
+
{
|
|
1635
|
+
"key": "accounts[].ervDevices[]",
|
|
1636
|
+
"type": "section",
|
|
1637
|
+
"title": "Temperature Sensors",
|
|
1638
|
+
"expandable": true,
|
|
1639
|
+
"expanded": false,
|
|
1640
|
+
"items": [
|
|
1641
|
+
"accounts[].ervDevices[].temperatureSensor",
|
|
1642
|
+
"accounts[].ervDevices[].temperatureSensorOutdoor",
|
|
1643
|
+
"accounts[].ervDevices[].temperatureSensorSupply"
|
|
1644
|
+
]
|
|
1645
|
+
},
|
|
1646
|
+
{
|
|
1647
|
+
"key": "accounts[].ervDevices[]",
|
|
1648
|
+
"type": "section",
|
|
1649
|
+
"title": "Buttons / Sensors",
|
|
1650
|
+
"expandable": true,
|
|
1651
|
+
"expanded": false,
|
|
1614
1652
|
"items": [
|
|
1615
1653
|
{
|
|
1616
|
-
"key": "accounts[].ervDevices[].
|
|
1617
|
-
"
|
|
1618
|
-
|
|
1619
|
-
{
|
|
1620
|
-
"key": "accounts[].ervDevices[].type",
|
|
1621
|
-
"readonly": true
|
|
1622
|
-
},
|
|
1623
|
-
{
|
|
1624
|
-
"key": "accounts[].ervDevices[]",
|
|
1625
|
-
"type": "section",
|
|
1626
|
-
"title": "Device Config",
|
|
1627
|
-
"expandable": true,
|
|
1628
|
-
"expanded": false,
|
|
1629
|
-
"items": [
|
|
1630
|
-
"accounts[].ervDevices[].name",
|
|
1631
|
-
"accounts[].ervDevices[].displayMode",
|
|
1632
|
-
"accounts[].ervDevices[].presets"
|
|
1633
|
-
]
|
|
1634
|
-
},
|
|
1635
|
-
{
|
|
1636
|
-
"key": "accounts[].ervDevices[]",
|
|
1637
|
-
"type": "section",
|
|
1638
|
-
"title": "Temperature Sensors",
|
|
1639
|
-
"expandable": true,
|
|
1640
|
-
"expanded": false,
|
|
1641
|
-
"items": [
|
|
1642
|
-
"accounts[].ervDevices[].temperatureSensor",
|
|
1643
|
-
"accounts[].ervDevices[].temperatureSensorOutdoor",
|
|
1644
|
-
"accounts[].ervDevices[].temperatureSensorSupply"
|
|
1645
|
-
]
|
|
1646
|
-
},
|
|
1647
|
-
{
|
|
1648
|
-
"key": "accounts[].ervDevices[]",
|
|
1649
|
-
"type": "section",
|
|
1650
|
-
"title": "Buttons / Sensors",
|
|
1651
|
-
"expandable": true,
|
|
1652
|
-
"expanded": false,
|
|
1654
|
+
"key": "accounts[].ervDevices[].buttonsSensors",
|
|
1655
|
+
"type": "tabarray",
|
|
1656
|
+
"title": "{{ value.name || 'button/sensor' }}",
|
|
1653
1657
|
"items": [
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
"items": [
|
|
1659
|
-
"accounts[].ervDevices[].buttonsSensors[].name",
|
|
1660
|
-
"accounts[].ervDevices[].buttonsSensors[].mode",
|
|
1661
|
-
"accounts[].ervDevices[].buttonsSensors[].displayType",
|
|
1662
|
-
"accounts[].ervDevices[].buttonsSensors[].namePrefix"
|
|
1663
|
-
]
|
|
1664
|
-
}
|
|
1658
|
+
"accounts[].ervDevices[].buttonsSensors[].name",
|
|
1659
|
+
"accounts[].ervDevices[].buttonsSensors[].mode",
|
|
1660
|
+
"accounts[].ervDevices[].buttonsSensors[].displayType",
|
|
1661
|
+
"accounts[].ervDevices[].buttonsSensors[].namePrefix"
|
|
1665
1662
|
]
|
|
1666
1663
|
}
|
|
1667
1664
|
]
|
|
@@ -1669,13 +1666,20 @@
|
|
|
1669
1666
|
]
|
|
1670
1667
|
}
|
|
1671
1668
|
]
|
|
1672
|
-
}
|
|
1669
|
+
}
|
|
1670
|
+
]
|
|
1671
|
+
},
|
|
1672
|
+
{
|
|
1673
|
+
"key": "accounts[]",
|
|
1674
|
+
"type": "section",
|
|
1675
|
+
"title": "Advanced Settings",
|
|
1676
|
+
"expandable": true,
|
|
1677
|
+
"expanded": false,
|
|
1678
|
+
"items": [
|
|
1673
1679
|
{
|
|
1674
1680
|
"key": "accounts[]",
|
|
1675
|
-
"type": "
|
|
1676
|
-
"title": "
|
|
1677
|
-
"expandable": true,
|
|
1678
|
-
"expanded": false,
|
|
1681
|
+
"type": "tabarray",
|
|
1682
|
+
"title": "{{ value.name }}",
|
|
1679
1683
|
"items": [
|
|
1680
1684
|
{
|
|
1681
1685
|
"key": "accounts[]",
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
<div>
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
<div style="text-align: center;">
|
|
2
|
+
</divstyle>
|
|
3
|
+
<img src="homebridge-melcloud-control.png" alt="Image" height="120" />
|
|
4
|
+
</div><br>
|
|
5
|
+
|
|
6
6
|
<div id="melCloudAccount" style="display: none;" class="card card-body">
|
|
7
7
|
<form id="configForm">
|
|
8
8
|
<div class="text-center">
|
|
9
9
|
<label id="accountName" style="font-size: 23px">Account</label><br>
|
|
10
|
-
<label id="info" style="text-align: center; font-size: 17px;"
|
|
10
|
+
<label id="info" style="text-align: center; font-size: 17px;"></label><br>
|
|
11
11
|
</div>
|
|
12
12
|
<div class="form-group">
|
|
13
13
|
<label for="name">Name</label>
|
|
@@ -44,12 +44,14 @@
|
|
|
44
44
|
<option value="23">Hrvatski</option>
|
|
45
45
|
<option value="24">Română</option>
|
|
46
46
|
<option value="25">Slovenščina</option>
|
|
47
|
-
</select>
|
|
47
|
+
</select><br>
|
|
48
48
|
</div>
|
|
49
49
|
<div class="text-center">
|
|
50
50
|
<button id="logIn" type="button" class="btn btn-primary">Connect to MELCloud</button>
|
|
51
51
|
<button id="configButton" type="button" class="btn btn-primary"><i class="fas fa-gear"></i></button>
|
|
52
52
|
</div>
|
|
53
|
+
<div id="accountButton">
|
|
54
|
+
</div>
|
|
53
55
|
</form>
|
|
54
56
|
</div>
|
|
55
57
|
|
|
@@ -74,8 +76,9 @@
|
|
|
74
76
|
button.setAttribute("type", "button");
|
|
75
77
|
button.setAttribute("id", `button${i}`);
|
|
76
78
|
button.setAttribute("class", "btn btn-primary");
|
|
79
|
+
button.style.textTransform = 'none';
|
|
77
80
|
button.innerText = pluginConfig[0].accounts[i].name;
|
|
78
|
-
document.getElementById("
|
|
81
|
+
document.getElementById("accountButton").appendChild(button);
|
|
79
82
|
|
|
80
83
|
//get actuall value on account select
|
|
81
84
|
document.getElementById(`button${i}`).addEventListener('click', async () => {
|
|
@@ -147,15 +150,23 @@
|
|
|
147
150
|
const info = response.info ?? '';
|
|
148
151
|
const status = response.status;
|
|
149
152
|
const devices = response.data ?? [];
|
|
150
|
-
const newDevices =
|
|
153
|
+
const newDevices = {
|
|
154
|
+
ata: [],
|
|
155
|
+
atw: [],
|
|
156
|
+
erv: []
|
|
157
|
+
};
|
|
158
|
+
let textAta = 'ATA: 0';
|
|
159
|
+
let textAtw = 'ATW: 0';
|
|
160
|
+
let textErv = 'ERV: 0';
|
|
151
161
|
|
|
152
162
|
switch (status) {
|
|
153
163
|
case 0:
|
|
154
164
|
//get device info fom devices
|
|
155
|
-
devices.forEach((
|
|
156
|
-
const
|
|
157
|
-
const
|
|
158
|
-
const
|
|
165
|
+
devices.forEach((device, index) => {
|
|
166
|
+
const deviceId = device.DeviceID;
|
|
167
|
+
const deviceType = device.Type;
|
|
168
|
+
const deviceTypeText = ["Air Conditioner", "Heat Pump", "Unknown", "Energy Recovery Ventilation"][deviceType];
|
|
169
|
+
const deviceName = device.DeviceName;
|
|
159
170
|
|
|
160
171
|
//config account keys
|
|
161
172
|
const accountKeys = Object.keys(pluginConfig[0].accounts[this.deviceIndex]);
|
|
@@ -163,9 +174,10 @@
|
|
|
163
174
|
//devices ata
|
|
164
175
|
if (deviceType === 0) {
|
|
165
176
|
const deviceAta = {
|
|
166
|
-
name: deviceName,
|
|
167
177
|
id: deviceId,
|
|
168
178
|
type: deviceType,
|
|
179
|
+
typeString: deviceTypeText,
|
|
180
|
+
name: deviceName,
|
|
169
181
|
displayMode: 0,
|
|
170
182
|
heatDryFanMode: 0,
|
|
171
183
|
coolDryFanMode: 0,
|
|
@@ -180,15 +192,18 @@
|
|
|
180
192
|
const ataDevices = ataDevicesExist ? pluginConfig[0].accounts[this.deviceIndex].ataDevices : pluginConfig[0].accounts[this.deviceIndex].ataDevices = [];
|
|
181
193
|
const ataDeviceIdExist = ataDevices.some(device => device.id === deviceId);
|
|
182
194
|
const pushTypeAta = ataDeviceIdExist ? false : ataDevices.push(deviceAta);
|
|
183
|
-
const pushNewDevice = ataDeviceIdExist ? false : newDevices.push(
|
|
195
|
+
const pushNewDevice = ataDeviceIdExist ? false : newDevices.ata.push(device);
|
|
196
|
+
const devicesCount = newDevices.ata.length;
|
|
197
|
+
textAta = `ATA: ${devicesCount}`
|
|
184
198
|
};
|
|
185
199
|
|
|
186
200
|
//devices atw
|
|
187
201
|
if (deviceType === 1) {
|
|
188
202
|
const deviceAtw = {
|
|
189
|
-
name: deviceName,
|
|
190
203
|
id: deviceId,
|
|
191
204
|
type: deviceType,
|
|
205
|
+
typeString: deviceTypeText,
|
|
206
|
+
name: deviceName,
|
|
192
207
|
displayMode: 0,
|
|
193
208
|
temperatureSensor: false,
|
|
194
209
|
temperatureSensorFlow: false,
|
|
@@ -208,15 +223,18 @@
|
|
|
208
223
|
const atwDevices = atwDevicesExist ? pluginConfig[0].accounts[this.deviceIndex].atwDevices : pluginConfig[0].accounts[this.deviceIndex].atwDevices = [];
|
|
209
224
|
const atwDeviceIdExist = atwDevices.some(device => device.id === deviceId);
|
|
210
225
|
const pushTypeatw = atwDeviceIdExist ? false : atwDevices.push(deviceAtw);
|
|
211
|
-
const pushNewDevice = atwDeviceIdExist ? false : newDevices.push(
|
|
226
|
+
const pushNewDevice = atwDeviceIdExist ? false : newDevices.atw.push(device);
|
|
227
|
+
const devicesCount = newDevices.ata.length;
|
|
228
|
+
textAtw = `ATW: ${devicesCount}`
|
|
212
229
|
};
|
|
213
230
|
|
|
214
231
|
//devices erv
|
|
215
232
|
if (deviceType === 3) {
|
|
216
233
|
const deviceErv = {
|
|
217
|
-
name: deviceName,
|
|
218
234
|
id: deviceId,
|
|
219
235
|
type: deviceType,
|
|
236
|
+
typeString: deviceTypeText,
|
|
237
|
+
name: deviceName,
|
|
220
238
|
displayMode: 0,
|
|
221
239
|
temperatureSensor: false,
|
|
222
240
|
temperatureSensorOutdoor: false,
|
|
@@ -230,12 +248,14 @@
|
|
|
230
248
|
const ervDevices = ervDevicesExist ? pluginConfig[0].accounts[this.deviceIndex].ervDevices : pluginConfig[0].accounts[this.deviceIndex].ervDevices = [];
|
|
231
249
|
const ervDeviceIdExist = ervDevices.some(device => device.id === deviceId);
|
|
232
250
|
const pushTypeerv = ervDeviceIdExist ? false : ervDevices.push(deviceErv);
|
|
233
|
-
const pushNewDevice = ervDeviceIdExist ? false : newDevices.push(
|
|
251
|
+
const pushNewDevice = ervDeviceIdExist ? false : newDevices.erv.push(device);
|
|
252
|
+
const devicesCount = newDevices.ata.length;
|
|
253
|
+
textErv = `ERV: ${devicesCount}`
|
|
234
254
|
};
|
|
235
255
|
});
|
|
236
256
|
|
|
237
|
-
const
|
|
238
|
-
document.getElementById('info').innerHTML = `
|
|
257
|
+
const newDevicesCount = newDevices.ata.length + newDevices.atw.length + newDevices.erv.length;
|
|
258
|
+
document.getElementById('info').innerHTML = `Found in MELCloud, ${textAta}, ${textAtw}, ${textErv}. ${newDevicesCount === 0 ? '' : 'Now You can start to configure it.'}`;
|
|
239
259
|
document.getElementById('info').style.color = 'green';
|
|
240
260
|
|
|
241
261
|
await homebridge.updatePluginConfig(pluginConfig);
|
package/homebridge-ui/server.js
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"displayName": "MELCloud Control",
|
|
3
3
|
"name": "homebridge-melcloud-control",
|
|
4
|
-
"version": "3.0.7-beta.
|
|
4
|
+
"version": "3.0.7-beta.30",
|
|
5
5
|
"description": "Homebridge plugin to control Mitsubishi Air Conditioner, Heat Pump and Energy Recovery Ventilation.",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"author": "grzegorz914",
|