Re: Outdoor Switch Silvercrest RCR DR3711-A

My solution for using the Silvercrest and Homeduino:

  • Use RcSwitch ReceiveDemo_Advanced.ino for retrieving the digital codes: e.g. 4098844
  • Add a HomeduinoRfSwitch and select the rawswitch protocol
  • Generate the numeric Pulselength array: [380,1140,2280]
  • The pulsesOn/Off are generated using the following script

var A = [4098844, 3823036] // A[0] = on-code, A[1] = off-code
var B = [3763461, 4007893]
var C = [3882126, 3666030]
var D = [3162775, 4179511]
var Master = [3699490, 4098834]

var bucket = [380, 1140, 2280]
var index = [1, 3, 6]
var protocol = { pulseLength: 380, syncFactor: { high: 1, low: 6 }, zero: { high: 1, low: 3 }, one: { high: 3, low: 1 }, invertedSignal: false }

var pulsesGenerate = (value: number, length: number) => {
let signal = [];
let pulses = ‘’

for (let i = length - 1; i >= 0; i--) {
    if (value & (1 << i)) {
        signal.push(index.findIndex(a => a === protocol.one.high))
        signal.push(index.findIndex(a => a === protocol.one.low))
    }
    else {
        signal.push(index.findIndex(a => a === protocol.zero.high))
        signal.push(index.findIndex(a => a === protocol.zero.low))
    }
}
signal.push(index.findIndex(a => a === protocol.syncFactor.high))
signal.push(index.findIndex(a => a === protocol.syncFactor.low))
signal.map(a => pulses += a)
return pulses

};

pulsesOn = pulsesGenerate(A[0],24)
pulsesOff = pulsesGenerate(A[1],24)