-
Notifications
You must be signed in to change notification settings - Fork 662
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conrad RS-200 Sockets / Europe Supplies Ltd. RS-200 #231
Comments
Telegram structure The telegram has a length of 26 bits The telegram packet (telegram+silence) is repeatedly being sent as long as the button is pressed down. Wall mount transmitters only have four buttons for the four channels. I have not personally investigated them yet, but would guess, they only send the TOGGLE signal. So lets further digg into the telegram. The following screenshot shows the OFF action of Button no. 3 from a transmitter (actually my code that I simultaniously sent and received at the same time) with a transmitter-code of 3-4-2-4. this can be cut into the following pieces:
Header Transmitter code Parity bit Button pressed Action Checksum The telegram finishes with a checksum of six bit. The checksum (naturally) differs between ON and OFF but is always identical for OFF and TOGGLE. sidekick Calculation of the checksum uses the following elements: Yes, button two and three get values "ten" and "eleven" and not 0b10 and 0b11 (didn't I say it gets dirty). TRANSMITTER CODE : now from left to right, zero based (1-2-3-4 --> 0-1-2-3 or 1-1-1-1 -> 0-0-0-0) CheckSum = ( BUTTON + TC1 + (TC2 * 4) + TC3 + (TC4 * 4) + (ACTION * 0x0C) ) & MASK Using that on my example: CheckSum = (11 + 2 +(34) + 1 + (34) + (1 * 0x0C) ) & 0x0F = 0b000010 = 2 Weird, but the correct answer. So that's to the protocol. Let me know if there are questions. regards Frank |
Code Just compile, upload and open the serial monitor. Now You should be able to control any of these RS200 Sockets with a six digit code The code is TransmitterKey+Button+Action. i.e. 123421 in order to switch a socket ON that has learned button no.2 of key code 1234. By the way, this way sockets can also learn codes for transmitters You don't have set up. Github refuses my zipped upload so here it is in plain text:
HTH regards Frank |
You may improve your interpretation (and even try to make it work with rcswitch) with the following hints:
|
Martin, Concerning Sync / data: I'll start playing with rc-switch and see how I get along. regards Frank |
That is common among sockets of the same brand.
No. That is not how rcswitch works.
It actually is.
You need at least one repeat to have a transmission detected. That is how rcswitch identifies a signal... by the gap length (and you have no gap if you have no signal before). We do not know if all sockets rely on these same method for detection, but using it to create the signal does work!
who cares...
I don't think so. |
Hacking the SocketAs mentioned earlier, it is pretty easy to "hack" the socket and misuse it as a 433MHz receiver in case You need one better than the el cheapo MX-RMs. No, I will not put a five page disclaimer here, telling You that mains power can be lethal and that You will be getting damn close to that mains power if You open the socket. However, I'd like to draw Your attention to the fact that there is no galvanic separation between the high and low voltage parts. How come? Mains power normally has two wires (plus a third ground in case of metal enclosures), phase (the one that "bites") and neutral. Neutral and Ground can be seen as one (in older houses like ours they are in fact tied together). Directly connecting phase to neutral or ground shorts the circuit and blows up the fuse or the weakest parts in line. Now to our RC-200. The low DC voltage is derived from mains AC high voltage via resistors and some rectifiers but not galvanically separated. As it can be plugged in either, way it is possible, that DC ground (-) is (more or less) directly connected to mains phase. Ground of Your Oscilloscope or USB-Port however ist connected to mains ground. Thus connecting the ground probe to DC (-) might short the circuit as if You connected phase directly to ground. So make sure to plug in the RC-200 in a way that phase is on the switched side (the right side with my version) and do NOT use the ground probe unless You know what You are doing. If plugged in correctly You will still see the signal, as all devices share common ground. If You measure the voltage between the pads marked + and - with Your battery powered (!!) volt meter You should read something between 1.5 and 3 V depending on the "noise" and the latency of Your meter. If so can connect Your oscilloscope or logic analyzer with one probe to the pad marked + Pressing a button on the transmitter should bring up something like this: You see the wavy modulation onto 50Hz mains. Logic analyzer works as well (also no ground probe) The signal is not limited to Conrad RS-200 transmitters. You will measure the raw 433MHz signal and the socket can work as a basic receiver. As they say: Don't try this at home! or do it at Your own risk. |
try: I think rcswitch should be separated in diferent "levels". One to deal with the transmission (hardware), one to deal with the encoding (what is called "protocols"), and one to deal with the brands and the translation between the socket "settings" and the way the actual codes that must be sent are generated (functions ".switchOn" and alike). |
Yes, baby steps :-)
Meanwhile I've created a list of all possible 3840 combinations, easy to read and with all necessary information. Human readable as well as compact binary and split binary. Code and checksum also in octal values. The codes have been created on the micro controller and reported back via serial. I've done it for current assumption (short pulse = logical one) as well as for the inverted variant (long pulse = logical one). After that, I randomly picked ON-codes and tested them against a socket (ON is necessary for a socket to "learn" the code) and switched it OFF again with the corresponding OFF-code. The validated codes have been added to a third list. RS-200_AllCodes.txt regards Frank |
Martin, first test with RC-Switch. I've added a new protocol to my local copy with the following settings:
and created a simple test sketch
... and it toggles through all four switches, then switches all on at once and off again after 3s. This way it is now sending 27 bits, as I do send the full 26 bits and have an additional "0" included in the sync bit. Later I would just omit the first bit of the header. That's for the first tests :-) regards Frank |
I've created a simple demo that works with the current RC-Switch class and uses codes from my list of codes.
RemoteSwitch_433_RS200_rc-swithch_Demo.zip It does not use the upClick or toggle, but normal outlets don't seem to care. Frank |
Good job! |
The code works, my plugs are switching and I'm so happy. Many thanks to both of you. As I wrote in the other issue I had a broken, not properly contacted jump wire so I guess I would have had better results sooner when the sender module would have been sending all the time I tested. |
perfect :-) |
Sometimes it's hopeful to check a different solution to a given problem. https://github.com/messlinger/mbug_devel/blob/master/py/mbug_dev/mbug_2151_target.py |
I'm currently working with older remotes and sockes of type RS-200 from Conrad.
I have several of them and in one of the boxes I found a receipt from 2003. So they're 15 years old (It's May 2018 as I write these lines).
Still, they seem to be quite reliable (though not beeing used for serval years) and I have around 15 of them. The system also came with wall mount switches and special receivers for overhead lights were available. Besides ON/OFF switches, dimmable sockets were available as well.
If one of the sockets appears to be dead it's likely just the bigger 22.2kOhm resistor that quit service after working as a "heating element" for several years. A really easy and cheap repair.
The buttons of the transmitter can be revived in most cases by removing the "crispy frog" cover - which is not soldered and cleaning the contacts.
Finally, the socket can be "hacked" quite easily and used as a receiver.
The transmitter has a four digit code which has to be / can be freely chosen after entering the batteries. So there are no switches or jumpers to set that code permanently. Likewise the sockets have to learn this code after each power down. It's a process of seconds, but has to be done if You remove the socket from the mains for more than 30 seconds. This gives You the freedom to easily change how things work together but can be annoying after a power down.
I've been struggling with the protocol as I was using a poor receiver which gave me reasonable results with another type of transmitters, but garbage with the conrad ones.
(see issu #228 post 3).
Most of the decoding has been prepared years ago by two guys in a German forum (https://forum.fhem.de/index.php/topic,12286.0.html See posts by RxTs and BeRo). So the credit goes to them. I just put the bits together, solved a few quirks and made it work in a micro controller like an arduino.
I'm not sure if I should integrate the new protocol into rc-switch as it differs from the others, would require additional methods and will probably not have a huge demand. Maybe add it as an option which can be included/excluded with define statements. I will however post my findings here, so that all the information is available.
Just let me know, what You think.
Frank
The text was updated successfully, but these errors were encountered: