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

IR learning not working? #6

Open
PainElemental opened this issue Aug 9, 2019 · 3 comments
Open

IR learning not working? #6

PainElemental opened this issue Aug 9, 2019 · 3 comments

Comments

@PainElemental
Copy link

PainElemental commented Aug 9, 2019

Hello,
I used the command line project for testing and the method "RmTest()" for learning IR codes does not work for me.
await rm.EnterLearning();
var data1 = await rm.CheckData();
var data2 = await rm.CheckData();

data1 and data2 are always NULL. What am I missing?
How do you do IR learning?

Regards
Bernd

@ume05rw
Copy link
Owner

ume05rw commented Aug 10, 2019

You have run RmTest on the console.
That means that the Auth method is being executed.

Maybe there are multiple RM devices in your LAN.
Try to identify the device in this way.

var dev = (Rm) devs.FirstOrDefault (e => e.Host.Address.ToString () == "192.168.0.1");

When the EnterLearning method is executed, the LED of the target RM device lights up.
This makes the device distinguishable.

@PainElemental
Copy link
Author

Hello,
there is only one device in the LAN. I can guarantee that.

I found out that EnterLearning does not work, but LearnIRCommand does!
This is also much nicer, because it has a Concellationtoken as parameter :)

@AdamoT
Copy link
Contributor

AdamoT commented Dec 27, 2019

EnterLearning must be executed in a very precise order to other methods.
As of PR #8 EnterLearning should be deprecated in favour of LearnIRCommand, which is very straight forward to use

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

3 participants