Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
676d1e5
Midea AC after partial PR review
apella12 Oct 29, 2024
2abb211
Working version of split connection manager
apella12 Nov 6, 2024
51c3cd5
Changes to get separate Connection Manager working
apella12 Nov 10, 2024
1c4ae3e
Apply spotless changes
apella12 Nov 10, 2024
20a6c27
New PR candidate
apella12 Nov 15, 2024
ca8619f
Spotless changes
apella12 Nov 15, 2024
31f23e2
Make retries more robust
apella12 Nov 23, 2024
44f2a8e
Align V2 response with V3 reponse
apella12 Nov 25, 2024
d03fe24
Change to OH5.0 snapshot
apella12 Dec 16, 2024
72bead9
Changing dates was a bad idea
apella12 Dec 16, 2024
0ada337
Revert "Changing dates was a bad idea"
apella12 Jan 3, 2025
dcb1511
Change to new Headers
apella12 Jan 8, 2025
c6750ad
Address Comments partial
apella12 Feb 19, 2025
46a1ca5
Additional edits
apella12 Feb 20, 2025
757a257
Update utilities and connection manager
apella12 Feb 21, 2025
00ce795
Eliminate DTO folder and classes
apella12 Feb 24, 2025
6354dd3
Update pom with spotless
apella12 Feb 24, 2025
fc50345
Change connection log
apella12 Feb 24, 2025
3f2aaf1
Minor tweaks from extended testing
apella12 Mar 21, 2025
23eee74
Add scheduled token and key updates
apella12 Mar 23, 2025
88ff93e
Validated the automatic token key update steps
apella12 Mar 31, 2025
4444cf3
Cleanup unused code in Cloud.java
apella12 Apr 3, 2025
e17c852
Add the capability command
apella12 Apr 8, 2025
0024a0b
Reorganized files
apella12 Apr 9, 2025
69ab6e9
Add default cloud
apella12 Apr 21, 2025
a02f6ce
General Cleanup and documentation
apella12 Apr 28, 2025
4303e3b
Document clarifications
apella12 Apr 29, 2025
e87fe49
spotless missed
apella12 Apr 29, 2025
12ca6da
Add capability follow-up and energy Poll
apella12 May 7, 2025
5e16f7d
Add energy Polling Refresh
apella12 May 8, 2025
e96426b
Improve config descriptions
apella12 May 9, 2025
d1a4eb8
Correct LED command and change energy polling
apella12 May 20, 2025
64b451e
Add target humidity support for Midea AC binding
apella12 Jul 9, 2025
885150a
Add support for maximum humidity and filter status channels
apella12 Jul 14, 2025
48fb70e
Refactor and update Midea AC binding documentation and code
apella12 Jul 15, 2025
dfe2fc0
Minor clean-ups
apella12 Jul 16, 2025
7108254
Update palm to 5.1
apella12 Jul 23, 2025
1e7383a
Add tags to channels
apella12 Jul 24, 2025
7b778af
Add CODEOWNER for mideaac binding
apella12 Aug 24, 2025
2af62c0
Address some of the October review comments
apella12 Nov 1, 2025
d6be125
Review update 2. i18n still WIP
apella12 Nov 2, 2025
592d9b4
Improve configuration validation, error handling andi18n messages
apella12 Nov 4, 2025
4b6d554
Improve AC thing initialization documentation and i18n keys
apella12 Nov 5, 2025
fe1dafc
Refactor initialize
lsiepel Nov 5, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@
/bundles/org.openhab.binding.meteostick/ @cdjackson
/bundles/org.openhab.binding.metofficedatahub/ @dag81
/bundles/org.openhab.binding.mffan/ @mark-brooks-180
/bundles/org.openhab.binding.mideaac/ @apella12
/bundles/org.openhab.binding.miele/ @kgoderis @jlaur
/bundles/org.openhab.binding.mielecloud/ @BjoernLange
/bundles/org.openhab.binding.mihome/ @pboos
Expand Down
5 changes: 5 additions & 0 deletions bom/openhab-addons/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1146,6 +1146,11 @@
<artifactId>org.openhab.binding.mffan</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.mideaac</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.binding.miele</artifactId>
Expand Down
13 changes: 13 additions & 0 deletions bundles/org.openhab.binding.mideaac/NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This content is produced and maintained by the openHAB project.

* Project home: https://www.openhab.org

== Declared Project Licenses

This program and the accompanying materials are made available under the terms
of the Eclipse Public License 2.0 which is available at
https://www.eclipse.org/legal/epl-2.0/.

