AutomationShield
Arduino library and MATLAB/Simulink API for the AutomationShield Arduino expansion boards for control engineering educa…
A library for controlling Midea home appliances using the UART protocol.
git clone https://github.com/dudanov/MideaUART.gitdudanov/MideaUARTArduino framework library for controlling Midea home appliances using the UART protocol.
Control is possible with a custom dongle. You can make it yourself according to numerous instructions on the Internet, or you can buy a ready-made one in Tindie Shop, thereby supporting me and my work.
A far from complete list of supported brands:
It's simple.
dudanov::midea::ac::AirConditioner.9600 8N1.setup() and loop() methods to the same-named global functions of the project.void control(const Control &control) with optional parameters.#include <Arduino.h>
#include <Appliance/AirConditioner/AirConditioner.h>
using namespace dudanov::midea::ac;
AirConditioner ac;
// Example how can change work mode easily
static inline void switchMode(Mode mode) {
Control control;
control.mode = mode;
ac.control(control);
}
// Example how can change mode and temp in same time
static inline void changeState(Mode mode, float targetTemp) {
Control control;
control.mode = mode;
control.targetTemp = targetTemp;
ac.control(control);
}
// Example how can change power state
static inline void setPowerState(bool state) {
ac.setPowerState(state);
}
// Example how can change mode to AUTO and set target temp to 25C
static inline void changeAuto25() {
Control control;
control.mode = Mode::MODE_AUTO;
control.targetTemp = 25.0f;
ac.control(control);
}
// Here you may get new properties states
void onStateChange() {
ac.getTargetTemp();
ac.getIndoorTemp();
ac.getMode();
ac.getPreset();
ac.getSwingMode();
ac.getFanMode();
}
void setup() {
Serial.begin(9600); // set serial baudrate to 9600 8N1
ac.setStream(&Serial); // set stream serial interface
ac.addOnStateCallback(onStateChange); // add callback
ac.setup();
}
void loop() {
ac.loop();
}
to the following people for their contributions to reverse engineering the UART protocol and source code in the following repositories:
If this project was useful to you, you can buy me a Cup of coffee :)
more like this
Arduino library and MATLAB/Simulink API for the AutomationShield Arduino expansion boards for control engineering educa…
ESPHome configuration for M5Stack's PM2.5 Air Quality Kit with the PMSA003 particulate matter sensor and the SHT20 temp…
Garage Door Relay and Sensor for two garage doors using ESPHome and integrated to Home Assistant
search projects, people, and tags