schemon / homeeasyhacking

Automatically exported from code.google.com/p/homeeasyhacking
0 stars 0 forks source link

Library not working with Arduino 1.0 #7

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I am using arduino 1.0 and the library isn't working correctly. Initially it 
wouldn't compile at all because of the #include "WProgram.h". I changed that to 
Arduino.h and it would compile, but it wouldn't detect any signals from my 
H100. 

I know my RF receiver is working as I have tested it

Original issue reported on code.google.com by targett...@gmail.com on 2 May 2012 at 1:51

GoogleCodeExporter commented 8 years ago
I've just tested this, and have found the same problem - for some reason the 
library will not receive successfully using Arduino 1.0 (whereas it works 
perfectly with Arduino 0022).

I'm looking into it...

By the way, have you tried sending signals (if you have a transmitter as well), 
as I have found this still works.

Regards,
Nathan

Original comment by nbur...@gmail.com on 25 May 2012 at 8:49

GoogleCodeExporter commented 8 years ago
I needed to receive to get the controller id so I haven't tried any sending. 
But thanks for looking into this.

Chris.

Original comment by targett...@gmail.com on 26 May 2012 at 4:38

GoogleCodeExporter commented 8 years ago
Chris,

I finally have a fix!  After spending far too long looking at the details of 
the receiving code, and wondering what on EARTH could have changed in Arduino 
1.0 to break it...

I'm sure nobody cares, so to cut a long story short: the changes to 
Serial.print() (presumably the change to asynchronous) seem to be the cause of 
breakage - so the library itself is fine, but the demo handlers broke it!

I attach a version that works for me using Arduino 1.0.1 on my Mega2560.  The 
simple protocol is reliable, the BBSB2011 protocol not so much so I'll continue 
to play around with that in issue #8.  I don't have any advanced protocol 
devices, so am afraid I cannot check this.

Please let me know whether you have any joy with this version!

Regards,
Nathan

Original comment by nbur...@gmail.com on 13 Jun 2012 at 9:23

Attachments:

GoogleCodeExporter commented 8 years ago
Hi Nathan,

I could not get it to compile, got the following errors in Arduino 1.0.1 IDE 
using Arduino Duemalove 328

HomeEasy.cpp: In member function 'void HomeEasy::initSending()':
HomeEasy.cpp:71: error: 'DDRL' was not declared in this scope
HomeEasy.cpp:71: error: 'PINL1' was not declared in this scope
HomeEasy.cpp: In function 'void __vector_11()':
HomeEasy.cpp:384: error: 'PORTL' was not declared in this scope
HomeEasy.cpp:384: error: 'PINL1' was not declared in this scope
HomeEasy.cpp:386: error: 'PORTL' was not declared in this scope
HomeEasy.cpp:386: error: 'PINL1' was not declared in this scope
HomeEasy.cpp:429: error: 'PORTL' was not declared in this scope
HomeEasy.cpp:429: error: 'PINL1' was not declared in this scope
HomeEasy.cpp:431: error: 'PORTL' was not declared in this scope
HomeEasy.cpp:431: error: 'PINL1' was not declared in this scope
HomeEasy.cpp:483: error: 'PORTL' was not declared in this scope
HomeEasy.cpp:483: error: 'PINL1' was not declared in this scope
HomeEasy.cpp:485: error: 'PORTL' was not declared in this scope
HomeEasy.cpp:485: error: 'PINL1' was not declared in this scope

Regards

Gary

Original comment by gb.uk.ma...@gmail.com on 14 Jun 2012 at 6:12

GoogleCodeExporter commented 8 years ago
I got the same problem, it comes from HomeEasyDefines.h where there is a series 
of IFs about the board. For some reason it doesn't work correctly. I just hard 
coded it for my board (Uno). I have attached the changes which (I assume) will 
work for all 328p based boards.

With this change I can now read on my HE301 (advanced protocol), but it won't 
detect my HE100. I am not sure why. Is the HE100 using a different protocol?

Original comment by targett...@gmail.com on 14 Jun 2012 at 7:58

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

Just to comfirm that the file 'targett...@gmail.com' has added, did enable me 
to compile the code on Arduino 1.0.1 IDE using Arduino Duemalove 328. And when 
run it did receive the'Simple protocol'.

But as expected it did not work with the BBSB 2011 remote. When a download is 
available for the BBSB 2011 can this be put in the 'Issue 8' section on here, 
otherwise it may get confusing for someone else at a later date reading this ? 

Hope this helps

Regards

Gary

Original comment by gb.uk.ma...@gmail.com on 14 Jun 2012 at 9:43

GoogleCodeExporter commented 8 years ago
Targett and Gary,

Thanks for the feedback.  I've attached a new version just to address this - 
could you both try it out?

The problem was that my series of preprocessor "if" statements assumed that the 
user has correctly selected the HETIMER, HETXPORT, and HETXPIN that they wanted 
to use... but that was a silly assumption on my part - the library should be 
usable "out of the box"!  So it now compiles for both standard and mega (but I 
can't test it actually works), using the default pins... but still allows users 
to configure which pins to use if they want.

Regards,
Nathan

p.s. Gary: when I have a chance to play around with the timings, I'll upload 
changes to the correct issue :-)

p.p.s. Targett: I don't actually have any HomeEasy devices (only BBSB and 
self-built), but according to http://www.xplmonkey.com/homeeasy.html the HE100 
uses either the "advanced" protocol, or a completely different one... based on 
what it is communicating with (the "HE105 Heating Controller" has a separate 
format).  So if you have paired the HE100 with a standard socket, I assume it 
should show up as "advanced", but if you've paired it with the HE105 it is 
unlikely to work.  Could you give me more information?  (I'm assuming the 
controller is "paired" with devices - I might even be wrong about that!)

Original comment by nbur...@gmail.com on 15 Jun 2012 at 8:01

Attachments:

GoogleCodeExporter commented 8 years ago
Hi,

Just to comfirm that the latest file Nathan has added, did enable me to compile 
the code on Arduino 1.0.1 IDE using Arduino Duemalove 328. And when run it did 
receive the'Simple protocol'.

Original comment by gb.uk.ma...@gmail.com on 15 Jun 2012 at 5:31

GoogleCodeExporter commented 8 years ago
Hi,
I've tried the various updated versions of the library with my Arduino Uno 
under 1.0 and 1.0.1 but with no joy. The sample receiver program never prints 
out anything. I've managed to receive simple protocol messages from my HE 
remote with non-interrupt based sample code (though patchy cause of the timing 
issues) so I know the receiver works OK. I've got it connected to digital pin 8 
on the UNO which I believe is what should be mapped through to suit this 
library with the updated HomeEasydefines.h.
regards, Guy

Original comment by guy.sale...@gmail.com on 13 Aug 2012 at 8:02

GoogleCodeExporter commented 8 years ago
To explain my situation.

I have an HE301 and HE100 both paired with an HE202W. Both can turn this socket 
on and off. I then tried to use the arduino and RF reciever to pick up the 
signals.

I can pick up the HE301, which show as advanced protocol, but the HE100 is 
egnored. 

Original comment by targett...@gmail.com on 14 Aug 2012 at 11:00