== Source Code

https://github.com/openhab/openhab-addons
124 changes: 124 additions & 0 deletions bundles/org.openhab.binding.mideaac/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Midea AC Binding

This binding integrates Air Conditioners that use the Midea protocol. Midea is an OEM for many brands.

An AC device is likely supported if it uses one of the following Android apps or it's iOS equivalent.

| Cloud Provider | Comment | Options | Default |
|----------------------------------------------|------------------------------------------|--------------|---------|
| Midea Air (com.midea.aircondition.obm) | Full Support of key and token updates | Midea Air | |
| NetHome Plus (com.midea.aircondition) | Full Support of key and token updates | NetHome Plus | Yes |
| SmartHome/MSmartHome (com.midea.ai.overseas) | Note: Reports that this cloud is offline | MSmartHome | |

Note: The Air Conditioner must already be set-up on your WiFi network with a fixed IP Address to be discovered.

## Supported Things

This binding supports one Thing type `ac`.

## Discovery

Once the Air Conditioner is on your network activating the Inbox scan with this binding will send an IP broadcast message.
Every responding unit gets added to the Inbox. When adding each thing, the required parameters will be populated with either
discovered values or the default settings. For a V.3 device, in the unlikely event the defaults did not get the token and key,
enter your cloud provider, email and password.

## Binding Configuration

No binding configuration is required.

## Thing Configuration

| Parameter | Required ? | Comment | Default | Advanced |
|---------------|-------------|-------------------------------------------------------------------|---------------------------|----------|
| ipAddress | Yes | IP Address of the device. | | |
| ipPort | Yes | IP port of the device | 6444 | Yes |
| deviceId | Yes | ID of the device. Leave 0 to do ID discovery. | 0 | Yes |
| cloud | Yes for V.3 | Your Cloud Provider name (or default). | NetHome Plus | |
| email | No | Email for your cloud account (or default). | nethome+us@mailinator.com | |
| password | No | Password for your cloud account (or default). | password1 | |
| token | Yes for V.3 | Secret Token - Retrieved from cloud | | Yes |
| key | Yes for V.3 | Secret Key - Retrieved from cloud | | Yes |
| pollingTime | Yes | Frequency to Poll AC Status in seconds. Minimum is 30. | 60 seconds | |
| keyTokenUpdate| No | Frequency to update key-token from cloud in hours. Minimum is 24 | 0 hours (disabled) | Yes |
| energyPoll | Yes | Frequency to poll energy data (if supported) | 0 minutes (disabled) | |
| timeout | Yes | Socket connection timeout in seconds. Min. is 2, max. 10. | 4 seconds | Yes |
| promptTone | Yes | "Ding" tone when command is received and executed. | false | |
| version | Yes | Version 3 has token, key and cloud requirements. | 3 | Yes |
| energyDecode | Yes | Binary Coded Decimal (BCD) = true. Big-endian = false. | true | Yes |

## Channels

Following channels are available:
Note: After discovery, the thing properties dropdown on the Thing UI page will show what channels and modes your device supports.

| Channel | Type | Description | Read only | Advanced |
|----------------------|--------------------|--------------------------------------------------------------------------------------------------------|-----------|----------|
| power | Switch | Turn the AC on or off. | | |
| target-temperature | Number:Temperature | Target temperature. | | |
| operational-mode | String | Operational modes: OFF, AUTO, COOL, DRY, HEAT, FAN ONLY | | |
| fan-speed | String | Fan speeds: OFF (turns off), SILENT, LOW, MEDIUM, HIGH, AUTO. Not all modes supported by all units. | | |
| swing-mode | String | Swing mode: OFF, VERTICAL, HORIZONTAL, BOTH. Not all modes supported by all units. | | |
| eco-mode | Switch | Eco mode - Cool only (Temperature is set to 24 C (75 F) and fan on AUTO) | | |
| turbo-mode | Switch | Turbo mode, "Boost" in Midea Air app, long press "+" on IR Remote Controller. COOL and HEAT mode only. | | |
| sleep-function | Switch | Sleep function ("Moon with a star" icon on IR Remote Controller). | | |
| indoor-temperature | Number:Temperature | Indoor temperature measured in the room, where internal unit is installed. | Yes | |
| outdoor-temperature | Number:Temperature | Outdoor temperature by external unit. Some units do not report reading when off. | Yes | |
| temperature-unit | Switch | Sets the LED display on the evaporator to Fahrenheit (true) or Celsius (false). | | Yes |
| on-timer | String | Sets the future time to turn on the AC. | | Yes |
| off-timer | String | Sets the future time to turn off the AC. | | Yes |
| screen-display | Switch | If device supports across LAN, turns off the LED display. | | Yes |
| maximum-humidity | Number | If device supports, allows setting the maximum humidity in DRY mode | | Yes
| humidity | Number | If device supports, the indoor room humidity. | Yes | Yes |
| energy-consumption | Number | If device supports, cumulative Kilowatt-Hours usage | Yes | Yes |
| current-draw | Number | If device supports, instantaneous amperage usage | Yes | Yes |
| power-consumption | Number | If device supports, instantaneous wattage reading | Yes | Yes |
| appliance-error | Switch | If device supports, appliance error notification | Yes | Yes |
| filter-status | Switch | If device supports, notification that filter needs cleaning | Yes | Yes |
| auxiliary-heat | Switch | If device supports, auxiliary heat (On or Off) | Yes | Yes |

