Introduction: ESP8266-12 Standalone Blynk Control Outlets Wireless 433 Mhz
This is my first project on instructable ...
This project uses ESP8266-12 to turn on and turn off wireless outlets, without any changes, using the app Blynk library Rc-switch
Step 1:
Step 2: Materials
ESP8266-12 or ( ESP8266-07 , ...., ESP8266-12e)
RF 433 MHz Transmitter
3 wirelless remote control outlets
antenna 433mhz ( https://www.instructables.com/id/433-MHz-Coil-loaded-antenna/ )
Step 3: Software E Library
Step 4: Sketch
change the sketch in the following lines with your data:
- char auth[] = "xxxxxxxxxx"; //insert here your token generated by Blynk app
- Blynk.begin(auth, "ssid", "password"); //insert here your SSID and password
- mySwitch.switchOn(1, 1); // insert here your code outlets
rc-switch (follow the prompts to set the transmission code of your outlets remote control)
Step 5: Connections
ESP8266-12
VCC +3,3v
CH-PD +3,3v (new version ESP8266-12e pin EN)
GND ground
GPIO15 ground
GPIO13 ---------- pin ATAD (transmitter 433mhz )
transmitter 433mhz
ATAD ----- GPIO13 (ESP8266-12)
VCC +5v
GND ground
Step 6: Thanks
http://www.blynk.cc/ (blynk site)
https://code.google.com/p/rc-switch/ ( rc-witch site)
https://www.instructables.com/id/Getting-Started-with-the-ESP8266-ESP-12/ (tutorial esp8266-12)
https://www.instructables.com/id/ESP8266-ESP-12Standalone-Blynk-101/ (tutorial esp8266-12 standalone)
https://www.instructables.com/id/433-MHz-Coil-loade... (antenna 433mhz)
Second project :
11 Discussions
Question 10 months ago on Step 3
Hi,thanks for share your code,have successfully made it and work perfect,now have buyed a google home assistant,and i'd like to run whit vocal command,searching on google has confused me,could you help me if possible...really thanks
Answer 10 months ago
hi I'm glad you use the code and everything works, at the moment I'm not able to help you, I'm an Italian nurse and we are fighting against the coronavirus covid-19 I don't know when I can help you create the code, a greeting Christian
4 years ago
thankyou for this i had to use the tristate of my code for my sockets
works great thankyou
/**************************************************************
* Blynk is a platform with iOS and Android apps to control
*
* https://www.instructables.com/id/ESP8266-12-standa...
* Arduino, Raspberry Pi and the likes over the Internet.
* You can easily build graphic interfaces for all your
* projects by simply dragging and dropping widgets.
*
* Downloads, docs, tutorials: http://www.blynk.cc
* Blynk community: http://community.blynk.cc
* Social networks: https://www.fb.com/blynkapp
* http://twitter.com/blynk_app
*
* Blynk library is licensed under MIT license
* This example code is in public domain.
*
**************************************************************
* This example runs directly on ESP8266 chip.
*
* You need to install this for ESP8266 development:
* https://github.com/esp8266/Arduino
*
* Change WiFi ssid, pass, and Blynk auth token to run :)
*
**************************************************************/
#define BLYNK_PRINT Serial // Comment this out to disable prints and save space
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
//-------- rcswitch------
#include <RCSwitch.h>
RCSwitch mySwitch = RCSwitch();
char* socket1TriStateOn = "0FFFF0FFFF0F";
char* socket1TriStateOff = "0FFFF0FFFFF0";
char* socket2TriStateOn = "0FFFFFF0FF0F";
char* socket2TriStateOff = "0FFFFFF0FFF0";
char* socket3TriStateOn = "0FFFFF0FFF0F";
char* socket3TriStateOff = "0FFFFF0FFFF0";
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "own token from Blynk"; //insert here your token generated by Blynk
void setup()
{
Serial.begin(9600);
Blynk.begin(auth, "SSID", Pass"); //insert here your SSID and password
mySwitch.enableTransmit(2); // pin d4
}
void loop()
{
Blynk.run();
}
//-------rcswitch------
BLYNK_WRITE(0) { //virtual pin 0
mySwitch.sendTriState(socket1TriStateOn);// insert here your code outlets
}
BLYNK_WRITE(1) {
mySwitch.sendTriState(socket1TriStateOff);
}
BLYNK_WRITE(2) {
mySwitch.sendTriState(socket2TriStateOn);
}
BLYNK_WRITE(3) {
mySwitch.sendTriState(socket2TriStateOff);
}
BLYNK_WRITE(4) {
mySwitch.sendTriState(socket3TriStateOn);
}
BLYNK_WRITE(5) {
mySwitch.sendTriState(socket3TriStateOff);
}
5 years ago
I made it for the ESP-01. It turns my Christmas tree lights on and off. Tip: If your Arduino IDE compiler freezes - check for odd characters in the RCswitch.h file.
5 years ago
Hi RoccoM1
it should work, but I do not have it tested
5 years ago
How do we know if this works with different outlets brand? I mean for example, is it possible to use this: http://www.brennenstuhl.com/en-DE/multi-way-extensions-und-plug-in-appliances/remote-control-set/remote-control-set-rcs-1000-n-comfort-1.html#wp_features ?
5 years ago
Hi OlivierD2
try entering the sketch
mySwitch.switchOn("100010", "101001");
or
mySwitch.switchOn(100010101001);
Reply 5 years ago
Thx I will try ;)
5 years ago
How do you insert the code outlets, what is the syntax exactly ?
BLYNK_WRITE(0) { //virtual pin 0
mySwitch.switchOn(1, 1); // insert here your code outlets
}
If my outlet code is for example 100010101001, how is the syntax of the Arduino code just after mySwitch.switchOn(1,1); ?
thx for your reply
5 years ago
thanks Seamster
5 years ago
Nice work, and I love the dancing robot gif! So cool!