BLYNK
HOME       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

[SOLVED] Blynk + NEC Generic TV IR remote power ON/OFF


#9

Yes, it’s not needed for the NEC.


#10

successssssssssss


#11

thanks costas, will share all later, just for your info, unlike the samsung code the app PUSH only needed quick push, the NEC code app PUSH needed hold longer, any ideas why that might be?

IGNORE THIS COMMENT

was bad wiring


#12

Solved again by Costas

Here is the working project

Download Github Library:-
IRremoteESP8266

code:-

#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#include <IRremoteESP8266.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "********************************";

// Your WiFi credentials.
// Set password to "" for open networks.
char ssid[] = "**********";
char pass[] = "**********";
char server[] = "************";


IRsend irsend(4); //an IR emitter led is connected to GPIO pin 4 (D2)
void setup()
{
  irsend.begin();
  Serial.begin(115200, SERIAL_8N1, SERIAL_TX_ONLY);
  Blynk.begin(auth, ssid, pass, server);
  // You can also specify server:
  //Blynk.begin(auth, ssid, pass, "blynk-cloud.com", 8442);
  //Blynk.begin(auth, ssid, pass, IPAddress(192,168,1,100), 8442);
}
BLYNK_WRITE(V1){
  int onoff = param.asInt();
  if(onoff == 1){
    irsend.sendNEC(0X2FDE817, 32); // 32 bits, no repeat
 }
}
void loop() {
  Blynk.run();
  
}

Here is the QR Code for the simple PUSH button, (must be set to PUSH and not SWITCH

Hardware side:- I used a NODEMCU IR led connected to D2

OBVIOUSLY the IR LED must be pointing at the TV to work.


#13

one question, should i mark as solved or projects made with blynk


#14

You should mark this as solved and if you want you can open a new one with “made with blynk”.
Btw about your project, looks really cool ! Are you able to only turn your tv on and off or do you have the possibility of switching channels etc ?


#15

Hi, Thanks but credit goes to Costas for the solving of the code, at present it only serves as an ON/OFF switch.


#16

Hi, I’m new here, I have a doubt in this project, where do I see the schematic, for linking the wires?


#17

@joziel This wasn’t a project topic, rather a troubleshooting one.

As per the OP the pin he uses was determined on the sketch.

IRsend irsend(4); //an IR led is connected to GPIO pin 4 (D2) 

Google around for other full wiring options as they can vary depending on hardware used.


#18

Good evening, a project like this, I wanted the schematic of this project


#19

Hi I am the original poster of this project, sorry but there is not a schematic available, it was not posted as a project it was posted for help with some code that I was stuck on , I soldered up a custom circuit board for the hardware side of things which was quite basic using and ESP8266 chip with a 5v to 3.3 v voltage regulator, A transistor and an infrared LED .


#20

Hi, good evening, I’m behind a project so that I can delligate the TV through the space, will you have a basic material like this.
thank you for your attention


#21

i’m sorry but i do not understand your question.


#22

Hi, good evening, I’m behind a project so I can turn off the TV through the ESP8266MCU, you have a basic material like this.
Thank you for your attention.


#23

Take a look at this post:

Pete.


#24

I am having error “‘IRsend’ does not type a type”.
Can someone help me?


#25

are you using the latest Library?


#26

ho inserito l’ultima libreria markszabo/IRremoteESP8266 ma niente da fare il codice di errore continua a dire che che “IRsend non digita un tipo” qualcuno sa aiutarmi??
grazie.


#27

can i use raw data for this lib like on uno do?


#28

Post number 24 in this topic has a link to latest version of the library.
This contains documentation, FAQs and example code for capturing and sending raw data.

I doubt if the library will work with an Arduino Uno, but from your question it’s not clear if that’s what you’re planning to do.

Pete.