rc-switch icon indicating copy to clipboard operation
rc-switch copied to clipboard

Receiving data from unknown devices

Open fntslz opened this issue 8 years ago • 44 comments

Hello, I 2 remote controls 433, one is detected as Protocol No. 1 while the other is not detected (has a coding with 12dip-switch). How can I do to be able to receive the 12 dip-switch? Thank you.

fntslz avatar Apr 15 '17 17:04 fntslz

check issues: https://github.com/sui77/rc-switch/issues/103 https://github.com/sui77/rc-switch/issues/112

Your second control may be 32 bits constant bit-length but with different pulse lengths (like all the standards in rc-switch) or a new NEXA-like 64 bits different-on-off-bit-length. You will be able to see this when you record your signal. It can help if you declare which platform you do use (Arduino or Rpi).

If you use Arduino, you can use Suat's signal recorder: https://github.com/sui77/SimpleRcScanner

Martin-Laclaustra avatar Apr 15 '17 19:04 Martin-Laclaustra

yes..i use arduino with cheap rx433 . alfter i try to recorder. thanks.

fntslz avatar Apr 15 '17 20:04 fntslz

OK done. Now you can explain to me how to create my protocol? Thank you. 433

fntslz avatar Apr 15 '17 22:04 fntslz

It looks like a 12-bits inverted protocol. (I am not very familiar with inverted protocols) Your code is either: 010100110100 or 101011001011 (one of these should match your switch, please report which) Your protocol: { 330, { 34, 1 }, { 1, 2 }, { 2, 1 }, true }

Use: setProtocol(the order number where you insert it in the RCSwitch.cpp file) and send(1332, 12) or send(2763, 12)

Please report if you succeed and describe in detail your brand and model. Maybe even with photographs or links to seller. It would be great if your could open your original remote and report which chipset it uses.

Martin-Laclaustra avatar Apr 16 '17 00:04 Martin-Laclaustra

very great ...

it works. the model is a "FAAC" fixed code, in Italy it is very common.

Please explain to me how did you determine the protocol? {330, {34, 1}, {1, 2}, {2, 1}, true} what do they mean? I could not understand ...

Thank you for your support ... faac-tm1-433

fntslz avatar Apr 16 '17 05:04 fntslz

Check: overall explanation of the signal: https://github.com/sui77/rc-switch/wiki/KnowHow_LineCoding#ev1527-rt1527-fp1527-or-hs1527 how the signal is encoded: https://github.com/sui77/rc-switch/blob/master/RCSwitch.cpp#L52 how it is encoded in inverted protocols: https://github.com/sui77/rc-switch/blob/master/RCSwitch.h#L128

Martin-Laclaustra avatar Apr 16 '17 07:04 Martin-Laclaustra

Hello, I'm sorry ... I read the first link ..but I have not understood ... maybe I'm stupid ... Kindly you explain it to you with the colors? 433

how you do the calculations? I can not understand, seeing the graph, to build the protocol ...

Can you explain to me step by step how you do?

Thank you very much,

fntslz avatar Apr 16 '17 17:04 fntslz

433signalsexplained @sui77 you might consider using this image in the wiki. Best

Martin-Laclaustra avatar Apr 16 '17 20:04 Martin-Laclaustra

..I'm sorry ... but still I can understand with the "330", how do you calculate ... ?? I made (400 + 612 + 744 + 264 + 400 + 612) / 6 = 505 ... definitely wrong ..where? Excuse me if I insist ... but I want to understand .. thanks.

fntslz avatar Apr 16 '17 22:04 fntslz

400 + 612 = 1012 744 + 264 = 1008 400 + 612 = 1012 752 + 260 = 1012 Every bit lasts aprox. 1012 us. Every bit is made of 2 units, one long and one short. It is unlikely that the long-short ratio is different (as data suggests) between on and off bits. Most probably it is the same. Let's estimate that ratio combining long lengths and short lengths of a "0" and a "1" type bits: (612 + 752) / (400 + 260) = 2.07 So each bit has 3 timing "ticks", 2 for the long part and 1 for the short part. 1012 / 3 = 337 ~ 330 An approach considering ratios of 1.5 for "0"s and 3 for "1"s would have made quite complex to find a minimum common pulselength for both. It would not have made sense that engineers would have designed the remote that way.

Martin-Laclaustra avatar Apr 16 '17 22:04 Martin-Laclaustra

