this project has a limitation firstly we need to find HEX/DEC Code then put it on our sketch.
Actually i want to make it for market or we can say for user friendly where user just point out his remote in front of device and user can create own custom remote with he help of app
i am ready to purchase a business plan sir if my project is ready
and yes I am not able to create this type of function on blynk 2.0
I already made it this project with blynk legacy too just find hex/dec code and put it into the sketch
#define BLYNK_PRINT Serial
#if defined(ESP8266)
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#else
#include <WiFi.h>
#endif // ESP8266
#if defined(ESP32)
#include <BlynkSimpleEsp32.h>
#endif // ESP32
// IR library
#include <IRremoteESP8266.h>
#include <IRsend.h>
const uint16_t kIrLed = 4; // ESP8266 GPIO pin to use. Recommended: 4 (D2).
IRsend irsend(kIrLed); // Set the GPIO to be used to sending the message.
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "YourNetworkName";
char pass[] = "YourPassword";
BLYNK_WRITE(V51) { // Power button
if (param.asInt() == 0) {
// Serial.println("NEC");
irsend.sendNEC(0x1FE50AF);
}
}
BLYNK_WRITE(V52) { // Mute button
if (param.asInt() == 0) {
// Serial.println("NEC");
irsend.sendNEC(0x1FE30CF);
}
}
BLYNK_WRITE(V53) { // Song Forward
if (param.asInt() == 0) {
// Serial.println("NEC");
irsend.sendNEC(0x1FEE01F);
}
}
BLYNK_WRITE(V54) { // Song Backward
if (param.asInt() == 0) {
// Serial.println("NEC");
irsend.sendNEC(0x1FEA05F);
delay(10); // double tap back button to back one song
irsend.sendNEC(0x1FEA05F);
}
}
BLYNK_WRITE(V55) { // Volume --
if (param.asInt() == 0) {
// Serial.println("NEC");
irsend.sendNEC(0x1FEC03F);
}
}
BLYNK_WRITE(V56) { // Volume ++
if (param.asInt() == 0) {
// Serial.println("NEC");
irsend.sendNEC(0x1FE40BF);
}
}
BLYNK_WRITE(V57) { // Play/Pause
if (param.asInt() == 0) {
// Serial.println("NEC");
irsend.sendNEC(0x1FE32CD);
}
}
void setup() {
#if defined(BLYNK_PRINT)
// Debug console
Serial.begin(115200);
#endif // BLYNK_PRINT
Blynk.begin(auth, ssid, pass);
}
void loop() {
Blynk.run();
}
this sketch works after receiving hex code and we all know how to find hex /dec code using simple sketch
#include <Arduino.h>
#include <IRremoteESP8266.h>
#include <IRrecv.h>
#include <IRutils.h>
// An IR detector/demodulator is connected to GPIO pin 14(D5 on a NodeMCU
// board).
// Note: GPIO 16 won't work on the ESP8266 as it does not have interrupts.
const uint16_t kRecvPin = 14;
IRrecv irrecv(kRecvPin);
decode_results results;
void setup() {
Serial.begin(115200);
irrecv.enableIRIn(); // Start the receiver
while (!Serial) // Wait for the serial connection to be establised.
delay(50);
Serial.println();
Serial.print("IRrecvDemo is now running and waiting for IR message on Pin ");
Serial.println(kRecvPin);
}
void loop() {
if (irrecv.decode(&results)) {
// print() & println() can't handle printing long longs. (uint64_t)
serialPrintUint64(results.value, HEX);
Serial.println("");
irrecv.resume(); // Receive the next value
}
delay(100);
}
There isn’t a way to replicate the functionality in the video within Blynk, unless you’re prepared to do some manual editing of the dashboard layout and functionality, and probably add entries into the Blynk rules engine when it becomes available. In addition, Alexa / Google Home integration isn’t available in Blynk yet either.
I guess that if you were willing to pay for a white label product then Blynk may be able to add the functionality that you need, but in reality that would make your product unaffordable.
I use MQTT for all of my Home Automation projects, but I don’t see how it will help you create a customer friendly solution.
My approach to IR control is to send the appropriate control code via an MQTT message to an ESP8266 based IR sender. It works very well, and by utilising Node-Red I have Amazon Alexa integration, and I have the option to use Blynk as a front-end too.
However, that’s far from being a commercially viable and simple to set-up solution like the one you appear to be looking for.