homebridge-gree-ac 1.0.2 → 2.0.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.
Files changed (46) hide show
  1. package/CHANGELOG.md +19 -0
  2. package/LICENSE +176 -21
  3. package/README.md +180 -42
  4. package/config.schema.json +277 -0
  5. package/dist/commands.d.ts +121 -0
  6. package/dist/commands.d.ts.map +1 -0
  7. package/dist/commands.js +123 -0
  8. package/dist/commands.js.map +1 -0
  9. package/dist/crypto.d.ts +6 -0
  10. package/dist/crypto.d.ts.map +1 -0
  11. package/dist/crypto.js +19 -0
  12. package/dist/crypto.js.map +1 -0
  13. package/dist/index.d.ts +7 -0
  14. package/dist/index.d.ts.map +1 -0
  15. package/dist/index.js +7 -0
  16. package/dist/index.js.map +1 -0
  17. package/dist/platform.d.ts +35 -0
  18. package/dist/platform.d.ts.map +1 -0
  19. package/dist/platform.js +203 -0
  20. package/dist/platform.js.map +1 -0
  21. package/dist/platformAccessory.d.ts +89 -0
  22. package/dist/platformAccessory.d.ts.map +1 -0
  23. package/dist/platformAccessory.js +867 -0
  24. package/dist/platformAccessory.js.map +1 -0
  25. package/dist/settings.d.ts +51 -0
  26. package/dist/settings.d.ts.map +1 -0
  27. package/dist/settings.js +50 -0
  28. package/dist/settings.js.map +1 -0
  29. package/dist/tsAccessory.d.ts +36 -0
  30. package/dist/tsAccessory.d.ts.map +1 -0
  31. package/dist/tsAccessory.js +65 -0
  32. package/dist/tsAccessory.js.map +1 -0
  33. package/greedevice.jpg +0 -0
  34. package/greemac.jpg +0 -0
  35. package/package.json +51 -23
  36. package/uiconfig.jpg +0 -0
  37. package/.idea/homebridge-gree-ac.iml +0 -12
  38. package/.idea/misc.xml +0 -6
  39. package/.idea/modules.xml +0 -8
  40. package/.idea/vcs.xml +0 -6
  41. package/.idea/workspace.xml +0 -208
  42. package/app/commandEnums.js +0 -135
  43. package/app/deviceFactory.js +0 -306
  44. package/app/encryptionService.js +0 -39
  45. package/example.config.json +0 -28
  46. package/index.js +0 -373