OK thanks for the help. Now I have a transmitter, no brand, which transmits approximately every three seconds a string type here ... honestly can not costriure the protocol ... can you do it? ... unfortunately I have difficulty to understand how it works ... maybe it's my limit ... Thanks again for the availability via

fntslz avatar Apr 17 '17 07:04 fntslz

@fntslz #103

kiralikbeyin avatar Apr 24 '17 20:04 kiralikbeyin

Hello guys, I've been trying to get my tx signal for days. Unfortunately my tx is a rolling code ... The first 2 bytes are always the same .. the remaining length varies ... How could I get it to receive? Ideas or suggestions?

Thank you.

fntslz avatar Apr 26 '17 07:04 fntslz

Hi - can you help with decoding signal for MCE07 rc switch? This is 4 channel switch. Below signals for ch1 off and ch1 on. First 500uus is added by me manually. I see there is a long constant signal (for all channels and on/off function) - this is coded on last 16 pulses (before about 10100us break between repeat). I have problem with recognizing sync signal. Ch 2 on:

ch2_on

rafkacz avatar Apr 26 '17 13:04 rafkacz

Hello ... I can not help you. We look forward to help from Martin-Laclaustra . Bye

fntslz avatar Apr 27 '17 09:04 fntslz

I managed to decode it myself (MCE07). proto = { 350, { 10, 10 }, { 1, 1 }, { 1, 3 }, false }

It occured that fst 4 pulses can be ignored (when sending data). Code length is 41 bytes - last 9 bytes codes channel no and function.

There is problem with sending data due to 32 bit limitation of long used by RcSwitch. I added one func that sends code from char* without conversion to long.

	void RCSwitch::sendB(const char* sCodeWord) {
		
		if (this->nTransmitterPin == -1)
		return;
		
		#if not defined( RCSwitchDisableReceiving )
			// make sure the receiver is disabled while we transmit
			int nReceiverInterrupt_backup = nReceiverInterrupt;
			if (nReceiverInterrupt_backup != -1) {
				this->disableReceive();
			}
		#endif
		this->transmit(protocol.syncFactor);
		for (const char* p = sCodeWord; *p; p++) {
			
			if (*p != '0')
			{
				this->transmit(protocol.one);
			}
			else
			{
				this->transmit(protocol.zero);
			}
		}
	}

Its almost like RCSwitch::send(const char* sCodeWord) but without conversion to long and sync signal moved at begining of message.

The codes are:

                 1         2         3         4
       01234567890123456789012345678901234567890
                                       XXXXXXXX
Ch1 on 00101001011000001101011010011111100001111
Ch2 on 00101001011000001101011010011111010010111
Ch3 on 00101001011000001101011010011111110000111
Ch4 on 00101001011000001101011010011111001011011
Ch* on 00101001011000001101011010011111101001011

Ch1 on 00101001011000001101011010011111011110001
Ch2 on 00101001011000001101011010011111101101001
Ch3 on 00101001011000001101011010011111001111001
Ch3 on 00101001011000001101011010011111110100101
Ch* on 00101001011000001101011010011111010110101

Bits marked by X at top - codes channel no and function (fst 4 bits read from right to left - codes channel no - next 4 bits are negation of previous 4 bits). OFF codes are negation of On code. The last one bit - is the question - i had to add it to make it work...

Sending data works but - it is impossible to receive codes generated by original MCE07 RC due to fst 4 starting sync pulses.

Any ideas how to make receiving possible (how to filter out this 4 pulses starting sync signals)?

rafkacz avatar Apr 28 '17 15:04 rafkacz

I am glad that you are able to send signals. Sorry it is not easy to adapt rc-switch for protocols with something different from a single-sync-gap.

Martin-Laclaustra avatar Apr 30 '17 16:04 Martin-Laclaustra

Hello i'm not sure if i am doing this right or how to get all the info i need from the signal like Pulse and snyc info from this but i think i got the Binary right can some one look and give me the bit of info i might be missing remote

DFW-Noob avatar Jun 21 '18 20:06 DFW-Noob

Read: https://github.com/sui77/rc-switch/wiki/Add_New_Remote_Part_1

Anyway, it seems that you will not be able to use rcswitch to receive this remote, because it uses 2 sync bits. Also, for sending commands you will need to send a pre-programmed sequence of timings. You will not be able to use the single number that you decoded.

My branch transmittimingsarray described in https://github.com/sui77/rc-switch/pull/170 , https://github.com/sui77/rc-switch/issues/146 , and https://github.com/sui77/rc-switch/issues/163#issuecomment-330576310 is capable of sending an array of pulses and will probably be able to control your sockets or receivers.

