I wrote a small Python bridge (see attachment) that connects Midea/Comfee/Electra split ACs via msmart-ng (only local LAN supported) to Domoticz using the native domoticz/in + domoticz/out MQTT topics. No plugins, no extra hardware — just a script running as a systemd service.
Features:
- Full bidirectional control: power, mode, fan speed, swing, target temperature
- Reads indoor + outdoor temperature
- Eco, Turbo, iECO, Purifier/ION, Freeze Protection, Rate Select, Self-Clean
- Display (LED) toggle
- Energy monitoring (real-time Watt + kWh counter)
- Configurable polling interval
- Pure JSON config file
Requirements:
msmart-ng (Midea LAN protocol library)
paho-mqtt >= 2.1.0
Domoticz with MQTT broker
How it works:
The bridge polls the AC directly over LAN every N seconds (default 30 s) and publishes state to Domoticz virtual devices. Commands from Domoticz Selector/Switch devices are forwarded to the AC in real time. You first have to setup msmart-ng (https://github.com/mill1000/midea-msmart):
msmart-ng discover <ip of your midea>
Note your midea id, key and token and add them to config.json. Additionally, the domoticz devices need to be created manually (virtual sensors/switches/selectors) - more details in SETUP.md
Tested with msmart-ng 2026.4.1, but should work with any device supported by msmart-ng.
Have fun