package/CHANGELOG.md ADDED
@@ -0,0 +1,19 @@
1
+ # Changelog
2
+
3
+ ## [2.0.0] - 2023-10-26
4
+
5
+ Homebridge platform plugin. **_homebridge-gee-ac_**
6
+
7
+ **Don't forget to reconfigure the plugin and re-set-up scenes and automations in Home App if upgraded from earlier version!**
8
+
9
+ ### Major changes
10
+
11
+ - Completly rewritten from the base as a platform plugin
12
+ - This is the successor of the original platform plugin _@eibenp/homebridge-gree-airconditioner_ which is now obsolete on that name
13
+
14
+ ## [1.0.x]
15
+
16
+ All 1.0.x versions are now obsolete
17
+
18
+ - Original accessory plugin _homebridge-gee-ac_ maintained by _duculete_
19
+ - Original platform plugin _@eibenp/homebridge-gree-airconditioner_ maintained by _eibenp_
package/LICENSE CHANGED
@@ -1,21 +1,176 @@
1
- MIT License
2
-
3
- Copyright (c) 2018 Alexandru Dragoescu
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
package/README.md CHANGED
@@ -1,42 +1,180 @@
1
- # Control Gree Air Conditioning with homekit
2
-
3
- This plugins is based on Gree HVAC MQTT bridge (https://github.com/arthurkrupa/gree-hvac-mqtt-bridge).
4
-
5
- ## Requirements
6
- - NodeJS (>=8.9.3) with NPM
7
- - An MQTT broker and Gree smart HVAC device on the same network
8
-
9
- You need a mqtt server to read the ambient temperature. You can use an ESP8266 with DHTXX sensor and post temperature value to a topic in a mqtt server. That should be the temperature on the room where the AC is installed.
10
-
11
- For each AC device you need to add an accesory and specify the IP address of the device (and mqtt topic to read the ambient temperature).
12
-
13
- ## Usage Example:
14
- ```
15
- {
16
- "bridge": {
17
- "name": "Homebridge",
18
- "username": "CC:22:3D:E3:CE:30",
19
- "port": 51826,
20
- "pin": "123-45-568"
21
- },
22
- "accessories": [
23
- {
24
- "accessory": "GreeAC",
25
- "host": "192.168.1.X",
26
- "name": "Office AC",
27
- "updateInterval": 10000,
28
- "mqttUrl": "mqtt://127.0.0.1",
29
- "currentTempTopic": "home/office/temperature"
30
- },
31
- {
32
- "accessory": "GreeAC",
33
- "host": "192.168.1.Y",
34
- "name": "Bedroom AC",
35
- "updateInterval": 10000,
36
- "mqttUrl": "mqtt://127.0.0.1",
37
- "currentTempTopic": "home/bedroom/temperature"
38
- }
39
- ]
40
- }
41
- ```
42
-
1
+ [![npm](https://badgen.net/npm/v/homebridge-gree-ac/latest?icon=npm&label)](https://www.npmjs.com/package/homebridge-gree-ac)
2
+ [![npm](https://badgen.net/npm/dt/homebridge-gree-ac?label=downloads)](https://www.npmjs.com/package/homebridge-gree-ac)
3
+ [![Donate](https://badgen.net/badge/donate/paypal/yellow)](https://paypal.me/eibenp)
4
+
5
+ > _*** Breaking changes ***_
6
+ >
7
+ > Please read the [**Upgrade section**](#upgrade) before upgrading from version earlier than **v2.0.0** !
8
+
9
+ # Homebridge GREE Air Conditioner Platform Plugin
10
+
11
+ [Homebridge GREE Air Conditioner Platform Plugin](https://github.com/eibenp/homebridge-gree-airconditioner) is a dynamic platform plugin for [Homebridge](https://github.com/homebridge/homebridge) which allows control of GREE Air Conditioner devices from [Apple's Home app](https://www.apple.com/home-app/). (Make GREE Air Conditioner HomeKit compatible.)
12
+
13
+ You can add all of your GREE Air Conditioner devices to the Home App by specifying the network broadcast address, and Homebridge will find all connected devices. Each device appears in the Home App as a Heater Cooler device. It is also possible to add a separate Termperature Sensor (if temperature sensor is supported by the physical device). This allows to define automations (e.g. turn on) based on current temperature in the room. Be careful, if the device does not support internal temperature sensor but is added as a separate accessory, Home App will display the target temperature not the measured one. Child accessory does not appear in Home App if physical sensor is not available in the AC unit.
14
+
15
+ Quiet / Auto / Powerful mode is supported by the fan speed control. Minimum value turns on Quiet mode. Next value is Auto mode. Maximum value is Powerful mode. All other values between them are exact fan speeds (Low, MediumLow**, Medium, MediumHigh**, High)
16
+
17
+ ** these values are supported only on 5-speed units
18
+
19
+ It is recommended to add all devices to the Homebridge configuration, so that you can control all their parameters. If you don't want to control all of the devices in Home App, then you need to add to the configuration and disable the ones you don't need. Devices are identified by MAC Address (Serial Number). It can be queried using the official [GREE+ mobile app](https://apps.apple.com/us/app/gree/id1167857672). (The app is required to connect the devices to the local WiFi network for the first time.)
20
+
21
+ xFan function is also supported, but it works automatically if enabled in Homebridge configuration. If xFan is enabled for the device, it is automatically turned on when you select a supported operating mode in Home App. If xFan is disabled, the Home App will not modify its actual setting in any case.
22
+
23
+ Temperature display units of the physical device can be controlled using the Home App. (Configuration settings are required to be specified always in Degrees Celsius, independently from the display units.)
24
+
25
+ Vertical swing mode can be turned on/off, but special swing settings can't be controlled using the Home App.
26
+
27
+ This plugin is designed to be as simple and clear as possible and supports primarily the functions of the Home App's Heater Cooler accessory.
28
+
29
+ ## Requirements
30
+
31
+ * Node.js (>= 18.15.0 || >= 20.8.0) with NPM
32
+ * Homebridge (>= 1.6.0)
33
+
34
+ You need to specify the local network broadcast address (192.168.1.255 in many home environments) and it's also recommended to add the device and specify its MAC address (Serial Number) in the configuration file.
35
+
36
+ It is highly recommended to use static IP addresses for connected devices. Using a dynamic IP address may require a restart of the Homebridge service on an address change to reconnect the device. Most routers offer static DHCP leases. (Please look at your router's documentation!)
37
+
38
+ ## Supported devices
39
+
40
+ * GREE Air Conditioners with WiFi support
41
+ * May work with other GREE compatible AC units
42
+
43
+ ## Known limitations
44
+
45
+ This plugin was designed to support the Home App's Heater Cooler functionality using GREE Air Conditioners. Some special features of GREE AC's are not supported natively by Apple and also dismiss support in this plugin.
46
+ * Fan and dry modes are not supported. They may work if set directly on the device until you change operating mode. They can't be turned on using Home App.
47
+ * Lights of the AC unit can't be controlled.
48
+ * Additional device functions (e.g. health mode, sleep, SE) are not supported.
49
+ * Horizontal swing control is not supported, it remains the same as set directly on the device.
50
+ * GREE AC units do not support temperature ranges in auto mode, so temperature ranges have zero length in Home App.
51
+ * GREE AC units are not able to display decimals of temperature values (if set to half a degree, e.g. 21.5 °C, then unit display may not be in sync with temperature set in Home App).
52
+ * Not all half a degree values are supported in °C mode (GREE AC units are designed to support only integer °C and °F values). Unsupported values are automatically updated to the nearest supported values.
53
+ * There is no way to get current heating-cooling state from the AC unit in auto mode, so displayed state in the Home App is based on temperature measurement, but internal sensor is not precise enough to always display the correct state.
54
+
55
+ ## Installation instructions
56
+
57
+ It is recommended to install the plugin using the graphical user interface of Homebridge ([Homebridge Config UI X](https://www.npmjs.com/package/homebridge-config-ui-x)). You can find the plugin if you search on the Plugins page for GREE Air Conditioner ('GREE AC' or 'homebridge-gree-ac' if you'd like an exact match). It is recommended to configure the plugin using the same GUI controls.
58
+
59
+ Command line install:
60
+ ```
61
+ npm install homebridge-gree-ac -g
62
+ ```
63
+ If successfully installed and configured, your devices will appear on the Homebridge GUI Accessories page and also in Home App (if Homebridge is already connected to the Home App). (If the additional temperature sensor is enabled, then 2 items will be displayed for supported devices (Heater Cooler and Temperature Sensor).)
64
+
65
+ ## Upgrade
66
+
67
+ There is no clean way to update the plugin to release v2.0.0 or later if you are using an older version (v1.x.x). You need to remove and reinstall the plugin during upgrade.
68
+
69
+ ### Upgrade steps
70
+
71
+ 1. Check out your current settings in Homebridge and also in Homekit (including scenes and automation rules)
72
+ 2. Uninstall the old version (this will remove all settings also)
73
+ 3. Install the new version
74
+ 4. Configure plugin in Homebridge
75
+ 5. Assign accessories to rooms and recreate scenes and automations in Homekit
76
+
77
+ ## Example configuration
78
+ _Only the relevant part of the configuration file is displayed:_
79
+ ```
80
+ "platforms": [
81
+ {
82
+ "name": "Gree Air Conditioner",
83
+ "platform": "GREEAirConditioner",
84
+ "port": 7002,
85
+ "scanAddress": "192.168.1.255",
86
+ "scanCount": 10,
87
+ "scanTimeout": 5,
88
+ "devices": [
89
+ {
90
+ "mac": "502cc6000000",
91
+ "name": "Living room AC",
92
+ "model": "Pulse 3.2kW GWH12AGB-K6DNA1A/I",
93
+ "speedSteps": 5,
94
+ "statusUpdateInterval": 10,
95
+ "sensorOffset": 40,
96
+ "minimumTargetTemperature": 16,
97
+ "maximumTargetTemperature": 30,
98
+ "xFanEnabled": true,
99
+ "temperatureSensor": "disabled",
100
+ "disabled": false
101
+ }
102
+ ]
103
+ }
104
+ ]
105
+ ```
106
+ * name - Unique name of the platform plugin
107
+ * platform - **GREEAirConditioner** (fixed name, it identifies the plugin)
108
+ * port - free UDP port (homebridge will use this port for network communication; it is recommended to select a port which is not used and the next 256 ports are also available because devices will be bound to a separate port based on the last part of the device's IPv4 address and the port specified in the configuration)
109
+ * scanAddress - local network broadcast address (some network knowledge is required to determine this address; in many cases its default value is 192.168.1.255)
110
+ * scanCount - number of retries for locating devices on the network (minimum 3 retries have to be specified)
111
+ * scanTimeout - time period in seconds between device query retries
112
+ * devices - devices should be listed in this block (specify as many devices as you have on your network)
113
+ * mac - MAC address (Serial Number) of the device
114
+ * name - custom name of the device (optional)
115
+ * model - model name, information only (optional)
116
+ * speedSteps - fan speed steps of the unit (valid values are: 3 and 5)
117
+ * statusUpdateInterval - device status will be refreshed based on this interval (in seconds)
118
+ * sensorOffset - device temperature sensor offset value for current temperature calibration (default is 40 °C, must be specified in Degrees Celsius)
119
+ * minimumTargetTemperature - minimum target temperature accepted by the device (default is 16 °C, must be specified in Degrees Celsius, valid values: 16-30)
120
+ * maximumTargetTemperature - maximum target temperature accepted by the device (default is 30 °C, must be specified in Degrees Celsius, valid values: 16-30)
121
+ * xFanEnabled - automatically turn on xFan functionality in supported device modes (xFan actual setting is not modified by the Home App if disabled)
122
+ * temperatureSensor - control additional temperature sensor accessory in Home App (disabled = do not add to Home App / child = add as a child accessory / separate = add as a separate (independent) accessory)
123
+ * disabled - set to true if you do not want to control this device in the Home App (old devices can be removed using this parameter)
124
+
125
+ ![Homebridge UI](./uiconfig.jpg)
126
+
127
+ ## Tips
128
+
129
+ ### MAC Address in GREE+ mobile app
130
+
131
+ Open selected device and in the upper right corner select menu symbol:
132
+
133
+ ![AC device](./greedevice.jpg)![MAC Address](./greemac.jpg)
134
+
135
+ ### Network broadcast address
136
+
137
+ All devices on the local network use the same broadcast address. The broadcast address can be calculated from the IP address and the subnet mask of any device which is connected to the LAN. (E.g. your router or computer) You can find several online calculators which help to determine the broadcast address.
138
+
139
+ On Unix-like systems you can query the broadcast address using the following command:
140
+ ```bash
141
+ ifconfig | grep broadcast
142
+ # result
143
+ # inet 192.168.1.10 netmask 0xffffff00 broadcast 192.168.1.255
144
+ ```
145
+ On Windows there is no easy way to read the broadcast address. You can query the IP address and the subnet mask using the following command:
146
+ ```cmd
147
+ ipconfig
148
+ # result
149
+ # IPv4 Address. . . . . . . . . . . : 192.168.1.10
150
+ # Subnet Mask . . . . . . . . . . . : 255.255.255.0
151
+ # Default Gateway . . . . . . . . . : 192.168.1.254
152
+ ```
153
+
154
+ ### Device settings
155
+
156
+ Some settings are initialized by Home App only once (when enabling the device). They can only be changed by disabling and re-enabling the device. The following settings are affected:
157
+
158
+ * name
159
+ * model
160
+ * speedSteps
161
+ * minimumTargetTemperature
162
+ * maximumTargetTemperature
163
+
164
+ ### Temperature display units
165
+
166
+ Home App allows to set the device temperature display units but it is independent from the temperature units shown in Home App. Home App always displays temperature values as specified by iOS/MacOS (can be changed in Preferences / Regional settings section). Display unit conversion is made by the Home App device.
167
+
168
+ ### Temperature measurement
169
+
170
+ Temperature measurement is not perfect if using the built-in sensor. It is highly affected by current operation and can differ from actual temperature of other places in the room. It is recommended to use a sperarate temperature sensor and place it not too close to the AC unit.
171
+
172
+ ## Refs & Credits
173
+
174
+ Special thanks to [tomikaa87](https://github.com/tomikaa87) and [kongkx](https://github.com/kongkx) for GREE network protocol information and code samples.
175
+
176
+ - [homebridge-gree-air-conditioner](https://github.com/kongkx/homebridge-gree-air-conditioner)
177
+ - [gree-remote](https://github.com/tomikaa87/gree-remote)
178
+ - [homebridge-gree-heatercooler](https://github.com/ddenisyuk/homebridge-gree-heatercooler)
179
+ - [Homebridge API](https://developers.homebridge.io/)
180
+ - [Homebridge Platform Plugin Template](https://github.com/homebridge/homebridge-plugin-template)