Martin-Laclaustra avatar Jun 21 '18 21:06 Martin-Laclaustra

Thanks Martin-Laclaustra

Read: https://github.com/sui77/rc-switch/wiki/Add_New_Remote_Part_1 i followed that and thats how i got to the part about adding a new remote. due to nothing was showing up on the serial Monitor until i used simplercscanner

Anyway, it seems that you will not be able to use rcswitch to receive this remote, because it uses 2 sync bits. Also, for sending commands you will need to send a pre-programmed sequence of timings. You will not be able to use the single number that you decoded.

would you be able to point me in a better direction i have tried loading ProtocolAnalyzeDemo.ino

and i am getting the error and not sure how to correct it Serial.println((mySwitch.getReceivedLevelInFirstTiming() == 0) ? "down" : "up" ); exit status 1 'class RCSwitch' has no member named 'getReceivedLevelInFirstTiming'

DFW-Noob avatar Jun 21 '18 22:06 DFW-Noob

You can use the protocollessreceiver branch (you get details on how to download it correctly here: https://github.com/sui77/rc-switch/issues/103 ) but it will be of no use for your remote. Follow the links in my previous reply if you want to reach practical advances.

Martin-Laclaustra avatar Jun 22 '18 14:06 Martin-Laclaustra

Thanks i'm really trying to follow along and but keep hitting a wall. with the output i first posted i noticed there was the same code for the level i was looking for Example one decode i did i got 1100000010000000101001110101100011101111100 and it had a level setting of 99 110000001000000010100111010"1100011"101111100

what i am trying to do is capture the signal from a dog collar using an arduino like this https://gist.github.com/tkuester/67f2d8f5c03aee22c6d7

| ? | ? | ? | level | ? | | | | |00010100| | 0|10001000|01101010|10000000|00010100|11101110|0 <-- Shock? 0|10000001|01101010|10000000|00010100|01111110|0 <-- Vibrate? 0|10000100|01101010|10000000|00010100|11011110|0 <-- Blink? 0|10000010|01101010|10000000|01100100|10111110|0 <-- Beep?

so my output looks right i'm just not sure what and how to fully decode them and rebrod cast them back

DFW-Noob avatar Jun 22 '18 23:06 DFW-Noob

Sorry. This is completely unrelated to this issue. You can not use rcswitch to decode or rebroadcast codes for your signals. It is incompatible.

Martin-Laclaustra avatar Jun 23 '18 11:06 Martin-Laclaustra

do you know what would be compatible for what i need?

DFW-Noob avatar Jul 10 '18 06:07 DFW-Noob

Hi Martin,

can you help me to decode my remote? It's a FAAC @315mhz, but should be fixed code on the receiver side (because each remote it's programmed from it)

here is the three sample that I got (i've tried various time - pressing and hold the button at number 2 on Arduino serial - but don't have flat line at the start)

sample_1

i've just some high numbers (like 3000), here is a screenshot that highligth these numbers - don't know if there are a "Sync Number" (seems too short in the graph)

image

Hope you can help me.

Thanks in advance

stich86 avatar Aug 13 '18 14:08 stich86

Looks like: { 810, { 4, 4 }, { 2, 2 }, { 1, 1 }, false } Read the wiki: https://github.com/sui77/rc-switch/wiki/Add_New_Remote_Part_1 https://github.com/sui77/rc-switch/wiki/Add_New_Remote_Part_2

Martin-Laclaustra avatar Aug 15 '18 08:08 Martin-Laclaustra

Hi Martin,

Thanks for your response. So it’s not a 2-bit sync protocol? Because I’ve seen two times a big number before the sequence of command.

I’ll try today to add the suggested protocol on the cpp file and test it.

I let you know

Thanks again!

stich86 avatar Aug 15 '18 08:08 stich86

