-
Notifications
You must be signed in to change notification settings - Fork 667
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
Silvercrest switch with remote control (LIDL) #189
Comments
Use this to record better information from your remote: |
@Martin-Laclaustra thank you so much for your help! Thank you again ! |
@zyronman |
@Martin-Laclaustra you're 100% right. I will post everything I have this weekend. |
I am playing with a Chacon switch that looks pretty identical to yours.https://i2.cdscdn.com/pdt2/6/6/1/1/700x700/cha54661/rw/chacon-kit-de-2-prises-telecommandees-on-off-avec.jpg |
I have a really similar looking remote that I got from Aldi that I am having issues with. Is there steps on how to use simpleRC or read the output of it? Do I press the button while the countdown is happening or after its finished? Here is my timings for A on (held down the button while the countdown was finishing) Would appreciate any pointers
|
Dear guys, I'm really sorry for the delay, I didn't have time to answer before. As I explained on my first post, I tried to recognize the signal using the ReceiveDemo_Simple sketch. It gave me a 24 bits signal result. Complete signal : Important part of the previous signal : If someone wants to investigate and integrate it to the lib, I will be available to provide all the tests and details. @witnessmenow : I recommand to start pressing the button before the fifth countdown and release it when you're sure the program finished. |
Hi @zyronman Did you find a solution to control a SilverCrest switch. |
Hello, The SilverCrest code is made by 2 different protocols. The firs is used for the beginning 24 bits and the second for the ending 32 bits. The first is difficult to set in RCSwitch, the closer I can compute is: { 186, { 2, 12 }, { 2, 5 }, { 6, 2 }, false }. The second is exactly: { 500, { 1, 14 }, { 1, 3 }, { 3, 1 }, false }. To turn it on/off you need to write the following code (after updating RCSwitch with protocols 13 and 14 written above): [...] To detect the codes (data[0] and [1]), I used a logical analyzer linked to my remote base band signal. It can be also used a 433MHz receiver (like RXB6) if you do not want to disassemble the remote. For each button push the remote send one out of four different codes. It is enough to save one of them, then send always it to the switch. I think the purpose of this strange strategy (2 protocols and 4 codes) is just avoiding to be cloned by a simple self-learning remote. The last step is understanding the code logic in order to make them without the need to copy from a remote. I noticed different remotes have different codes. They are store in the not volatile memory because are retained for days without battery. All remote codes can be computed by one because the switch learns just the on button and then it recognizes also the all-on buttons. I am still working on this puzzle. Good luck, |
Hi @simonepernice, |
Anyone got it working? I bought one recently and I'm unable to decode this. I don't have a logic analyzer to check the packages. This is an output example of pushing the (A) button On and Off:
And when pushed multiple times, return different decimal codes. This is a nightmare. |
I got it working with my remote but still don't understand the code. From what I remember the code for the button rotates between 4 different codes. My remote and remotes of other people in this thread have 24Bit codes but you seem to have 32Bit. Maybe you have different version? Could you please post output of pushing each button 5 times in this order 5xA_on, 5xA_off, 5xB_on, 5xB_off, 5xC_on, 5xC_off, 5xD_on, 5xD_off, 5xMASTER_on, 5xMASTER_off? |
About the remote:
BUTTON A-ON (x5)
BUTTON A-OFF (x5)
BUTTON B-ON (x5)
BUTTON B-OFF (x5)
BUTTON C-ON (x5)
BUTTON C-OFF (x5)
BUTTON D-ON (x5)
BUTTON D-OFF (x5)
BUTTON MASTER-ALL-ON (x5)
BUTTON MASTER-ALL-OFF (x5)
|
@darkbox Your code rotates between 2 different codes. This means that the remote can produce only 20 unique codes. Last four bits will tell you the button and action is cherrypicked from convenient bits based on the button.
Still don't know what the rest of the message means but at least we can decode it like this: #include <stdint.h>
#include <stdio.h>
// 00 01 02 03 04 05 06 07 08 09 10 11
int buttonMap[] = { 3, 99, 99, 0, 99, 1, 99, 99, 99, 4, 99, 2 }; // 99 is invalid value
int actionMap[] = { 16, 28, 11, 9, 11 };
char* buttonName[] = {
"A", "B", "C", "D", "ALL"
};
// we will test it here
int main(void) {
uint32_t testData[] = {
618491283, 3234986707, 3359271123, 3359271123, // Button A
273844117, 3744201941, 38598357, 2799660949, // Button B
3135175067, 3417090523, 1216381339, 3980271835, // Button C
4629104, 1652398656, 1786562624, 2226982256, // Button D
2137748889, 1250010585, 2189688281, 3469909657 // Button ALL
};
for (int i = 0; i < 20; i++) {
uint32_t data = testData[i];
// decode button
int button = buttonMap[data & 0x0F];
// decode action
int action = (data >> actionMap[button]) & 1 ^ (button == 4);
printf("Button %s %s (%u)\n",
buttonName[button],
action ? "ON" : "OFF",
data
);
}
return 0;
} Output of this program should look like this:
The important part of this code is: int buttonMap[] = { 3, 99, 99, 0, 99, 1, 99, 99, 99, 4, 99, 2 }; // 99 is invalid value
int actionMap[] = { 16, 28, 11, 9, 11 };
// decode button
int button = buttonMap[data & 0x0F]; // This line will only work for valid values (0, 3, 5, 9, 11)
// decode action
int action = (data >> actionMap[button]) & 1 ^ (button == 4); Maybe you will want to add some check to handle invalid data (valid values for |
Firstable, thank you for taking your time to help me :-) really appreciated! Well, you figured out more than I did. I did tried XOR some of the codes but didn't realized any patterns so this can help me a lot on forward, but my big question is: Shouldn't be as simple as just transmitting the same code again from Arduino? What am I missing here? I've tested sending the same code as: mySwitch.send(618491283, 32); or mySwitch.send("00100100110111010110110110010011"); but it doesn't work and point out that is was configure as protocol |
@darkbox I have good news for you. Today I had time to look at the raw data on oscilloscope and now I understand why it isn't working for you and how to fix it :). The remote sends 6x 24bit code and then 4x 32bit code. Your program only shows the 32bit code but outlets only respond to 24bit code. I will write some program that will be able to receive both codes and then transmit the one you need. I will post it here hopefully this week. It will be useful for me too because by comparing codes from both remotes I would be able to learn more about this wireless protocol. |
@rasic Wow that would be awesome! |
Hi @rasic, just checking if you did manage to make any advancement :) PS: If you are on vacations or something feel free to ignore me ;) |
Hi, I can confirm what @darkbox and other have written. The remote controller sends 6 * 24bit + 4 * 32bit code within a single button press. The RC cycles 4 different 24bit values and 2 different 32bit values for each button. You need to use any 24bit value to control the socket, the 32bit values are irrelevant. For example, button "A-On" sends these values:
To received the 24 bits values, you have to slightly modify RCSwitch.cpp, otherwise you'll get only 32bit values.
With the 2000, you'll get both 24bits (it corresponds nearly to the default protocol 4) and 32bits. For better detection you should add or modify any of existing protocol definition:
First line is for 24bit values, second line for 32bit values. You don't need to modify RCswitch sources if you'll only use it for transmittion. Use the default protocol 4, works fine with following code.
Just select one of four 24bit values (one for "On" and any one for "Off"), there is no logic with value cycling at all. I've tested with RCSwitch 2.6.4 and ESP8266. The RC cotroller is:
Simplified log / button values I received:
|
Thank you for your great work! I've just sniffed these 6x 3 bytes + 4x 4 bytes and was wondering what do they mean. My guess is: There are two different plugs using the same controller (maybe older and newer). Last four bits of 32bit code are button IDs too. |
Dear All,
I'm trying for several days to control a SilverCrest switch using an ESP8266 a MX-FS-03V module and a MX-05V module to record the signals.
Each button gives me 3 differents signals (exemple button A ON) :
Decimal: 16211228 (24Bit) Binary: 111101110101110100011100 Tri-State: 11F1FF1F0F10 PulseLength: 101 microseconds Protocol: 3
Raw data: 7216,960,576,956,580,952,580,952,1076,444,320,1208,320,1200,1088,444,324,1208,1080,448,316,1204,452,1080,444,320,1212,316,1208,1080,456,308,1212,316,1208,448,316,1212,1076,456,1072,456,1076,444,320,1216,312,444,1092,
Decimal: 15866204 (24Bit) Binary: 111100100001100101011100 Tri-State: not applicable PulseLength: 101 microseconds Protocol: 3
Raw data: 308,1220,1068,448,1080,452,316,1208,320,1216,1072,456,308,316,1216,316,2344,1080,452,1076,452,1076,448,1080,452,1076,456,464,304,1220,1068,456,1072,456,312,1220,1068,456,312,440,1088,952,584,948,592,432,1092,440,1088,
Decimal: 16737708 (24Bit) Binary: 111111110110010110101100 Tri-State: not applicable PulseLength: 101 microseconds Protocol: 3
Raw data: 312,1208,1080,464,304,1212,1212,1080,448,1080,452,312,1208,320,1212,320,2344,1080,452,1076,316,1204,324,1208,1080,444,324,1208,1080,448,316,1212,1080,452,1080,960,572,960,592,428,1092,948,588,948,576,444,1084,448,1096,
As the pulseLength is 101, I changed the RCSwitch.cpp file :
{ 350, { 1, 31 }, { 1, 3 }, { 3, 1 }, false }, // protocol 1
{ 650, { 1, 10 }, { 1, 2 }, { 2, 1 }, false }, // protocol 2
{ 101, { 30, 71 }, { 4, 11 }, { 9, 6 }, false }, // protocol 3
{ 380, { 1, 6 }, { 1, 3 }, { 3, 1 }, false }, // protocol 4
{ 500, { 6, 14 }, { 1, 2 }, { 2, 1 }, false }, // protocol 5
{ 450, { 23, 1 }, { 1, 2 }, { 2, 1 }, true } // protocol 6 (HT6P20B)
I could reproduce the same signal (Binary, PulseLength, Protocol) checking an comparing it with the receiver module but it doesn't switch on my device.
Do you have any idea of how I can solve it or progress in my goal? I attach a record done with the arduino serial plotter (as I don't have an oscilloscope) just in case it could gives you an idea of the kind of signal.
Many thanks in advance for your help!
The text was updated successfully, but these errors were encountered: