User talk:Chrisw

Welcome
Hi, welcome to Home Easy Hacking Wiki! Thanks for your edit to the File:He txrx 1.jpg page.

If you need help, and there are no local admins here, you may want to visit the forums on the Community Central Wiki -- Uberfuzzy (Talk) 13:25, 2010 April 2

Can't compile/upload HEManager to Arduino
Hi Chris,

I've just been trying to get your HE Manager code to run run on Arduino setup (basically the same as yours but built out onto a proto shield). However, when I tried to compile/upload it, I get the errors below?
 * BBSBv2_01:30: error: 'RxDataClass' was not declared in this scope


 * BBSBv2_01:30: error: 'd' was not declared in this scope


 * BBSBv2_01:45: error: 'int readPacket(RxDataClass*)' redeclared as different kind of symbolBBSBv2_01:30: error: previous declaration of 'int readPacket'


 * BBSBv2_01.cpp: In function 'int readPacket(RxDataClass*)':


 * BBSBv2_01:231: error: 'int readPacket(RxDataClass*)' redeclared as different kind of symbolBBSBv2_01:30: error: previous declaration of 'int readPacket'


 * BBSBv2_01.cpp: In function 'void loop':

Any ideas? I've updated to the latest Arduino V21 IDE, I've tried embedding the header into the code and various other things, but I get these errors every time. I can see the RxDataClass in the code, but still I get the error. Using two separate lumps of code (from http://martgadget.blogspot.com) I can transit HE codes to wall sockets and I can receive HE codes from a remote using the hardware. But I need to be able to do both as your code does, I just can't get it compile...
 * BBSBv2_01:467: error: 'readPacket' cannot be used as a function

Any help greatly appreciated.

Vster 15:21, October 26, 2010 (UTC)

Do you have 'hemanager.h' visible in a second tab inside the IDE? I think this is necessary as well as the #include line in hemanager.pde.

Otherwise it should be possible to put the struct definitiion inline in the hemanager.pde - although I just tried it and got the same compile errors as you. I will have another look at this now...

202.36.179.68 21:51, October 26, 2010 (UTC)

OK, the Arduino preprocessor is dumb, so to get it to work inline do this:

1) remove #include line

2) add this to the top of hemanager.pde

struct RxDataClass { char group; int unit; int cmd; char cmdStr[4]; char raw[26]; };

3) change two references to 'RxDataClass' to 'struct RxDataClass'

I don't have the hardware with me to test it but this seems to compile OK

202.36.179.68 22:25, October 26, 2010 (UTC)

That fixed it!
That fixed it! Compiled and uploaded first time.

Transmitting works perfectly, just need to modify my shield a touch as I've got the receiver connected to a digital pin, then give it that a test. :)

I'm going to rewrite your Perl scripts a touch, as I'm going to be using MisterHouse to the control the BBSB/Arduino interface, in a bid to replace all my X10 kit.

Shall drop the MisterHouse code in here when it's done?

00:25, October 30, 2010 (UTC)

Just one final PS, how long a piece of wire did you use for the antennas of the Tx/Rx modules? I've been googling for hours and can't find a sensible answer anywhere!

Adding New Device Support and Using the Receiver
Hi Chris

Thanks for your excellent article, I've managed to build the controller and have a Linux box switching things on and off! However, the receiver element of the project doesn't seem to do anything - can you tell me how this is meant to work?

I also have some older HE devices that don't work with this controller and I'm wondering if you can give me any tips on how to "sniff" the protocol and adjust your code so that it might work with these too?

Cheers!

Graham.

GrahamH68 23:47, April 13, 2012 (UTC)