It doesn’t seem to work. I’ve added the suggested code to RCSwitch.cpp and loaded the ReceiverDemo on the Arduino, but pressing button on my remote doesn’t show anything on the serial monitor :(

i'm still not understand how do you have calulated that data. The wiki is not so clear.. also the example and pictures reports different numbers.

stich86 avatar Aug 15 '18 11:08 stich86

  1. Read the wiki links above. Do ALL that it says there before posting again.
  2. Learn how long is your code.
  3. Translate your signal in 0s and 1s, manually. (I already gave you the decoding interpretation in my previous post).
  4. Try to replicate transmission before trying to receive.
  5. If any, post numbers, not images.

Martin-Laclaustra avatar Aug 16 '18 12:08 Martin-Laclaustra

Hi Martin,

I've readed the wiki but some parts are not very clear like 15th.

I've sample five times my code, this is one of the sample that looks like the other one:

820,808,844,780,840,1604,1648,1596,1656,1592,1632,1620,1656,3216,3280,1596,1636,1616,1656,784,828,796,844,1592,1652,1600,1636,1612,1660,1600,1652,776,836,800,832,1600,1628,1616,1660,780,828,800,840,1596,1656,780,848,780,824,1612,1660,1600,1648,780,844,792,832,1596,1640,1612,1652,1608,1644,780,844,792,828,788,844,780,828,1612,1656,1600,1652,1592,1648,1600,1644,3232,3280,1600,1644,1604,1636,812,832,788,840,1600,1644,1596,1648,1604,1640,1612,1652,784,824,800,848,1592,1644,1608,1640,808,832,784,844,1600,1652,776,848,788,824,1604,1648,1604,1656,780,820,808,840,1596,1648,1604,1644,1608,1656,780,820,804,844,780,848,784,828,1604,1644,1608,1660,1604,1640,1592,1648,3236,3280,1604,1648,1592,1640,800,844,780,836,1600,1656,1608,1644,1596,1644,1608,1648,800,828,788,844,1604,1648,1592,1640,800,840,784,840,1596,1660,780,820,812,840,1592,1640,1612,1652,796,832,784,844,1600,1652,1596,1636,1616,1660,792,824,792,840,784,828,804,840,1592,1640,1612,1660,1592,1656,1596,1656,3232,3276,1596,1652,1596,1652,784,844,784,824,1612,1656,1604,1648,1596,1664,1592,1632,808,840,788,840,1604,1648,1596,1656,780,848,780,820,1620,1656,780,832,796,844,1592,1656,1596,1632,808,840,784,848,1604,1644,1596,1656,1596,1636,808,836,784,844,784,824,800,844,1592,1660,1592,1636,1616,1660,1604,1648,3220,3260,1616,1656,1608,1648,780,840,800,820,1600,1636,1616,1660,1604,1648,1592,1648,792,840,784,828,1612,1656,1604,1644,784,840,796,820,1604,1640,808,832,784,844,1600,1652,1596,1644,788,848,780,828,1612,1656,1600,1652,1592,1644,792,848,776,828,808,836,784,844,1604,1644,1592,1648,1608,1644,1608,1652,3224,3268,1608,1652,1600,1656,780,828,804,840,1592,1644,1608,1652,1600,1656,1604,1648,780,848,784,824,1612,1640,1608,1660,776,824,812,836,1592,1640,800,840,784,836,1604,1652,1604,1648,784,840,784,824,1612,1648,1604,1656,1600,1652,780,840,784,828,800,840,784,844,1596,1656,1600,1652,1592,1640,1612,1656,3220,3280,1596,1636,1616,1656,796,824,788,852,1592,1652,1596,1636,1616,1668,1588,1656,776,832,804,840,1588,1644,1608,1664,784,828,792,844,1592,1660,780,844,780,828,1612,1660,1600,1652,776,840,800,832,1596,1636,1612,1660,1600,1656,776,836,800,832,784,848,776,832,1608,1660,1604,1648,1592,1660,1596,1632,3240,3288,1592,1656,1596,1636,808,840,784,848,1600,1648,1592,1656,1592,1636,1620,1660,776,824,800,844,1592,1656

transpose this code on XLS (and in the site that create the wave), show me there are only two high number (> 3000) and two groups formed by numbers that are between 1500-1700 and 700-900. The first thing that i'm missing is the pulse lenght (it's not specified very well on the wiki how to obtain). Look at your suggestions, the number is the average from the big number after the sync bit and the small number. It give me about 804, that you have translated to 800.

Regarding sync bit, in your suggestion you have put "4, 4", that look at the wave seems right (because a single wave seems formed by 4 small waves). For 0s bit you have put "2, 2" that like the sync bit are formed by 2 small waves on up and on down (the first two "1600" values), the last is 1s bit that seems formed just only a single small wave (and you have put "1,1").

So what i'm missing? Until the end of next week I cannot test this code because i don't have another Arduino here with me or my gate to open. But I was surprised that rc-switch library cannot detect the binary code

Thanks in advance for any help.

stich86 avatar Aug 17 '18 13:08 stich86