Skip to content
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

Not receiving after sending an IR signal #2

Open
FreibeuterOH opened this issue Oct 11, 2017 · 2 comments
Open

Not receiving after sending an IR signal #2

FreibeuterOH opened this issue Oct 11, 2017 · 2 comments

Comments

@FreibeuterOH
Copy link

Hello,
your sensor is working very well with my FHEM :-)
Sending and receiving is is working stable.
But after sending an IR signal i need to reset the Nano by hand to receive again.

rejoe2 added a commit that referenced this issue Oct 11, 2017
@rejoe2
Copy link
Owner

rejoe2 commented Oct 11, 2017

Hello,
thanks for reporting. Nice to hear sombody's using this as well!

As I didn't do anything on the code since ages, and also got all my necessary codes stored in FHEM, I didn't realize there beeing a problem. Most likely it would be best to change the code towards a interrupt-driven receiver function, using https://github.com/ElectricRCAircraftGuy/IRLib/blob/master/examples/IRanalyze/IRanalyze.ino as a base.

Do you have the option to change wiring for use of PIN 2 instead of 8? (second interrupt-PIN is already in use for sending).

Then you might try modified code here: https://github.com/rejoe2/Mysensors-IR/tree/Interrupt-driven and report back.

Kind regards.

@rejoe2
Copy link
Owner

rejoe2 commented Oct 16, 2017

Did some tests wrt to this issue. Some findings:

  • Bug was already there on my original 2.0.0-beta-Node
  • Same behaviour when using MySensors 2.2.0-beta.
  • Reinitialisation of irreceive in MySensors-Receive is/was not implemented correctly. Should be My_Receiver.enableIRIn(); (see e.g. http://forum.arduino.cc/index.php?topic=20794.msg153655#msg153655). Call should also be within the if (message.type == V_IR_SEND) {} subsection.

Unfortunately, changing the code accordingly didn't lead to a different behaviour. So this is either a incompability between MySensors and IRlib (imo not likely) or a bug in G. Staple's version of IRlib.

As I found out, Arduino-IRremote may be an appropriate replacement under active development, I will next check, if using this library instead is a big effort or can be done easily.

rejoe2 added a commit that referenced this issue Oct 16, 2017
After receiving controller message: enableIRIn() is used instead of resume() to reset the IR receiver
(Unfortunately, this doesn't solve Issue #2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants