Recent Posts

Pages: [1] 2 3 ... 10
2
Solar Power / Connect Tracer 4210RN to Raspberry_Pi display on Webpage
« Last post by branx86 on August 14, 2017, 03:42:17 PM »
Connect Tracer 4210RN to Raspberry_Pi to display on webpage

http://www.rototron.info/raspberry-pi-solar-serial-rest-api-tutorial/
3
Raspberry Pi / Get Solar Info From Raspberry_PI
« Last post by branx86 on August 14, 2017, 03:41:15 PM »
4
General Discussion / Building a smart home with IoT and Blockchain
« Last post by theiotguy on August 10, 2017, 07:18:15 AM »
If you have ever dreamed to build a smart home using IoT, the following is an inexhaustive list of resources to help you.

First an extensive brief on how to choose the suitable engineering kit- including IoT sensors, protocols, gateways required to build a smart home.

https://www.simform.com/home-automation-using-internet-of-things/


Guide on starting out with Raspberry Pi

1. Video lesson explaining the basics of the Raspberry Pi
https://www.umes.edu/tech/IntroToRaspberryPi.mp4.zip

2. PowerPoint slides demonstrating how to set up your Raspberry Pi and use it to solve Engineering Design Challenges

3. Raspberry Pi GPIO pin numbers
https://www.umes.edu/tech/RaspberryPiPins.jpg

Challenges which might come while working with RPi
1. Controlling an LED with your Raspberry Pi GPIO pins
https://thepihut.com/blogs/raspberry-pi-tutorials/27968772-turning-on-an-led-with-your-raspberry-pis-gpio-pins

2. Design a harmless motion sensor mouse trap with a camera
http://www.instructables.com/id/RaspiTrap-V10/

3. Design a baby monitor that senses motion & sound, and plays soothing music
http://www.instructables.com/id/Easy-DIY-baby-crying-detector-with-Raspberry-Pi/

4. Design and program a smart house via external sensors
http://www.instructables.com/id/Easy-DIY-baby-crying-detector-with-Raspberry-Pi/

5. Multi-Room Media Center controlling video and audio
http://www.instructables.com/id/Raspberry-Pi-Multi-Room-Audio-MobileTabletPC-Contr/

6. Design an automated land rover controlled by the Raspberry Pi
https://www.hackster.io/peejster/rover-c42139

Bonus guide: For selecting the best home automation protocols for the internet of things
https://www.simform.com/iot-home-automation-protocols/



I will keep it updated with more guides and references. If you have any questions, feel free to reach me out.


6
General Discussion / Wire SonOff to light switch
« Last post by branx86 on July 12, 2017, 03:12:25 PM »
All Credit to the SuperHouse 



 You may reach them at http://www.superhouse.tv
7
General Discussion / Pictures from collective networks
« Last post by tabathavw18 on July 04, 2017, 10:33:58 AM »
 Novel work
http://arab.aunties.porndairy.in/?post-madalyn
 tn mask village rasoul bin
8
General Discussion / Loose grown-up galleries
« Last post by tabathavw18 on July 04, 2017, 10:31:27 AM »
  Started up to date cobweb predict
http://analplug.tobuy.in/?leaf.marley
 erotic pose pinoy erotic movies erotic kamasutra erotic resort erotic asphyxia
9
General Discussion / Loose matured galleries
« Last post by tabathavw18 on July 04, 2017, 10:30:39 AM »
Study my new devise
http://arab.girls.tv.yopoint.in/?post.dulce
 european fundamentalist kw cameras дубай
10
Arduino / Reprogram Sonoff Smart Switch with Web Server
« Last post by branx86 on July 03, 2017, 12:26:45 PM »
Copied from:  http://randomnerdtutorials.com/reprogram-sonoff-smart-switch-with-web-server/

Browse our projects by category

 ESP8266
 Arduino
 Raspberry Pi
 Home Automation
 Sensor/Modules Guides

Make Arduino into FTDI programmer = Pin: GND + RST then connect the 3.3V, RX, TX, GND
 


Reprogram Sonoff Smart Switch with Web Server
25 Shares
In this post, youre going to learn how to flash custom firmware in the Sonoff device, so that you can control it with your own web server. I recommend that you read my previous post to get familiar with the Sonoff.

If you dont have a Sonoff yet, you can get one for $5 on eBay: http://ebay.to/2eNzHf2.

First, watch the step by step video tutorial below
 

Safety warning
Make sure you disconnect your Sonoff from mains voltage. Then, open the box enclosure.

warning-m

Sonoff pinout
RELATED CONTENT: Like ESP8266? Check out Home Automation Using ESP8266
The Sonoff is meant to be hacked, and you can see clearly that these connections were left out, so that you can solder some pins and upload a custom firmware. Thats the pinout.
   


Ive soldered 4 header pins, so that I can easily connect and disconnect wire cables to my Sonoff device.



Preparing your 3.3V FTDI module
You need an FTDI module to upload a new firmware to your Sonoff. Use the schematics provided as a reference.



