sui77 / rc-switch

Arduino lib to operate 433/315Mhz devices like power outlet sockets.
1.9k stars 658 forks source link

Signal ignored by device #382

Open Esylias opened 3 years ago

Esylias commented 3 years ago

I have HFY-J18 as RX and HFY-FST as TX.

i analysed received signal with "Martin-Laclaustra - protocollessreceiver" cause with protocol 1 the TX is sending an different protocol code and got:

15:45:13.633 -> Received 16722965 / 24bit Protocol: 1 15:45:13.679 -> data bits of pulse train duration: 38976 15:45:13.725 -> proposed protocol: { 406, { 1, 30 }, { 1, 3 }, { 3, 1 }, false } 15:45:13.819 -> ==== 15:45:13.819 -> first level down 15:45:13.819 -> 11984 15:45:13.819 -> 1204 424 1200 416 1196 432 1196 420 1204 416 1208 416 1216 408 1204 436 15:45:13.913 -> 396 1224 400 1228 1188 428 392 1252 1184 440 1180 432 388 1228 400 1236 15:45:14.006 -> 392 1224 412 1212 408 1216 1208 416 408 1216 1208 424 384 1236 1204 416 15:45:14.052 -> 388 15:45:14.052 -> ====

So i changed my TX code to

include

const int usePin = 27; RCSwitch rcSwitch = RCSwitch();

void setup() { Serial.begin(9600); pinMode(usePin, OUTPUT); rcSwitch.enableTransmit(digitalPinToInterrupt(usePin));

// Optional set protocol (default is 1, will work for most outlets) static const RCSwitch::Protocol customprotocol = { 406, { 1, 30 }, { 1, 3 }, { 3, 1 }, false }; rcSwitch.setProtocol(customprotocol);

// Optional set pulse length. rcSwitch.setPulseLength(405);

// Optional set number of transmission repetitions. rcSwitch.setRepeatTransmit(4);

}

void loop() { rcSwitch.send(16722965, 24); delay(5000);
}

RX tells me that code, protocol, bit and duration are same now (TX and remote control), but my device did not react on signal? Are my components bad or what iam doing wrong?

with my code RX get from TX

01:33:42.700 -> Received 16722965 / 24bit Protocol: 1 01:33:42.700 -> data bits of pulse train duration: 38992 01:33:42.746 -> proposed protocol: { 406, { 1, 30 }, { 1, 3 }, { 3, 1 }, false } 01:33:42.839 -> ==== 01:33:42.839 -> first level down 01:33:42.839 -> 11984 01:33:42.886 -> 1212 420 1196 428 1192 424 1204 428 1196 428 1196 428 1192 428 1200 436 01:33:42.931 -> 384 1240 388 1232 1204 416 400 1224 1204 428 1196 428 388 1232 396 1240 01:33:43.024 -> 388 1236 388 1240 384 1236 1200 432 380 1232 1196 440 384 1232 1196 420 01:33:43.114 -> 404 01:33:43.114 -> ====

turbofex commented 3 years ago

I got the very same issue here,have tried multiple TX Modules,without luck :( Don't know where went wrong...