Giter Site home page Giter Site logo

seco / switchkit Goto Github PK

View Code? Open in Web Editor NEW

This project forked from snikch/switchkit

0.0 1.0 0.0 48 KB

๐ŸŽ› SwitchKit adds Home Automation to your existing light switches, with a little bit of smarts.

License: MIT License

C++ 97.04% C 2.96%

switchkit's Introduction

SwitchKit ๐ŸŽ›

Home Automation for your existing light switches, with a little bit of smarts.

SwitchKit provides a simple firmware for ESP8266 devices to control up to three smart or dumb bulbs, via physical switches. It works perfectly with Sonoff, Electrodragon and any ESP8266 based device. It is designed to be placed in wall boxes and wire in to existing switches. Lights are then controlled by a combination of relays and MQTT messages, although all functionality is preserved if your wifi etc. goes down. This firmware is built using the homie-esp8266 framework.

Features

  • Control normal bulbs via MQTT
  • Control smart bulbs via physical switches
  • Avoid disgraceful degradation if wifi or mqtt connectivity fails
  • OTA updates (via homie-esp8266)
  • Handles up to three bulbs of either type
  • Remotely configurable via MQTT

Dumb Lights vs Smart Lights

In dumb mode, a bulb is toggled on or off via the physical switch, or via an MQTT command (for home automation). This allows existing bulbs to be made "smart".

In smart mode, the bulb itself must be a "smart bulb" which is capable of being turned off via a home automation system. SwitchKit handles turning the bulb on and off by emitting MQTT commands when online, or by falling back to "dumb mode" when there is no network or MQTT broker connection. For this mode to work, it needs to be in conjunction with home automation software such as Home Assistant.

Motivation

We have a house full of both Lifx and dumb bulbs. While the lifx bulbs are great to turn off with an app, it means that toggling the switch at the wall turns them offโ€ฆ again, and toggling them off at the wall means you can't turn them back on with the app.

SwitchKit is designed to provide toggleable bulbs for the entire home, regardless of whether they are smart or not. Dumb bulbs become smart, and smart bulbs can be controlled via physical and digital means, without ending up in weird states.

Installation

It is recommended to install via PlatformIO. If you can not use PlatformIO, then please see the platformio.ini file for the required dependencies.

Future Features

  • Enable dimming of smart bulbs (perhaps via a combination of toggles)

Flow Chart

flow chart

buttonState

press:
  - increment count
  - start timer

timeout:
  count == 1:
    emit: single_press
  count >1 < 5:
    emit: unknown_press
  count: 5:
    emit: manual_toggle

switchkit's People

Contributors

snikch 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.