The answer

A project log for Integrate 315MHz RF Outlet with RPi and OpenHAB

Control the Defiant 1 Outlet Receiver from Home Depot via Raspberry Pi and OpenHAB. This also appears to be marketed as GE 18278 on Amazon.

Paul WhitakerPaul Whitaker 01/20/2017 at 14:310 Comments

After wiring you can use RCSwitch to send the string "101010101001101101100100" on 315MHz and get it to turn on or off. It's the same command for both since it's a single button switch.

  1. Wire up the transmitter
  2. Follow steps to Download and Install WiringPi
  1. Git clone
  2. Edit send.cpp and replace it with this code

    #include "RCSwitch.h"
    #include <stdlib.h>
    #include <stdio.h>
    int main(int argc, char *argv[]) {
         output PIN is hardcoded for testing purposes
         for pin mapping of the raspberry pi GPIO connector
        int PIN = 0;
        char* code = argv[1];
        if (wiringPiSetup () == -1) return 1;
            printf("sending code[%d]\n", code);
            RCSwitch mySwitch = RCSwitch();
            return 0;
  3. Run "make"
  4. Run ./send 101010101001