Coder Social home page Coder Social logo

zwmyint / wifionoff Goto Github PK

View Code? Open in Web Editor NEW

This project forked from peastone/wifionoff

0.0 1.0 0.0 11.5 MB

Open firmware for the wireless socket Sonoff S20. Provides MQTT for IOT, HTTP for configuration and control. Toggles relay, if button is pressed.

License: GNU General Public License v3.0

Makefile 0.34% Shell 0.40% C++ 99.26%

wifionoff's Introduction

WIFIOnOff

Build Status License: GPL v3

Motivation

This repository was inspired by the article "Bastelfreundlich" by the German computer magazine "c't". The article there is pretty much introductory. If you speak German and you have difficulties to get started, you can have a look there.

Caution: Dragons ahead

The relay in the Sonoff S20 EU can only handle 10 A. Do NOT plug in devices with draw more current. The maximum amount of current is also noted on the backside of the Sonoff S20 EU. It may differ in other variants sold, so have a look.

Never program the Sonoff S20, if it is connected to the mains. In Germany, that's 230 volts and you don't want to get an electric shock, which might even kill you.

That put ahead, go forward and be cautious!

Flash it

  1. Install Arduino IDE (instructions).
  2. Install Arduino core for ESP8266 (instructions).
  3. Install the library (instructions) for MQTT from Joël Gähwiler.
  4. Get yourself a FTDI-232-USB-TTL converter and some jumper wires.
  5. Connect the FTDI to the Sonoff S20 (Pins from top to button: GND, TX, RX, 3.3V; Top is located right underneath the socket. Pin connection may vary for other variants or over time. You flash at your own risk.).
  6. Build the software and flash it.

The whole procedure may also be done with PlatformIO. It should be easy to find out the analogous steps for yourself. A platformio.ini is provided but must be adapted.

Image of Sonoff S20 and Sonoff Basic without housing "Sonoff Pinout" by ct-Open-Source licensed under CC Attribution Share Alike 4.0 International.

Use it

  1. Close the Sonoff S20. BE cautious! The device MUST be absolutely closed. You are working at your own risk here. If the device is open, you risk getting an electric shock or worse. If in doubt, ask an expert!
  2. Plug the Sonoff S20 into the mains.
  3. The LED will light green. An access point with the name "WIFIOnOff" will be started. Connect your mobile device and follow the captive portal. There you can enter your WiFi credentials or use WPS.
  4. Find the device with an mDNS mobile phone app.
  5. Open the web interface by entering the mDNS name into your browser.
  6. Configure MQTT, if wanted.
  7. Enjoy the web interface, MQTT and the physical button. Toggle the relay.

Documentation

Please read the manual(HTML, PDF). It is pretty detailed and should answer most of your questions. Only the latest version is provided. All versions can be generated with Doxygen.

wifionoff's People

Contributors

peastone avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.