andreyk0 / arduino-woods-13569-433mhz-remote-control

Control Woods 13569 RC outlets with arduino
GNU General Public License v2.0
3 stars 1 forks source link

Porting to other channels #1

Closed dkisselev closed 9 years ago

dkisselev commented 9 years ago

Hi Andrey,

I'm wondering how you reverse-engineered the protocol to get the outlet code sequences for the channel F modules that you have.

I'm looking at getting a set of the same controllers and would like to figure out the protocol for whatever channel I end up receiving. I'd be happy to PR the code back to your repository once I get it figured out.

Thanks!

andreyk0 commented 9 years ago

I happen to have a logic analyzer ( https://www.saleae.com/ ), so it was pretty straightforward to get the timing sequences. If I didn't have it, I'd probably attempt to build a primitive version of it using arduino itself, feeding pulses to 'hardware interrupt'-enabled pin (e.g. INT0) and capturing relative time offsets in memory, to be dumped over serial. I vaguely remember someone's blog post mentioned something like that, so it's definitely possible but fiddly.

dkisselev commented 9 years ago

I had the feeling you would have used a saleae :+1:

I don't have one, but I did end up finding this other project where they plugged the receiver output into an audio port and use Audacity to record the bitstream:

https://github.com/charleswolfe/lights

Thanks, I'll post my codes if I get around to generating them.

dkisselev commented 9 years ago

So I got my outlets and RF units in today, got everything up and running and the codes measured. I'm going to be using a Raspberry pi for control instead of an Arduino, but I did use an Arduino to test everything and got the codes for Channel D:

// Channel 'D'
static const uint16_t woods_remote_outlet_codes[NUM_CODES] = {
  /* code1on  */ 0B0110100010000001,
  /* code1off */ 0B0110100001000001,

  /* code2on  */ 0B0110100000100001,
  /* code2off */ 0B0110100000010001,

  /* code3on  */ 0B0110100100000001,
  /* code3off */ 0B0110101000000001
};

The library doesn't currently have a way to switch between channels, so that might be an option to work in, for testing I just commented out the Channel F section. (I'll write the proper switching code in if I end up using the Arduino, but not for now)

Mine was also a 315mhz module, which contradicts with the repo title, but I've seen people that have both. The exact frequency is specified in the paper manual that comes in the Woods package.

andreyk0 commented 9 years ago

Cool, thanks! Glad you've got it working. Sorry, I've been offline for a while. I'll get your codes in when I have a chance.

andreyk0 commented 9 years ago

Finally got a chance to take a look, re-organized lib for multi-channel support and included your codes, thanks!