First of all, thank you for all your participation , I'm new here and I thought that may someone could help me with this "problem".
Some time ago I bought some plug adapters controllable through a control in the frequency of 433 Mhz.
(Typical that come with 4 units and with the control you choose whether to turn on/off the device A, B, C, D or all.)
Well, the fact is that I was investigating on the Internet to try to record the signal and be able to play it from a device type arduino / raspberry.
After searching, I found the following link:
https://github.com/sui77/rc-switch/wiki/Add_New_Remote_Part_1
Where they explain procedure and why it works that way...
From there I extracted that when a signal is sent from the control to the receiver, this signal consists of a synchrony bit (so that the receiver knows that it gets a signal that it must "understand") followed by a string of bits that tell it what to do (if this is not correct, please correct me).
Once I understood this, I set out to record my "A" device ON signal.
Effectively I could see the synchrony signal, followed by 24 bits with the information that should arrive to the receiver...but after preparing the script to send the signal, this didn't do anything...
I re-recorded the signal, and this time fixing myself with more detail, I saw that after sending 4 times the same pattern of 24 bits (preceded by its synchronization signal), this one sent another "kind" of synchronization signal followed by another 24 bits...
In other words, finally my sending signal of device A, is composed by:
part 1 -> (1 synchronization bit + 24 message bits)
+
part 2 -> (1 synchronization bit + 24 message bits)
(both different parts, of course..)
Now, by sending them two signals one after the other, device A turns on correctly
But...if I ONLY send the second part, it also turns on... <- This is my first question, why?
Once I got here, I thought about what could be happening, why did it work without sending the first part of the signal?
And I realized that these adapters are of "variable identification", that is:
When you plug in the adapter the first time, it flashes waiting to be "set" as device A, B, C, or D. So when you press ON or OFF on the remote, it is set as a device with that identification. This allows the devices not to be "pre-assigned" with a letter, so that when you plug it in for the first time, you can go assigning the identification to each one.
Well, this being so, I thought: The first part of the signal I'm sending has to be the identification of the device, that is, the signal being sent is saying:
synchrony + "THIS IS FOR THE DEVICE A" + synchrony + "TURN ON".
In this way only device A will be turned on...therefore...in the signal to turn device A OFF, part 1 should be the SAME as part 1 of the signal to turn device A ON.
But NO, the first part of the turn OFF device A signal does not match the turn ON signal...but equally, the second part of that signal turns off the device...
How is this possible? <- This is my second question...
I'm just an amateur and I can not think of anything to resolve these doubts, so I have found the forum and hope to elucidate a little of this issue ...
Many thanks in advance to all and a greeting!
Some time ago I bought some plug adapters controllable through a control in the frequency of 433 Mhz.
(Typical that come with 4 units and with the control you choose whether to turn on/off the device A, B, C, D or all.)
Well, the fact is that I was investigating on the Internet to try to record the signal and be able to play it from a device type arduino / raspberry.
After searching, I found the following link:
https://github.com/sui77/rc-switch/wiki/Add_New_Remote_Part_1
Where they explain procedure and why it works that way...
From there I extracted that when a signal is sent from the control to the receiver, this signal consists of a synchrony bit (so that the receiver knows that it gets a signal that it must "understand") followed by a string of bits that tell it what to do (if this is not correct, please correct me).
Once I understood this, I set out to record my "A" device ON signal.
Effectively I could see the synchrony signal, followed by 24 bits with the information that should arrive to the receiver...but after preparing the script to send the signal, this didn't do anything...
I re-recorded the signal, and this time fixing myself with more detail, I saw that after sending 4 times the same pattern of 24 bits (preceded by its synchronization signal), this one sent another "kind" of synchronization signal followed by another 24 bits...
In other words, finally my sending signal of device A, is composed by:
part 1 -> (1 synchronization bit + 24 message bits)
+
part 2 -> (1 synchronization bit + 24 message bits)
(both different parts, of course..)
Now, by sending them two signals one after the other, device A turns on correctly
But...if I ONLY send the second part, it also turns on... <- This is my first question, why?
Once I got here, I thought about what could be happening, why did it work without sending the first part of the signal?
And I realized that these adapters are of "variable identification", that is:
When you plug in the adapter the first time, it flashes waiting to be "set" as device A, B, C, or D. So when you press ON or OFF on the remote, it is set as a device with that identification. This allows the devices not to be "pre-assigned" with a letter, so that when you plug it in for the first time, you can go assigning the identification to each one.
Well, this being so, I thought: The first part of the signal I'm sending has to be the identification of the device, that is, the signal being sent is saying:
synchrony + "THIS IS FOR THE DEVICE A" + synchrony + "TURN ON".
In this way only device A will be turned on...therefore...in the signal to turn device A OFF, part 1 should be the SAME as part 1 of the signal to turn device A ON.
But NO, the first part of the turn OFF device A signal does not match the turn ON signal...but equally, the second part of that signal turns off the device...
How is this possible? <- This is my second question...
I'm just an amateur and I can not think of anything to resolve these doubts, so I have found the forum and hope to elucidate a little of this issue ...
Many thanks in advance to all and a greeting!