Git Product home page Git Product logo

rpi-clickety's Introduction

rpi-clickety

A node library that can receive, decode, and transmit 433Mhz remote controlled outlet signals using your raspberry pi. Inpired by rc-switch. I made this to control the switches I have at home (HS2260A chip).

Features

  • Sniff transmissions and output decoded values
  • Output raw pulse timing data (as base64)
  • Code based transmit
  • Can also transmit based on raw pulse timing data

Installation

This module depends on the JS pigpio library for high-speed gpio twiddling so follow the installation instructions there.

Usage

Note: I used the cheapo 433Mhz transmitter/receiver modules that can be obtained for under $5. All testing was done on a Rpi Zero WH.

โš  Note on pin numbering: The underlying pigpio library uses the Broadcom GPIO numbers so make sure you are using the correct numbers.

Receiving

Setup:

  • Pi pin 1 (3v3) <-> Receiver Vcc
  • Pi pin 6 (GND) <-> Receiver GND
  • Pi pin 13 (GPIO27) <-> Receiver DATA
//Note we are passing 27 not 13 for pin param
const receiver = new Receiver(27);

//receiver is an event emitter that will emit received codes
//along with other useful info.
receiver.on('code', (data) => {

  console.log(data.code); //Print decimal code
});

receiver.listenStart();

Transmit

Setup:

  • Pi pin 2 (5V) <-> Transmitter Vcc
  • Pi pin 6 (GND) <-> Transmitter GND
  • Pi pin 11 (GPIO17) <-> Transmitter DATA
const tx = new Transmitter(17);
tx.transmit(1406220); //Send decimal code

rpi-clickety's People

Contributors

alumowa avatar

Watchers

 avatar

rpi-clickety's Issues

Add protocol support during decode

Currently the decode works with some hardwired values that I deduced from my remote. Need to add some basic protocol definitions so multiple attempts can be made when decoding framed data, that way the lib can work with a variety of protocols and new ones can be easily added.

Since the generic approach to framing is to basically listen for 2 long low durations of the sync bit, it doesn't seem like we would need the sync bit definition. That leaves just the information required to deduce a 1 or 0 bit...

Add multi tx support

Transmitter's transmit and transmitRaw should be able to accept an array of code or pulse timings, respectively, in order to create a wave chain transmit. This would be useful for defining receiver groups.

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.