An HTTP service to send RF signals over a 433Mhz transmitter for raspberry pi.
My setup:
- Raspberry Pi 2
- 433Mhz transmitter - wired to GPIO 17 (physical pin 11)
- EDIMAX Wireless 802.11b/g/n nano USB adpater (EW-7811Un)
- Raspbian (Jessie)
- WiringPi
- Node 5.7.1
Please read all of this. Just running npm install
will tank hard.
To get Node 5.7.x, I used their official tarball download: node-5.7.1 ARMv7.
I fetch this via wget
in a download folder, untar it, change to the new directory and then copy everything to /usr/local`.
With git already installed:
git clone git://git.drogon.net/wiringPi
cd wiringPi
./build
Now with all the prerequisites in place, you should be able to get a working install via npm
:
npm install
Each device can have multiple operations defined where an operation is comprised of a pulse
and code
.
{
"name": "myLamp",
"pulse": 178,
"operations": {
"on": {
"code": 1234567
},
"off": {
"code": 1234566
}
}
}
Returns a list of devices that will include their operations as well.
Adds a new device definiiton.
Returns configuration for device.
Use JSON-PATCH specification to update the device.
Deletes a command from the device.
Adds a new command to a device. A command only takes a code
property with the integer code to send.
Sends the predefined command to the device.
Use JSON-PATCH specification to update the command.
Deletes a command from the device.