Giter VIP home page Giter VIP logo

ardu-light-switch's Introduction

Arduino Switch

I made this little project to automate switches in my house using Arduino ESP32's, so lights can turn on/off on a schedule while I'm away.

Overview

The arduino code will first acquire the current time (using NTP servers), then load the switch schedule from a file hosted in the internet. The schedule is polled every 10 minutes.

The main loop will try matching the current time against the schedule, accurate to the second (format HH-MM-SS). If it matches a switch time, the servo will actuate to either on or off.

There's many improvevements that could be made, but this worked perfecly for a few weeks out of the house.

Build

The build is very simple, using an Arduino ESP32 and 9g servo hot-glued to a little wooden base. I fed the servo through the VBUS pin from the Arduino. Here's what it looks like:

PXL_20231210_211808794

Quick demo

switch720p.mp4

Observability

There's minimal observability, which I can use to know if the switches are working. Its simply a Firebase real time database, which can be updated with Firebase API calls. It currently logs the times the switch started (e.g. maybe the power went out), and the last time the schedule was polled:

image

Links

Some links that were useful for this project:

ardu-light-switch's People

Contributors

hoffmannmatheus avatar

Watchers

 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.