DOWNLOAD FREE PDF: Getting Started with ESPlorer IDE and ESP8266
Warning: uploading a custom firmware is irreversible and youll no longer be able to use the app eWeLink.

Ive added a toggle switch in the power line, so that I can easily turn the Sonoff on and off to flash a new firmware without having to unplug the FTDI module.

I used hot glue to glue the ends of the wires together. This prevents you to make wrong connections between the FTDI and the Sonoff in the future.



Boot your Sonoff in Flashing Mode
To flash a new firmware to your Sonoff, you have to boot your Sonoff in flashing mode. Follow this 4 step process:

1) Connect your 3.3V FTDI programmer to your computer

2) Hold down the Sonoff button



3) Toggle the switch to apply power to the Sonoff circuit



4) Then, you can release the Sonoff button

Now, your Sonoff should be in flashing mode and you can upload a new firmware.

Opening the Arduino IDE
You should have the ESP8266 add-on installed in the Arduino IDE If you dont have the add-on installed, first follow this tutorial on How to Install the ESP8266 Board in Arduino IDE.

You can upload the full sketch to your Sonoff (replace with your SSID and password):

/*********
  Rui Santos
  Complete project details at http://randomnerdtutorials.com 
*********/

#include <ESP8266WiFi.h>
#include <WiFiClient.h>
#include <ESP8266WebServer.h>
#include <ESP8266mDNS.h>

MDNSResponder mdns;

// Replace with your network credentials
const char* ssid = "YOUR_SSID";
const char* password = "YOUR_PASSWORD";

ESP8266WebServer server(80);

String webPage = "";

int gpio13Led = 13;
int gpio12Relay = 12;

void setup(void){
  webPage += "<h1>SONOFF Web Server</h1><p><a href=\"on\"><button>ON</button></a>&nbsp;<a href=\"off\"><button>OFF</button></a></p>"; 
  // preparing GPIOs
  pinMode(gpio13Led, OUTPUT);
  digitalWrite(gpio13Led, HIGH);
 
  pinMode(gpio12Relay, OUTPUT);
  digitalWrite(gpio12Relay, HIGH);
 
  Serial.begin(115200);
  delay(5000);
  WiFi.begin(ssid, password);
  Serial.println("");

  // Wait for connection
  while (WiFi.status() != WL_CONNECTED) {
    delay(500);
    Serial.print(".");
  }
  Serial.println("");
  Serial.print("Connected to ");
  Serial.println(ssid);
  Serial.print("IP address: ");
  Serial.println(WiFi.localIP());
 
  if (mdns.begin("esp8266", WiFi.localIP())) {
    Serial.println("MDNS responder started");
  }
 
  server.on("/", [](){
    server.send(200, "text/html", webPage);
  });
  server.on("/on", [](){
    server.send(200, "text/html", webPage);
    digitalWrite(gpio13Led, LOW);
    digitalWrite(gpio12Relay, HIGH);
    delay(1000);
  });
  server.on("/off", [](){
    server.send(200, "text/html", webPage);
    digitalWrite(gpio13Led, HIGH);
    digitalWrite(gpio12Relay, LOW);
    delay(1000);
  });
  server.begin();
  Serial.println("HTTP server started");
}
 
void loop(void){
  server.handleClient();
}



Preparing your Arduino IDE
Having your Sonoff device still in flashing mode.

1. Select your FTDI port number under the Tools> Port > COM14 (in my case)
2. Choose your ESP8266 board from Tools> Board > Generic ESP8266 Module
3. Press the Upload button


Wait a few seconds while the code is uploading. You should see a message saying Done Uploading.

Troubleshooting
If you try to upload the sketch and it prompts the following error message:

warning: espcomm_sync failed
error: espcomm_open failed
Your Sonoff is not in flashing mode and you have to repeat the process described in section Boot your Sonoff in flashing mode described earlier in this guide.

Final circuit
After uploading the code, re-assemble your Sonoff. Be very careful with the mains voltage connections.

Its the exact same procedure as shown in the introductory guide.



ESP8266 IP Address
Open the Arduino serial monitor at a baud rate of 115200. Connect GPIO 0 of your ESP8266 to VCC and reset your board.

After a few seconds your IP address should appear. In my case its 192.168.1.70.


Demonstration
For the final demonstration open any browser from a device that is connected to the same router that your Sonoff is. Then type the IP address and click Enter!



Now when you press the buttons in your web server you can control the Sonoff switch and any device that is connected to it.

Sonoff tutorials list:

Sonoff $5 WiFi Wireless Smart Switch Introduction
How to Flash a Custom Firmware to Sonoff
Wrapping up
Thats it for now, I hope you had fun learning about the Sonoff device. Make sure you subscribe to my blog, because Ill be posting more tutorials about the Sonoff.

Do you have any questions? Leave a comment down below!

Thanks for reading,

Rui





 

















Pages: [1] 2 3 ... 10