Giter Site home page Giter Site logo

sonoffs20's Introduction

Topics

dersimn/SonoffS20/ABC123/online → true

dersimn/SonoffS20/ABC123/maintenance/info → {
        "board_id": "SonoffS20_ABC123",
        "build_hash": "847c24d8f7c80245878a8a73af440e924f363374",
        "build_tag": "master",
        "build_timestamp": 1607178964,
        "ip_address": "10.1.1.216"
    }

dersimn/SonoffS20/ABC123//onoff → {"val": false}
dersimn/SonoffS20/ABC123//led → {"val": false}
dersimn/SonoffS20/ABC123//config → {"button-toggle": false}

Using retained messages for dersimn/SonoffS20/ABC123/set/config will reload the configuration on boot.

Flash

Clone this repository, cd into it. Connect wires to the Sonoff S20 (I've been using a FT2232 breakout board). Flash using PlatformIO CLI.

Run

platformio run

first to see if everything compiles, first.

To get the Sonoff into programming mode, connect every pin, except 3.3V. Press the button on the PCB and then plug in the 3.3V, hold it for further ≈4s:

In case you have multiple USB-Serial adapters, or your adapter offers multiple ports:

platformio device list
platformio run --upload-port /dev/cu.usbserial-00202102A 

For WiFi OTA upload:

platformio device list --mdns
platformio run -t upload --upload-port <SonoffS20_1234567.local or IP address>

Serial Monitor

Debug with:

platformio device monitor

or

platformio device monitor --port /dev/cu.usbserial-00202102A

Debugging build

Flash on Wemos D1 Mini board for better debugging:

platformio run -e d1_mini

I recommend to flash debugging firmwares via OTA as well, since it's much faster. You can still connect USB-Serial adapter for debugging monitor output simultaneously.

sonoffs20's People

Contributors

dersimn avatar

Watchers

James Cloos avatar  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.