💬 Heatpump / airconditioner controller
-
-
Too cool - I can make my heatpump beep and stuff from my smartphone - live will surely never be the same again
There is one more trick I would love to teach it though - it seems that the code is prepared for "fan swing" commands, but they don't seem to be implemented in either the Arduino code, or in the LUA script for Domoticz.
Does anyone have some pointers on how to activate these bits?
-
since I am still using Mysensors ver 1.5.4 I am not able to send text strings from Domoticz to my mysensor heatpump IR. So I have taken the scale down approach to create a switch that can switch on or off my IVT. Since we anyway always use same configuration, I took the liberty to hardcode this into my Mysensors code.
I use Arduino code library created by ToniA
My sketch is solely made for my IVT heatpump, but it's easy to modify to your heatpump. I have commented away all those other heatpump instances, since they took up almost all memory#include <Arduino.h> #include <MySensor.h> #include <FujitsuHeatpumpIR.h> #include <PanasonicCKPHeatpumpIR.h> #include <PanasonicHeatpumpIR.h> #include <CarrierHeatpumpIR.h> #include <MideaHeatpumpIR.h> #include <MitsubishiHeatpumpIR.h> #include <SamsungHeatpumpIR.h> #include <SharpHeatpumpIR.h> #include <DaikinHeatpumpIR.h> #include <MitsubishiHeavyHeatpumpIR.h> #include <HyundaiHeatpumpIR.h> #include <HisenseHeatpumpIR.h> #include <GreeHeatpumpIR.h> #include <FuegoHeatpumpIR.h> #include <ToshibaHeatpumpIR.h> #include <IVTHeatpumpIR.h> IRSenderPWM irSender(3); // IR led on Arduino digital pin 3, using Arduino PWM //IRSenderBlaster irSender(3); // IR led on Arduino digital pin 3, using IR Blaster (generates the 38 kHz carrier) // Array with all supported heatpumps HeatpumpIR *heatpumpIR[] = {/*new SharpHeatpumpIR(), new PanasonicCKPHeatpumpIR(), new PanasonicDKEHeatpumpIR(), new PanasonicJKEHeatpumpIR(), new PanasonicNKEHeatpumpIR(), new PanasonicLKEHeatpumpIR(), new CarrierNQVHeatpumpIR(), new CarrierMCAHeatpumpIR(), new MideaHeatpumpIR(), new FujitsuHeatpumpIR(), new MitsubishiFDHeatpumpIR(), new MitsubishiFEHeatpumpIR(), new MitsubishiMSYHeatpumpIR(), new SamsungHeatpumpIR(), new SharpHeatpumpIR(), new DaikinHeatpumpIR(), /*new MitsubishiHeavyZJHeatpumpIR(), new MitsubishiHeavyZMHeatpumpIR(), new HyundaiHeatpumpIR(), new HisenseHeatpumpIR(), new GreeHeatpumpIR(), new FuegoHeatpumpIR(), new ToshibaHeatpumpIR(), */new IVTHeatpumpIR(), NULL}; #define CHILD_1 3 // childId MySensor gw; MyMessage msg(CHILD_1, V_VAR1); int i = 0;//Select specific heatpump model void setup() { Serial.begin(115200); //Serial.begin(9600); delay(500); // Serial.println(F("Starting")); //gw.begin(incomingMessage); gw.begin(incomingMessage, AUTO, true); // Send the sketch version information to the gateway and Controller gw.sendSketchInfo("Heatpump IR switch", "1.0"); // Register a sensors to gw. Use binary light for test purposes. gw.present(CHILD_1, S_LIGHT); const char* buf; // Send the same IR command to all supported heatpumps Serial.print(F("Sending IR to ")); buf = heatpumpIR[i]->model(); // 'model' is a PROGMEM pointer, so need to write a byte at a time while (char modelChar = pgm_read_byte(buf++)) { Serial.print(modelChar); } Serial.print(F(", info: ")); buf = heatpumpIR[i]->info(); // 'info' is a PROGMEM pointer, so need to write a byte at a time while (char infoChar = pgm_read_byte(buf++)) { Serial.print(infoChar); } Serial.println(); } void loop() { gw.process(); } void incomingMessage(const MyMessage &message) { Serial.print("Receive message: "); if (message.type==V_LIGHT) { int incomingRelayStatus = message.getInt(); //Serial.print(F("Incoming Relaystatus: ")); Serial.println(incomingRelayStatus); if (incomingRelayStatus == 1) { heatpumpIR[i]->send(irSender, POWER_ON, MODE_HEAT, FAN_1, 23, VDIR_AUTO, HDIR_AUTO); Serial.println(F("ON, 23 degree")); } else { heatpumpIR[i]->send(irSender, POWER_OFF, MODE_HEAT, FAN_1, 23, VDIR_AUTO, HDIR_AUTO); Serial.println(F("OFF")); } } }
-
I copied ToniA's approach to get 5V from the Heatpump, and soldered wires to the IR detection circuit:
-
First , I started to build an arduino pro version of the sensors but i have some trouble, it seems that the code sended over ir is not stable using an arduino as decoder i see that sometims one ore more bit is delayed or not send and accordingly the heatpump does not start... there are settings that i have to change for the PWM on an arduino pro mini ?
Second if someone is interested i decoded the ir codes of my heatpump a mitsubishi not supported on the provided library on the forum, i can share the reverse of the protocol if someone is interested
-
Hi you should provide your heatpump info to Toni at the below link. check manufacturer + model + relevant data from your remote control and also your protocol info. then other persons using your heatpump can benefit from your work
https://github.com/ToniA/arduino-heatpumpir
PS. I am for my heatpump not using arduino/mysensors, as it was actually much easier to use/integrate Wemos D1 Pro mini + ESPEASy + P_115 heatpumpir into my Domoticz.
https://www.domoticz.com/wiki/AC_/_heatpumpIR#Check_heatpumpIR
-
I recently build successfully a mysensor node based on an Arduino Uno, a Robolink IR sensor and a Robolink DHT11 sensor. The last two from an Elektor sensor kit ever bought for my son when he was still interested by electronics .
My controller is Home Assistant, so I did a merge of the given MySensors example sketch and the Home Assistant example sketch together with the DHT11 sketch.
The airco is a Samsung one, so in the sketch you will find these defines uncommented. Replace by your airco manufacturer.People interested in building one, can find my sketch on https://github.com/ericvb/MySensorsArduinoSketches
@ToniA a big thanks for the work to decode all these IR sequences!