## Examples

### `demo.things` Examples

```java
Thing mideaac:ac:mideaac "myAC" @ "Room" [ ipAddress="192.168.1.200", ipPort=6444, deviceId="deviceId", cloud="your cloud (e.g NetHome Plus)", email="yourclouduser@email.com", password="yourcloudpassword", token="token", key ="key", pollingTime = 60, keyTokenUpdate = 0, energyPoll = 0, timeout=4, promptTone="false", version="3", energyDecode="true"]
```

Minimal IP Address Option to use the built-in defaults.

```java
Thing mideaac:ac:mideaac "myAC" @ "myRoom" [ ipAddress="192.168.0.200"]
```

### `demo.items` Examples

```java
Switch power "Power" { channel="mideaac:ac:mideaac:power" }
Number:Temperature target_temperature "Target Temperature [%.1f °F]" { channel="mideaac:ac:mideaac:target-temperature" }
String operational_mode "Operational Mode" { channel="mideaac:ac:mideaac:operational-mode" }
String fan_speed "Fan Speed" { channel="mideaac:ac:mideaac:fan-speed" }
String swing_mode "Swing Mode" { channel="mideaac:ac:mideaac:swing-mode" }
Number:Temperature indoor_temperature "Indoor Temperature [%.1f °F]" { channel="mideaac:ac:mideaac:indoor-temperature" }
Switch eco_mode "Eco Mode" { channel="mideaac:ac:mideaac:eco-mode" }
Switch turbo_mode "Turbo Mode" { channel="mideaac:ac:mideaac:turbo-mode" }
Switch sleep_function "Sleep function" { channel="mideaac:ac:mideaac:sleep-function" }
Switch temperature_unit "Fahrenheit or Celsius" { channel="mideaac:ac:mideaac:temperature-unit" }
```

### `demo.sitemap` Examples

```java
sitemap midea label="Midea AC"{
Frame label="AC Unit" {
Text item=outdoor_temperature label="Outdoor Temperature [%.1f °F]"
Text item=indoor_temperature label="Indoor Temperature [%.1f °F]"
Setpoint item=target_temperature label="Target Temperature [%.1f °F]" minValue=62.0 maxValue=86 step=1.0
Switch item=power label="Midea AC Power"
Switch item=temperature_unit label= "Temp Unit" mappings=[ON="Fahrenheit", OFF="Celsius"]
Selection item=fan_speed label="Midea AC Fan Speed"
Selection item=operational_mode label="Midea AC Mode"
Selection item=swing_mode label="Midea AC Louver Swing Mode"
}
}
```
17 changes: 17 additions & 0 deletions bundles/org.openhab.binding.mideaac/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">

<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.openhab.addons.bundles</groupId>
<artifactId>org.openhab.addons.reactor.bundles</artifactId>
<version>5.1.0-SNAPSHOT</version>
</parent>

<artifactId>org.openhab.binding.mideaac</artifactId>

<name>openHAB Add-ons :: Bundles :: MideaAC Binding</name>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<features name="org.openhab.binding.mideaac-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.4.0">
<repository>mvn:org.openhab.core.features.karaf/org.openhab.core.features.karaf.openhab-core/${ohc.version}/xml/features</repository>

<feature name="openhab-binding-mideaac" description="MideaAC Binding" version="${project.version}">
<feature>openhab-runtime-base</feature>
<bundle start-level="80">mvn:org.openhab.addons.bundles/org.openhab.binding.mideaac/${project.version}</bundle>
</feature>
</features>
Loading