Git Product home page Git Product logo

nexa-controller-rpi's Introduction

nexa-controller-rpi

This small project was written in order to use Raspberry Pi as a central controller for Nexa remote-controlled electrical outlets.

Hardware

Besides Nexa electrical outlets itself and Raspberry Pi, you will need a 433 MHz transmitter module for Rasberry Pi like this one.

Configuration

All tests were performed on Raspberry Pi with Raspbian OS.

RPi.GPIO python package is required.

Currently I run this installation on Raspberry Pi 2 with Raspbian Wheezy.

Configuration can be done via controller_config.ini or the web interface (web_interface.py)

Manual switch

To perform manual switch on/off (e.g. to pair RPi with the outlet), use:

python manual_switch.py on|off data_pin_number transmitter_code

How to start

Start it using ./restart.sh

It also starts a simple REST server on port 8080, which accepts /open and /close GET requests.

Log will be written to /run/nexa_controller.log and /run/nexa_rest_server.log

Modules

  • TimeController module enables selected electric outlet between sunrise and sunset for your geographical location (fetched by public IP of Raspberry Pi gateway)
  • PresenceController module allows to enable selected electric outlet only when configured MAC addresses are connected to the local router (tested on ASUS RT-AC66U).

Many thanks to this blog author for a comprehensive Nexa protocol analysis

freegeoip.io public API is used to fetch geo position based on public IP address

sunrise-sunset.org public API is used to calculate twilight timings based on location

nexa-controller-rpi's People

Contributors

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