Repository navigation
Configuration
Everything lives in config.yml in the working directory (or the file given with --config). Missing keys are added with their defaults on every start, so the file is always complete.
mqtt:
ip: 127.0.0.1
port: 1883
username: ''
password: ''
clientId: midea2mqtt
baseTopic: midea2mqtt
retain: true
publishAttributes: false
devices:
livingroom:
enabled: true
host: 192.168.1.50
port: 6444
id: '153931629647397'
protocol: 3
token: 4b2f...
key: 9a1c...
beep: false
pollInterval: 30
powerAnalysisMethod: 1Changes take effect after a restart.
| Key | Default | |
|---|---|---|
ip |
127.0.0.1 |
broker address |
port |
1883 |
broker port |
username |
empty | leave empty for anonymous access |
password |
empty | |
clientId |
midea2mqtt |
must be unique on the broker; change it if you run several bridges |
baseTopic |
midea2mqtt |
prefix of all topics, see MQTT topics |
retain |
true |
publish state, availability and capabilities as retained messages, so new subscribers get the current values immediately |
publishAttributes |
false |
additionally publish every state value on its own topic .../state/<key>
|
The connection uses QoS 1, a keep-alive of 30 seconds, and reconnects automatically.
One entry per unit. The entry's name is the device name used in the topics (midea2mqtt/<name>/...). It must not contain /, + or #.
| Key | Default | |
|---|---|---|
enabled |
true |
false keeps the entry but ignores the unit |
host |
required | IP address or host name |
port |
6444 |
|
id |
required | device id from discovery, with or without quotes |
protocol |
3 |
2 or 3, as reported by discovery |
token, key
|
empty | hex strings, required for protocol 3 |
beep |
false |
let the unit beep on every command |
pollInterval |
30 |
seconds between full refreshes, at least 5. See How it behaves |
powerAnalysisMethod |
1 |
how the unit encodes energy values: 1 BCD, 2 binary, 3 mixed (also 12, 101). Try another value if the kWh figures look wrong |
An entry with a problem (missing host, V3 without token, invalid value) is skipped with a warning in the log; the other units still start.
The bridge logs through java.util.logging. To see every frame exchanged with the units, create a logging.properties:
handlers=java.util.logging.ConsoleHandler
java.util.logging.ConsoleHandler.level=FINEST
de.mirranet.midea.level=FINESTand start with:
java -Djava.util.logging.config.file=logging.properties -jar midea2mqtt.jarmidea2mqtt · LGPLv3 · Built on midea-ac · Not affiliated with Midea
Getting started
Using the bridge
More