Skip to content
/ switch Public

Node app to controll 433mhz switches connected to a raspberry pi

Notifications You must be signed in to change notification settings

daehn/switch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

switch

Setup

In order to controll 433mhz transmitters connected to your Raspberry pi, switch uses rcswitch-pi and wiringpi.

You can $ rake bootstrap to install all necessary dependencies automatically, alternativly you can install the node dependencies and submodules manually:

$ sudo npm install
$ git submodule init && git submodule update

Afterwards follow the instructions on how to build wiringPi and rcswitch-pi via the links above.

Hardware

I'm using a 433Mhz transmitter like this. There are several good tutorials online on how to connect the transmitter to a Raspberry pi. I also will add a sketch for the connections to this readme soon.

Controlling the switches

To control a switch you need to pass the id, unit and state of the switch in the request body. An example POST request JSON body to controll a switch looks like this:

{
  "id" : "10110",
  "unit" : "1",
  "on" : true
}

At the moment there is no authentification, so anyone in your network could control the app. This could easily be changed by adding Passport or something similar.

About

Node app to controll 433mhz switches connected to a raspberry pi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published