ESP8266-12 Standalone Blynk Control Outlets Wireless 433 Mhz

Published

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

Share

    Recommendations

    • Planter Challenge

      Planter Challenge
    • Oil Contest

      Oil Contest
    • Make it Move Contest

      Make it Move Contest
    user

    We have a be nice policy.
    Please be positive and constructive.

    Tips

    Questions

    9 Comments

    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);
    }

    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.

    Hi RoccoM1

    it should work, but I do not have it tested

    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 ?

    Hi OlivierD2

    try entering the sketch

    mySwitch.switchOn("100010", "101001");

    or

    mySwitch.switchOn(100010101001);

    1 reply

    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

    Nice work, and I love the dancing robot gif! So cool!