Skip to content

HowTo_OperateLowCostOutlets

frownbreaker edited this page Mar 17, 2018 · 11 revisions

What kind of switch

There are generally five common kinds of outlet switches and two type of light controls

  1. "Type A" is configured with a 10 pole DIP switch.
  2. "Type B" is configured with two rotary (or sliding) switches with four setting possibilities each.
  3. "Type C" is made by Intertechno
  4. "Type D" like Status brand learn there RF codes each time they are powered on.
  5. "Type E" like ProElec (sold bt RS in the UK) are factory set with codes but can learn new codes
  6. "Slampher" these in light sockets made by Sonoff can be controlled via 433mHz they can be programmed to re
  7. "Funry" these light switches can be controlled via 433mHz

Type A: 10 pole DIP switches

images/typeA.png

RCSwitch::switchOn("11001", "01000");

The first parameter represents the setting of the first 5 DIP switches. In this example it's ON-ON-OFF-OFF-ON.

The second parameter represents the setting of the last 5 DIP switches. In this example the last 5 DIP switches are OFF-ON-OFF-OFF-OFF.

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {

  // Transmitter is connected to Arduino Pin #10  
  mySwitch.enableTransmit(10);
  
}

void loop() {

  mySwitch.switchOn("11001", "01000");

  // Wait a second
  delay(1000);
  
  // Switch off
  mySwitch.switchOff("11001", "01000");
  
  // Wait another second
  delay(1000);
  
}

Type B: Two rotary/sliding switches

images/typeB.png

RCSwitch::switchOn(4, 2);

The first parameter represents the setting of the first rotary switch. In this example it's switched to "4" or "D" or "IV".

The second parameter represents the setting of the second rotary switch. In this example it's switched to "2" or "B" or "II".

#include <RCSwitch.h>

RCSwitch mySwitch = RCSwitch();

void setup() {

  // Transmitter is connected to Arduino Pin #10  
  mySwitch.enableTransmit(10);
  
}

void loop() {

  mySwitch.switchOn(4, 2);

  // Wait a second
  delay(1000);
  
  // Switch off
  mySwitch.switchOff(4, 2);
  
  // Wait another second
  delay(1000);
  
}

Type C: Intertechno

RCSwitch::switchOn('a', 1, 2);

Type D: like Status brand learn there RF codes each time they are powered on.

mySwitch.setProtocol(1); mySwitch.setPulseLength(306); mySwitch.setRepeatTransmit(7);

Type E" like ProElec (sold bt RS in the UK) are factory set with codes but can learn new codes

mySwitch.setProtocol(1);
mySwitch.setPulseLength(175);
mySwitch.setRepeatTransmit(7);

Slampher" these in light sockets made by Sonoff can be controlled via 433mHz they can be programmed to re

Funry" these light switches can be controlled via 433mHz

mySwitch.setProtocol(1); mySwitch.setPulseLength(250); mySwitch.setRepeatTransmit(7);