homebridge-midea-platform 0.3.4 → 0.4.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.
- package/README.md +199 -10
- package/config.schema.json +174 -126
- package/dist/accessory/AirConditionerAccessory.d.ts +0 -1
- package/dist/accessory/AirConditionerAccessory.d.ts.map +1 -1
- package/dist/accessory/AirConditionerAccessory.js +11 -41
- package/dist/accessory/AirConditionerAccessory.js.map +1 -1
- package/dist/accessory/BaseAccessory.d.ts.map +1 -1
- package/dist/accessory/BaseAccessory.js +4 -2
- package/dist/accessory/BaseAccessory.js.map +1 -1
- package/dist/accessory/DehumidifierAccessory.js +3 -2
- package/dist/accessory/DehumidifierAccessory.js.map +1 -1
- package/dist/core/MideaCloud.d.ts +4 -14
- package/dist/core/MideaCloud.d.ts.map +1 -1
- package/dist/core/MideaCloud.js +29 -23
- package/dist/core/MideaCloud.js.map +1 -1
- package/dist/core/MideaConstants.d.ts +2 -2
- package/dist/core/MideaConstants.d.ts.map +1 -1
- package/dist/core/MideaDevice.d.ts +3 -2
- package/dist/core/MideaDevice.d.ts.map +1 -1
- package/dist/core/MideaDevice.js +84 -50
- package/dist/core/MideaDevice.js.map +1 -1
- package/dist/core/MideaDiscover.d.ts +1 -2
- package/dist/core/MideaDiscover.d.ts.map +1 -1
- package/dist/core/MideaDiscover.js +15 -10
- package/dist/core/MideaDiscover.js.map +1 -1
- package/dist/core/MideaUtils.d.ts +2 -2
- package/dist/core/MideaUtils.d.ts.map +1 -1
- package/dist/core/MideaUtils.js +10 -4
- package/dist/core/MideaUtils.js.map +1 -1
- package/dist/devices/DeviceFactory.d.ts +2 -2
- package/dist/devices/DeviceFactory.d.ts.map +1 -1
- package/dist/devices/DeviceFactory.js +3 -3
- package/dist/devices/DeviceFactory.js.map +1 -1
- package/dist/devices/a1/MideaA1Device.d.ts +5 -5
- package/dist/devices/a1/MideaA1Device.d.ts.map +1 -1
- package/dist/devices/a1/MideaA1Device.js +26 -20
- package/dist/devices/a1/MideaA1Device.js.map +1 -1
- package/dist/devices/ac/MideaACDevice.d.ts +2 -4
- package/dist/devices/ac/MideaACDevice.d.ts.map +1 -1
- package/dist/devices/ac/MideaACDevice.js +77 -72
- package/dist/devices/ac/MideaACDevice.js.map +1 -1
- package/dist/platform.d.ts +18 -11
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +116 -146
- package/dist/platform.js.map +1 -1
- package/dist/platformUtils.d.ts +21 -10
- package/dist/platformUtils.d.ts.map +1 -1
- package/dist/platformUtils.js +40 -1
- package/dist/platformUtils.js.map +1 -1
- package/dist/settings.d.ts +1 -1
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js +1 -1
- package/dist/settings.js.map +1 -1
- package/homebridge-ui/public/css/bootstrap.min.css +6 -0
- package/homebridge-ui/public/index.html +265 -0
- package/homebridge-ui/public/js/bootstrap.min.js +7 -0
- package/homebridge-ui/server.js +220 -0
- package/package.json +4 -1
package/README.md
CHANGED
|
@@ -1,16 +1,205 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Homebridge Midea-Platform Plugin
|
|
2
|
+
<!--
|
|
3
|
+
[](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
4
|
+
-->
|
|
5
|
+
[](https://www.npmjs.com/package/homebridge-midea-platform)
|
|
6
|
+
[](https://www.npmjs.com/package/homebridge-midea-platform)
|
|
2
7
|
|
|
3
|
-
|
|
8
|
+
*Unofficial* plugin for Midea. This is implemented by building on the Homebridge platform plugin template and the work done by [@georgezhao2010](https://github.com/georgezhao2010) in the [midea_ac_lan](https://github.com/georgezhao2010/midea_ac_lan) project for Home Assistant.
|
|
4
9
|
|
|
5
|
-
|
|
6
|
-
Also, my TCP socket knowledge (especially in Node.js) is kinda bad, so if you have any more idea how to reconnect in case of connection is lost, or when there is any error in the TCP connection, I will thank you!
|
|
10
|
+
**Warning** this plugin is new and not fully tested for all devices.
|
|
7
11
|
|
|
8
|
-
|
|
12
|
+
Pull requests and/or other offers of development assistance gratefully received.
|
|
9
13
|
|
|
10
|
-
|
|
11
|
-
In the plugin's config you have to provide the IP of your Midea device, so it's highly recommended to reserve an IP for the devices you need. There is also a discover functionality, but I didn't tested it fully yet.
|
|
14
|
+
## Features
|
|
12
15
|
|
|
13
|
-
|
|
16
|
+
Currently supports the following devices:
|
|
14
17
|
|
|
15
|
-
|
|
16
|
-
|
|
18
|
+
* Air Conditioner (0xAC)
|
|
19
|
+
* Humidifier (0xA1)
|
|
20
|
+
|
|
21
|
+
## Installation
|
|
22
|
+
|
|
23
|
+
**Option 1: Install via Homebridge Config UI X:**
|
|
24
|
+
|
|
25
|
+
Search for "midea" in [homebridge-config-ui-x](https://github.com/oznu/homebridge-config-ui-x) and install `homebridge-midea-platform`.
|
|
26
|
+
|
|
27
|
+
**Option 2: Manually Install:**
|
|
28
|
+
|
|
29
|
+
```text
|
|
30
|
+
sudo npm install -g homebridge-midea-platform
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Midea device status is retrieved over your Local Area Network (LAN) and credentials are obtained from the Midea cloud services over the internet. While the plugin maintains a status cache, **use of Homebridge [child bridge](https://github.com/homebridge/homebridge/wiki/Child-Bridges)** is strongly encouraged. As noted below in the *network resiliency* section, this plugin will make multiple attempts to fulfill a request if necessary, which can take time.
|
|
34
|
+
|
|
35
|
+
## Configuration
|
|
36
|
+
|
|
37
|
+
### Homebridge Config UI X
|
|
38
|
+
|
|
39
|
+
[Homebridge Config UI X](https://github.com/oznu/homebridge-config-ui-x) is the easiest and **strongly recommended** way to configure this plugin.
|
|
40
|
+
|
|
41
|
+
## Device Discovery
|
|
42
|
+
|
|
43
|
+
Credentials for each Midea device on your Local Area Network (LAN) must be retrieved from Midea cloud server, this is done through the Settings window in the Homebridge Config User Interface. On opening the settings window, click on *Discover Devices* and enter the requested information.
|
|
44
|
+
|
|
45
|
+
* **Registered app** *(required)*: Name of the Midea mobile app that you registered your userid and password with. Defaults to *Midea SmartHome (MSmartHome)*, but you can also select *NetHome Plus* or *Meiju*.
|
|
46
|
+
* **Username** *(required)*: Email address / userid that you use to login to the Midea cloud service.
|
|
47
|
+
* **Password** *(required)*: Password for Midea cloud service
|
|
48
|
+
|
|
49
|
+
On clicking *Discover All Devices* the plugin sends a message to the broadcast address for the subnet of each network interface attached to the Homebridge server. Midea devices attached to the network will respond. Network discovery is repeated multiple times (currently 4 times at interval of 3 seconds between each). At the end of the process details of all devices discovered are listed in the Settings window. From there, you can add new devices or update the *token/key* credentials for existing devices. You can then edit details for each device (for example change the name).
|
|
50
|
+
|
|
51
|
+
*You must click Save button* to update the Homebridge config.json file and restart the plugin.
|
|
52
|
+
|
|
53
|
+
Midea cloud credentals (Username / Password) are not saved as these are only required for retrieval of each device token/key pair. Once those are known and saved this plugin no longer accesses Midea cloud servers over the internet.
|
|
54
|
+
|
|
55
|
+
### Deleting a device
|
|
56
|
+
|
|
57
|
+
If you delete a device in the plugin settings window, or the Homebridge config.json file, then note that this does *not* delete the cached accessory from Homebridge... the device will still be visible in Homebridge and Apple Home, but it will not respond to any requests or update any data. To remove the device from Apple Home you must use Homebridge Settings and select *Remove Single Cached Accessory* to complete the deletion. **Caution:** removing an accessory from Apple Home may impact any automations that are dependent on the accessory, possibly deleting the automations.
|
|
58
|
+
|
|
59
|
+
### Configuration File
|
|
60
|
+
|
|
61
|
+
```json
|
|
62
|
+
"platforms": [
|
|
63
|
+
{
|
|
64
|
+
"name": "Midea Platform",
|
|
65
|
+
"platform": "midea-platform",
|
|
66
|
+
"refreshInterval": 30,
|
|
67
|
+
"heartbeatInterval": 10,
|
|
68
|
+
"verbose": false,
|
|
69
|
+
"logRecoverableErrors": true,
|
|
70
|
+
"uiDebug": false,
|
|
71
|
+
"devices": [
|
|
72
|
+
{
|
|
73
|
+
"type": "dehumidifier",
|
|
74
|
+
"name": "Dehumidifier",
|
|
75
|
+
"id": "123456789012345",
|
|
76
|
+
"advanced_options": {
|
|
77
|
+
"token": "ABCDEF1234567890",
|
|
78
|
+
"key": "1234567890ABCDEF",
|
|
79
|
+
"verbose": false,
|
|
80
|
+
"logRecoverableErrors": true
|
|
81
|
+
},
|
|
82
|
+
"<device_options>": {
|
|
83
|
+
"device_option": "value"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
]
|
|
87
|
+
}
|
|
88
|
+
]
|
|
89
|
+
```
|
|
90
|
+
* **Platform Properties**
|
|
91
|
+
* **name** *(required)*: Platform name, set to 'Midea Platform'.
|
|
92
|
+
* **platform** *(required)*: Platform identifier, set to 'midea-platform'.
|
|
93
|
+
* **refreshInterval** *(optional)*: Frequency in seconds that the plugin will query a device for status. The plugin maintains a cache of device status so that it can respond quickly to state requests from HomeKit without having to send a request to the Midea device. Many Midea devices will automatically notify the plugin of any status change (e.g. temperature or humidity) but the plugin will also regularly request status from each device at the interval specified. The default is 30 seconds, the maximum is 86400 (24 hours). Setting value to 0 (zero) disables polling and updates will only be noted if devices sends it automatically.
|
|
94
|
+
* **heartbeatInterval** *(optional)*: Frequency in seconds that the plugin will send a heartbeat message to a device to keep the network socket open. The default and minimum is 10 seconds, you can increase this up to a maximum of 120 (2 minutes). If you see socket closed error messages in the log reduce this value.
|
|
95
|
+
* **verbose** *(optional)*: Enables more verbose debug logging. This requires that Homebridge is run with debug mode enabled and will add additional network traffic details to the log. Default is false. See *logging* section below.
|
|
96
|
+
* **logRecoverableErrors** *(optional)*: Enables logging of recoverable warning or error messages. Default is true. See *logging* and *network resiliency* sections below.
|
|
97
|
+
* **uiDebug** *(optional)*: Debug data for the custom UI device discovery process will be logged to the Homebridge log and Javascript console. Default is false.
|
|
98
|
+
* **devices** *(required)*: Array of device settings, see below.
|
|
99
|
+
|
|
100
|
+
* **devices** is an array of objects that allow settings or overrides for each device and contains the following fields:
|
|
101
|
+
* **type** *(required)*: Must be set to one of the supported devices.
|
|
102
|
+
* **name** *(optional)*: This replaces the name set by the Midea device and is displayed in the Homebridge accessories page. Entries in the log are prefixed with this name to assist in identifying the source of information being logged.
|
|
103
|
+
* **id** *(required)*: ID to identify specific device. This will be filled in by the device discovery process in the Settings window but uou can also find this from the Homebridge log during plugin initialization or in the Homebridge Config UI X by clicking on an accessory settings and copying the *Product Data* field.
|
|
104
|
+
* **advanced_options** *(required)*: Object with settings specific for this device:
|
|
105
|
+
* **token** *(required)*: Device login token.
|
|
106
|
+
* **key** *(required)*: Device login key. Specifying a token/key pair will override any values previously cached by the plugin.
|
|
107
|
+
* **verbose** *(optional)*: Override global setting for this one device.
|
|
108
|
+
* **logRecoverableErrors** *(optional)*: Override global setting for this one device.
|
|
109
|
+
* **<device_options>** *(optional)*: Object with name and options that are device type specific. See *device notes* below.
|
|
110
|
+
|
|
111
|
+
## Plugin Initialization
|
|
112
|
+
|
|
113
|
+
When the plugin initializes it attempts to find all devices attached to the Local Area Network (LAN) by sending a message to the broadcast address of the subnet for each network interface attached to the Homebridge server. Midea devices attached to the network will respond and are checked against devices configured in the plugin platform config.json file. Network discovery is repeated multiple times (currently 4 times at interval of 2 seconds between each).
|
|
114
|
+
|
|
115
|
+
At the end of the discovery process, if there are devices configured in the *devices* array with deviceID that was not discovered, then a warning is noted in the log and the plugin will retry every 60 seconds until the missing device comes online.
|
|
116
|
+
|
|
117
|
+
## Device Notes
|
|
118
|
+
|
|
119
|
+
Observed behavior of various devices, and specific configuration settings are noted below for supported devices.
|
|
120
|
+
|
|
121
|
+
### Air Conditioner
|
|
122
|
+
|
|
123
|
+
Providing air conditioner settings is optional and the whole section or individual options may be ommitted and default values (noted below) will be used. Within the *devices.config* object the following air conditioner specific options.
|
|
124
|
+
|
|
125
|
+
```json
|
|
126
|
+
"AC_options": {
|
|
127
|
+
"swingMode": "Both",
|
|
128
|
+
"outDoorTemp": false,
|
|
129
|
+
"audioFeedback": false,
|
|
130
|
+
"ecoSwitch": true,
|
|
131
|
+
"switchDisplay": {
|
|
132
|
+
"flag": true,
|
|
133
|
+
"command": false
|
|
134
|
+
},
|
|
135
|
+
"minTemp": 16,
|
|
136
|
+
"maxTemp": 30,
|
|
137
|
+
"tempStep": 1,
|
|
138
|
+
"fahrenheit": false,
|
|
139
|
+
"fanOnlyMode": false
|
|
140
|
+
}
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
* **Air Conditioner options**
|
|
144
|
+
* **swingMode** *(optional)*: Set swing mode of the unit. If you AC does not support this feature then leave it on None.
|
|
145
|
+
* **outDoorTemp** *(optional)*: Toggles if the outdoor temperature is created with the accessory, default is false.
|
|
146
|
+
* **audioFeedback** *(optional)*: Toggles if the unit beeps when a command is sent, default is false.
|
|
147
|
+
* **ecoSwitch** *(optional)*: Toggles if the ECO mode switch is created with the accessory, default is true.
|
|
148
|
+
* **switchDisplay** *(optional)*: Object with following two options...
|
|
149
|
+
* **flag** *(optional)*: Toggles if a switch, which can turn the display on or off will be created or not. Default is true.
|
|
150
|
+
* **command** *(optional)*: Use this if the switch display command does not work. If it doesn't work either way then you unit does not support this feature. Default is false.
|
|
151
|
+
* **minTemp** *(optional)*: The minimum temperature that the unit can be set for. Default is 16 celsius
|
|
152
|
+
* **maxTemp** *(optional)*: The maximum temperature that the unit can be set for. Default is 30 celsius
|
|
153
|
+
* **tempStep** *(optional)*: Increment in which the temperature setting can be changed, may be set to either 0.5 or 1 degree celsius. The default is one degree.
|
|
154
|
+
* **fahrenheit** *(optional)*: Toggles if the temperature on the unit is displayed in Fahrenheit or Celsius. Default is false (displays in Celsius).
|
|
155
|
+
* **fanOnlyMode** *(optional)*: Toggles if the fan only mode is created with the accessory. Default is false.
|
|
156
|
+
|
|
157
|
+
### Dehumidifier
|
|
158
|
+
|
|
159
|
+
Providing dehumidifier settings is optional and the whole section or individual options may be ommitted and default values (noted below) will be used. Within the *devices.config* object the following dehumidifier specific options.
|
|
160
|
+
|
|
161
|
+
```json
|
|
162
|
+
"A1_options": {
|
|
163
|
+
"minHumidity": 35,
|
|
164
|
+
"maxHumidity": 85,
|
|
165
|
+
"humidityStep": 5
|
|
166
|
+
}
|
|
167
|
+
```
|
|
168
|
+
|
|
169
|
+
* **Dehumidifier options**
|
|
170
|
+
* **minHumidity** *(optional)*: The minimum relative humidity that the unit can be set for. Default is 35%
|
|
171
|
+
* **maxHumidity** *(optional)*: The maximum relative humidity that the unit can be set for. Default is 85%
|
|
172
|
+
* **humidityStep** *(optional)*: Increment in which the relative himidity setting can be changed, may be set to either 5% or 10%. The default is 5%.
|
|
173
|
+
|
|
174
|
+
### Unsupported Devices
|
|
175
|
+
|
|
176
|
+
If you have a device not supported by the plugin then useful information will be logged as warnings. If you are interested in developing support for a device please contact the authors by opening an [issue](https://github.com/kovapatrik/homebridge-midea-platform/issues).
|
|
177
|
+
|
|
178
|
+
## Technical Notes
|
|
179
|
+
|
|
180
|
+
### Network Resiliency
|
|
181
|
+
|
|
182
|
+
Various strategies are employed in an attempt to handle an unstable network. If a failure occurs at any point while accessing the network or Midea devices then the plugin will attempt to reconnect. During testing we have observed that if a Midea device is isolated from the public internet, and therefore unable to connect to Midea cloud servers, it will close the internal LAN connection to this plugin after a few minutes. The plugin is able to recover and reopen this connection. See *logging* setion below.
|
|
183
|
+
|
|
184
|
+
### Logging
|
|
185
|
+
|
|
186
|
+
Device status changes, for example temperature or humidity changes are logged into the Homebridge log as are any warnings or errors. This includes errors that the plugin can recover from. If your log is filling up with recoverable errors you can suppress these by setting *logRecoverableErrors* to false. You can turn on debug log by running Homebridge with debug enabled, in the Homebridge UI you can set this in Homebridge Settings.
|
|
187
|
+
|
|
188
|
+
By default the plugin does not debug-log all network traffic. If you are developing support for a new device it may be helpful to turn this on by setting *verbose* to true.
|
|
189
|
+
|
|
190
|
+
The custom UI settings window performs device discovery on your network. To enable debug log for this process you must enable *uiDebug* in the settings. Server side debug will log to the Homebridge log, client side debug will log to the browser javascript console.
|
|
191
|
+
|
|
192
|
+
## License
|
|
193
|
+
|
|
194
|
+
Copyright (c) 2023 [Kovalovszky Patrik](https://github.com/kovapatrik),
|
|
195
|
+
Copyright (c) 2023 [David A. Kerr](https://github.com/dkerr64)
|
|
196
|
+
|
|
197
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this program except in compliance with the License. You may obtain a copy of the License at [http://www.apache.org/licenses/LICENSE-2.0](http://www.apache.org/licenses/LICENSE-2.0)
|
|
198
|
+
|
|
199
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
|
|
200
|
+
|
|
201
|
+
### Trademarks
|
|
202
|
+
|
|
203
|
+
Apple and HomeKit are registered trademarks of Apple Inc.
|
|
204
|
+
|
|
205
|
+
Midea is a trademark of Midea Group Co., Ltd.
|
package/config.schema.json
CHANGED
|
@@ -1,120 +1,160 @@
|
|
|
1
1
|
{
|
|
2
|
-
"pluginAlias": "midea",
|
|
2
|
+
"pluginAlias": "midea-platform",
|
|
3
3
|
"pluginType": "platform",
|
|
4
|
+
"customUi": true,
|
|
5
|
+
"headerDisplay": "This plugin is currently experimental and under development. Please report [bugs](https://github.com/kovapatrik/homebridge-midea-platform/issues)",
|
|
6
|
+
"footerDisplay": "For help please see the [homepage](https://github.com/kovapatrik/homebridge-midea-platform)",
|
|
4
7
|
"singular": true,
|
|
5
8
|
"schema": {
|
|
6
9
|
"type": "object",
|
|
7
10
|
"properties": {
|
|
8
|
-
"user": {
|
|
9
|
-
"title": "Midea Account Email",
|
|
10
|
-
"type": "string",
|
|
11
|
-
"required": true
|
|
12
|
-
},
|
|
13
|
-
"password": {
|
|
14
|
-
"title": "Midea Account Password",
|
|
15
|
-
"type": "string",
|
|
16
|
-
"required": true
|
|
17
|
-
},
|
|
18
|
-
"registeredApp": {
|
|
19
|
-
"title": "Registered App",
|
|
20
|
-
"type": "string",
|
|
21
|
-
"description": "Select the app where your devices are registered in.",
|
|
22
|
-
"enum": ["Midea SmartHome (MSmartHome)", "NetHome Plus", "Meiju"],
|
|
23
|
-
"default": "Midea SmartHome (MSmartHome)",
|
|
24
|
-
"required": true
|
|
25
|
-
},
|
|
26
11
|
"refreshInterval": {
|
|
27
12
|
"title": "Interval, in seconds, to query Midea devices for state",
|
|
28
13
|
"type": "number",
|
|
29
|
-
"required": false,
|
|
30
|
-
"default": 30,
|
|
31
14
|
"minimum": 0,
|
|
32
15
|
"maximum": 86400,
|
|
33
|
-
"description": "
|
|
16
|
+
"description": "Frequency that the plugin will query devices for their current state (temperature, humidity, etc.). Some Midea devices update the plugin automatically on any change, others require that the device is queried. The default is 30 seconds, the maximum is 86400 (24 hours). Setting value to 0 (zero) disables polling and updates will only be noted if devices sends it automatically."
|
|
34
17
|
},
|
|
35
18
|
"heartbeatInterval": {
|
|
36
19
|
"title": "Interval, in seconds, to send keep-alive message to Midea devices",
|
|
37
20
|
"type": "number",
|
|
38
|
-
"required": false,
|
|
39
|
-
"default": 10,
|
|
40
21
|
"minimum": 10,
|
|
41
22
|
"maximum": 120,
|
|
42
|
-
"description": "
|
|
43
|
-
},
|
|
44
|
-
"forceLogin": {
|
|
45
|
-
"title": "Login to Midea Cloud every restart",
|
|
46
|
-
"type": "boolean",
|
|
47
|
-
"required": false,
|
|
48
|
-
"default": false,
|
|
49
|
-
"description": "Force the plugin to login and retrieve new device token/key pair every time the plugin starts. By default login and token/key retrieval occurs only if a new Midea device is discovered on the network."
|
|
23
|
+
"description": "Frequency that the plugin sends a message to Midea devices to keep the network socket open. The default and minimum is 10 seconds, you can increase this up to a maximum of 120 (2 minutes). If you see socket closed messages in the log reduce this value."
|
|
50
24
|
},
|
|
51
25
|
"verbose": {
|
|
52
26
|
"title": "Enable verbose logging",
|
|
53
27
|
"type": "boolean",
|
|
54
|
-
"
|
|
55
|
-
|
|
56
|
-
|
|
28
|
+
"description": "Enables additional debug logging that may help a developer identify problems when working on Midea device support. Homebridge must be running with debug enabled for any debug logging to be visible."
|
|
29
|
+
},
|
|
30
|
+
"logRecoverableErrors": {
|
|
31
|
+
"title": "Log recoverable errors",
|
|
32
|
+
"type": "boolean",
|
|
33
|
+
"description": "If you see frequent warning or error messages in the log that the plugin recovers from you can suppress these messages by disabling this setting."
|
|
34
|
+
},
|
|
35
|
+
"uiDebug": {
|
|
36
|
+
"title": "Enable debug for custom UI",
|
|
37
|
+
"type": "boolean",
|
|
38
|
+
"description": "Debug data for the custom UI device discovery process will be logged to the Homebridge log and Javascript console."
|
|
57
39
|
},
|
|
58
40
|
"devices": {
|
|
59
|
-
"title": "Devices",
|
|
60
41
|
"type": "array",
|
|
61
42
|
"items": {
|
|
62
43
|
"type": "object",
|
|
63
44
|
"properties": {
|
|
64
|
-
"
|
|
65
|
-
"title": "Device
|
|
66
|
-
"description": "The IP address of the device you want to add.",
|
|
45
|
+
"type": {
|
|
46
|
+
"title": "Device Type",
|
|
67
47
|
"type": "string",
|
|
68
|
-
"required": true
|
|
48
|
+
"required": true,
|
|
49
|
+
"enum": [
|
|
50
|
+
"Air Conditioner",
|
|
51
|
+
"Dehumidifier"
|
|
52
|
+
],
|
|
53
|
+
"description": "Select the type of device you are adding."
|
|
69
54
|
},
|
|
70
55
|
"name": {
|
|
71
56
|
"title": "Device Name",
|
|
72
|
-
"description": "This
|
|
57
|
+
"description": "This replaces the name provided by the Midea device.",
|
|
73
58
|
"type": "string"
|
|
74
59
|
},
|
|
75
|
-
"
|
|
76
|
-
"title": "Device
|
|
77
|
-
"
|
|
78
|
-
"
|
|
79
|
-
"
|
|
80
|
-
"required": true
|
|
60
|
+
"id": {
|
|
61
|
+
"title": "Device Identifier",
|
|
62
|
+
"type": "number",
|
|
63
|
+
"required": true,
|
|
64
|
+
"description": "The ID of the device. This shouldn't be changed if it was added by discovery."
|
|
81
65
|
},
|
|
82
|
-
"
|
|
83
|
-
"
|
|
84
|
-
"
|
|
85
|
-
"
|
|
86
|
-
"
|
|
66
|
+
"advanced_options": {
|
|
67
|
+
"type": "object",
|
|
68
|
+
"title": "Advanced Settings",
|
|
69
|
+
"expandable": true,
|
|
70
|
+
"expanded": false,
|
|
71
|
+
"properties": {
|
|
72
|
+
"token": {
|
|
73
|
+
"title": "Device login token",
|
|
74
|
+
"type": "string",
|
|
75
|
+
"required": true,
|
|
76
|
+
"description": "Token of the device obtained from cloud. This shouldn't be changed if it was added by discovery."
|
|
77
|
+
},
|
|
78
|
+
"key": {
|
|
79
|
+
"title": "Device login key",
|
|
80
|
+
"type": "string",
|
|
81
|
+
"required": true,
|
|
82
|
+
"description": "Key of the device obtained from cloud. This shouldn't be changed if it was added by discovery."
|
|
83
|
+
},
|
|
84
|
+
"verbose": {
|
|
85
|
+
"title": "Enable verbose logging",
|
|
86
|
+
"type": "boolean",
|
|
87
|
+
"description": "Override global setting for this one device."
|
|
88
|
+
},
|
|
89
|
+
"logRecoverableErrors": {
|
|
90
|
+
"title": "Log recoverable errors",
|
|
91
|
+
"type": "boolean",
|
|
92
|
+
"description": "Override global setting for this one device."
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
},
|
|
96
|
+
"A1_options": {
|
|
97
|
+
"title": "Dehumidifier Options",
|
|
98
|
+
"type": "object",
|
|
99
|
+
"condition": {
|
|
100
|
+
"functionBody": "return model.devices && model.devices[arrayIndices].type === 'Dehumidifier';"
|
|
101
|
+
},
|
|
102
|
+
"properties": {
|
|
103
|
+
"minHumidity": {
|
|
104
|
+
"title": "Minimum Relative Humidity",
|
|
105
|
+
"type": "number",
|
|
106
|
+
"minimum": 0,
|
|
107
|
+
"maximum": 100
|
|
108
|
+
},
|
|
109
|
+
"maxHumidity": {
|
|
110
|
+
"title": "Maximum Relative Humidity",
|
|
111
|
+
"type": "number",
|
|
112
|
+
"minimum": 0,
|
|
113
|
+
"maximum": 100
|
|
114
|
+
},
|
|
115
|
+
"humidityStep": {
|
|
116
|
+
"title": "Humidity Step",
|
|
117
|
+
"type": "number",
|
|
118
|
+
"enum": [
|
|
119
|
+
5,
|
|
120
|
+
10
|
|
121
|
+
]
|
|
122
|
+
}
|
|
123
|
+
}
|
|
87
124
|
},
|
|
88
125
|
"AC_options": {
|
|
89
|
-
"title": "Options",
|
|
126
|
+
"title": "Air Conditioner Options",
|
|
90
127
|
"type": "object",
|
|
91
128
|
"condition": {
|
|
92
|
-
"functionBody": "return model.devices[arrayIndices].
|
|
129
|
+
"functionBody": "return model.devices && model.devices[arrayIndices].type === 'Air Conditioner';"
|
|
93
130
|
},
|
|
94
131
|
"properties": {
|
|
95
132
|
"swingMode": {
|
|
96
133
|
"title": "Swing Mode",
|
|
97
134
|
"description": "Set swing mode of the unit. If you AC does not support this feature then leave it on None.",
|
|
98
135
|
"type": "string",
|
|
99
|
-
"
|
|
136
|
+
"required": true,
|
|
137
|
+
"enum": [
|
|
138
|
+
"None",
|
|
139
|
+
"Vertical",
|
|
140
|
+
"Horizontal",
|
|
141
|
+
"Both"
|
|
142
|
+
]
|
|
100
143
|
},
|
|
101
144
|
"outDoorTemp": {
|
|
102
145
|
"title": "Outdoor Temperature",
|
|
103
146
|
"description": "Toggles if the outdoor temperature is created with the accessory.",
|
|
104
|
-
"type": "boolean"
|
|
105
|
-
"default": false
|
|
147
|
+
"type": "boolean"
|
|
106
148
|
},
|
|
107
149
|
"audioFeedback": {
|
|
108
150
|
"title": "Audio Feedback",
|
|
109
151
|
"description": "Toggles if the unit beeps when a command is sent.",
|
|
110
|
-
"type": "boolean"
|
|
111
|
-
"default": false
|
|
152
|
+
"type": "boolean"
|
|
112
153
|
},
|
|
113
154
|
"ecoSwitch": {
|
|
114
155
|
"title": "Eco Mode Switch",
|
|
115
156
|
"description": "Toggles if the ECO mode switch is created with the accessory.",
|
|
116
|
-
"type": "boolean"
|
|
117
|
-
"default": true
|
|
157
|
+
"type": "boolean"
|
|
118
158
|
},
|
|
119
159
|
"switchDisplay": {
|
|
120
160
|
"type": "object",
|
|
@@ -122,44 +162,40 @@
|
|
|
122
162
|
"flag": {
|
|
123
163
|
"title": "Switch Display",
|
|
124
164
|
"description": "Toggles if a switch, which can turn the display on or off will be created or not.",
|
|
125
|
-
"type": "boolean"
|
|
126
|
-
"default": true
|
|
165
|
+
"type": "boolean"
|
|
127
166
|
},
|
|
128
167
|
"command": {
|
|
129
168
|
"title": "Switch Display Alternate Command",
|
|
130
169
|
"description": "Use this if the switch display command does not work. If it doesn't work either way then you unit does not support this feature.",
|
|
131
|
-
"type": "boolean"
|
|
132
|
-
"default": false
|
|
170
|
+
"type": "boolean"
|
|
133
171
|
}
|
|
134
172
|
}
|
|
135
173
|
},
|
|
136
174
|
"minTemp": {
|
|
137
175
|
"title": "Minimum Temperature",
|
|
138
|
-
"type": "number"
|
|
139
|
-
"default": 16
|
|
176
|
+
"type": "number"
|
|
140
177
|
},
|
|
141
178
|
"maxTemp": {
|
|
142
179
|
"title": "Maximum Temperature",
|
|
143
|
-
"type": "number"
|
|
144
|
-
"default": 30
|
|
180
|
+
"type": "number"
|
|
145
181
|
},
|
|
146
182
|
"tempStep": {
|
|
147
183
|
"title": "Temperature Step",
|
|
148
184
|
"type": "number",
|
|
149
|
-
"
|
|
150
|
-
|
|
185
|
+
"enum": [
|
|
186
|
+
0.5,
|
|
187
|
+
1
|
|
188
|
+
]
|
|
151
189
|
},
|
|
152
|
-
"
|
|
190
|
+
"fahrenheit": {
|
|
153
191
|
"title": "Fahrenheit",
|
|
154
192
|
"description": "Toggles if the temperature on the unit is displayed in Fahrenheit or Celsius.",
|
|
155
|
-
"type": "boolean"
|
|
156
|
-
"default": false
|
|
193
|
+
"type": "boolean"
|
|
157
194
|
},
|
|
158
195
|
"fanOnlyMode": {
|
|
159
196
|
"title": "Fan Only Mode",
|
|
160
197
|
"description": "Toggles if the fan only mode is created with the accessory.",
|
|
161
|
-
"type": "boolean"
|
|
162
|
-
"default": false
|
|
198
|
+
"type": "boolean"
|
|
163
199
|
}
|
|
164
200
|
}
|
|
165
201
|
}
|
|
@@ -170,65 +206,77 @@
|
|
|
170
206
|
},
|
|
171
207
|
"layout": [
|
|
172
208
|
{
|
|
173
|
-
"key": "user",
|
|
174
|
-
"type": "string"
|
|
175
|
-
},
|
|
176
|
-
{
|
|
177
|
-
"key": "password",
|
|
178
|
-
"type": "string"
|
|
179
|
-
},
|
|
180
|
-
{
|
|
181
|
-
"key": "registeredApp",
|
|
182
|
-
"type": "string"
|
|
183
|
-
},
|
|
184
|
-
{
|
|
185
|
-
"key": "refreshInterval",
|
|
186
|
-
"type": "number"
|
|
187
|
-
},
|
|
188
|
-
{
|
|
189
|
-
"key": "heartbeatInterval",
|
|
190
|
-
"type": "number"
|
|
191
|
-
},
|
|
192
|
-
{
|
|
193
|
-
"key": "forceLogin",
|
|
194
|
-
"type": "boolean"
|
|
195
|
-
},
|
|
196
|
-
{
|
|
197
|
-
"key": "verbose",
|
|
198
|
-
"type": "boolean"
|
|
199
|
-
},
|
|
200
|
-
{
|
|
201
|
-
"key": "devices",
|
|
202
|
-
"type": "array",
|
|
203
|
-
"orderable": true,
|
|
204
|
-
"buttonText": "Add Device",
|
|
205
209
|
"items": [
|
|
206
|
-
"devices[].ip",
|
|
207
|
-
"devices[].name",
|
|
208
|
-
"devices[].deviceType",
|
|
209
|
-
"devices[].singleAccessory",
|
|
210
210
|
{
|
|
211
|
-
"
|
|
211
|
+
"ref": "optional",
|
|
212
|
+
"type": "fieldset",
|
|
212
213
|
"expandable": true,
|
|
213
214
|
"expanded": false,
|
|
214
|
-
"title": "
|
|
215
|
+
"title": "Optional Settings",
|
|
216
|
+
"items": [
|
|
217
|
+
"refreshInterval",
|
|
218
|
+
"heartbeatInterval",
|
|
219
|
+
"verbose",
|
|
220
|
+
"logRecoverableErrors",
|
|
221
|
+
"uiDebug"
|
|
222
|
+
]
|
|
223
|
+
},
|
|
224
|
+
{
|
|
225
|
+
"key": "devices",
|
|
226
|
+
"type": "tabarray",
|
|
227
|
+
"title": "{{ value.name || 'new device' }}",
|
|
215
228
|
"items": [
|
|
216
|
-
"devices[].
|
|
217
|
-
"devices[].
|
|
218
|
-
"devices[].
|
|
219
|
-
|
|
229
|
+
"devices[].type",
|
|
230
|
+
"devices[].id",
|
|
231
|
+
"devices[].name",
|
|
232
|
+
{
|
|
233
|
+
"key": "devices[].advanced_options",
|
|
234
|
+
"title": "Advanced Settings",
|
|
235
|
+
"expandable": true,
|
|
236
|
+
"expanded": false,
|
|
237
|
+
"items": [
|
|
238
|
+
"devices[].advanced_options.token",
|
|
239
|
+
"devices[].advanced_options.key",
|
|
240
|
+
"devices[].advanced_options.verbose",
|
|
241
|
+
"devices[].advanced_options.logRecoverableErrors"
|
|
242
|
+
]
|
|
243
|
+
},
|
|
220
244
|
{
|
|
221
|
-
"key": "devices[].
|
|
222
|
-
"
|
|
245
|
+
"key": "devices[].A1_options",
|
|
246
|
+
"expandable": true,
|
|
247
|
+
"expanded": false,
|
|
248
|
+
"items": [
|
|
249
|
+
"devices[].A1_options.minHumidity",
|
|
250
|
+
"devices[].A1_options.maxHumidity",
|
|
251
|
+
"devices[].A1_options.humidityStep"
|
|
252
|
+
]
|
|
223
253
|
},
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
254
|
+
{
|
|
255
|
+
"key": "devices[].AC_options",
|
|
256
|
+
"expandable": true,
|
|
257
|
+
"expanded": false,
|
|
258
|
+
"items": [
|
|
259
|
+
"devices[].AC_options.swingMode",
|
|
260
|
+
"devices[].AC_options.outDoorTemp",
|
|
261
|
+
"devices[].AC_options.audioFeedback",
|
|
262
|
+
"devices[].AC_options.ecoSwitch",
|
|
263
|
+
{
|
|
264
|
+
"key": "devices[].AC_options.switchDisplay",
|
|
265
|
+
"items": [
|
|
266
|
+
"devices[].AC_options.switchDisplay.flag",
|
|
267
|
+
"devices[].AC_options.switchDisplay.command"
|
|
268
|
+
]
|
|
269
|
+
},
|
|
270
|
+
"devices[].AC_options.minTemp",
|
|
271
|
+
"devices[].AC_options.maxTemp",
|
|
272
|
+
"devices[].AC_options.tempStep",
|
|
273
|
+
"devices[].AC_options.fahrenheit",
|
|
274
|
+
"devices[].AC_options.fanOnlyMode"
|
|
275
|
+
]
|
|
276
|
+
}
|
|
229
277
|
]
|
|
230
278
|
}
|
|
231
279
|
]
|
|
232
280
|
}
|
|
233
281
|
]
|
|
234
|
-
}
|
|
282
|
+
}
|
|
@@ -53,6 +53,5 @@ export default class AirConditionerAccessory extends BaseAccessory<MideaACDevice
|
|
|
53
53
|
setDisplayActive(value: CharacteristicValue): Promise<void>;
|
|
54
54
|
getEcoMode(): CharacteristicValue;
|
|
55
55
|
setEcoMode(value: CharacteristicValue): Promise<void>;
|
|
56
|
-
getOrCreateSubAccessory(type: string): MideaAccessory;
|
|
57
56
|
}
|
|
58
57
|
//# sourceMappingURL=AirConditionerAccessory.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AirConditionerAccessory.d.ts","sourceRoot":"","sources":["../../src/accessory/AirConditionerAccessory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,mBAAmB,EAAW,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAa,MAAM,kBAAkB,CAAC;AAC3D,OAAO,aAA+B,MAAM,6BAA6B,CAAC;AAG1E,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,aAAa,CAAC,aAAa,CAAC;IAe7E,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,aAAa;IACxC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,YAAY;IAf5C,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,yBAAyB,CAAC,CAAU;IAC5C,OAAO,CAAC,cAAc,CAAC,CAAU;IACjC,OAAO,CAAC,UAAU,CAAC,CAAU;IAC7B,OAAO,CAAC,cAAc,CAAC,CAAU;IACjC,OAAO,CAAC,WAAW,CAAmB;IAEtC;;;OAGG;gBAED,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,cAAc,EACN,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,YAAY;
|
|
1
|
+
{"version":3,"file":"AirConditionerAccessory.d.ts","sourceRoot":"","sources":["../../src/accessory/AirConditionerAccessory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,mBAAmB,EAAW,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAC5D,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,EAAE,YAAY,EAAa,MAAM,kBAAkB,CAAC;AAC3D,OAAO,aAA+B,MAAM,6BAA6B,CAAC;AAG1E,MAAM,CAAC,OAAO,OAAO,uBAAwB,SAAQ,aAAa,CAAC,aAAa,CAAC;IAe7E,SAAS,CAAC,QAAQ,CAAC,MAAM,EAAE,aAAa;IACxC,SAAS,CAAC,QAAQ,CAAC,SAAS,EAAE,YAAY;IAf5C,OAAO,CAAC,OAAO,CAAU;IACzB,OAAO,CAAC,yBAAyB,CAAC,CAAU;IAC5C,OAAO,CAAC,cAAc,CAAC,CAAU;IACjC,OAAO,CAAC,UAAU,CAAC,CAAU;IAC7B,OAAO,CAAC,cAAc,CAAC,CAAU;IACjC,OAAO,CAAC,WAAW,CAAmB;IAEtC;;;OAGG;gBAED,QAAQ,EAAE,aAAa,EACvB,SAAS,EAAE,cAAc,EACN,MAAM,EAAE,aAAa,EACrB,SAAS,EAAE,YAAY;IA2H5C;;;OAGG;YACW,qBAAqB;IAgDnC;;;OAGG;IACG,SAAS,IAAI,OAAO,CAAC,mBAAmB,CAAC;IAIzC,SAAS,CAAC,KAAK,EAAE,mBAAmB;IAM1C,2BAA2B,IAAI,mBAAmB;IAsBlD,0BAA0B,IAAI,mBAAmB;IAU3C,0BAA0B,CAAC,KAAK,EAAE,mBAAmB;IAc3D,qBAAqB,IAAI,mBAAmB;IAI5C,oBAAoB,IAAI,mBAAmB;IAOrC,oBAAoB,CAAC,KAAK,EAAE,mBAAmB;IAKrD,YAAY,IAAI,mBAAmB;IAM7B,YAAY,CAAC,KAAK,EAAE,mBAAmB;IAc7C,gBAAgB,IAAI,mBAAmB;IAIjC,gBAAgB,CAAC,KAAK,EAAE,mBAAmB;IAQjD,qBAAqB,IAAI,mBAAmB;IAI5C,gBAAgB,IAAI,mBAAmB;IAIjC,gBAAgB,CAAC,KAAK,EAAE,mBAAmB;IAMjD,UAAU,IAAI,mBAAmB;IAI3B,UAAU,CAAC,KAAK,EAAE,mBAAmB;CAG5C"}
|