Skip to main content
Topic: Let's talk C# (Read 2919 times) previous topic - next topic

Let's talk C#

Hello,

does anyone have some experience with the IR-Toy using C#/.NET?

My intension is a piece of software on my media PC, that uses the IR-Toy as a univeral remote control, that I control with the keyboard.
The current state of the project is, that I send the coammnds via commandline to the irtoy.exe (from the irtoy package).
But it allways take some seconds to finish the process. So i want to send the commands directly via serial.

Greetings
Smuddy

Re: Let's talk C#

Reply #1
Hi Smuddy

yeah I have a similiar project.
I started with Android with the plan to make an universal remote for the TV, AV-Receiver & HTPC. Unfortunately this idea is stopped; the IrToy has some problem as it stucks in bootloader mode when the smartphone/tablet goes to standby (deep sleep) after some time.

So now I plan that the HTPC is able to switch on the TV and the AV-Receiver and switches to the correct channels by a small C# program that I can launch via hotkey.

As my Android code was working quite well (apart from the standy problem) I have ported it now to C#.
It is not a perfect library (specially when there an exception happens it just closes the connection), but working.

The library is a Visual Studio 2008 solution and contains the 'IrToyLibrary' project which is setup as a library (DLL) and there is another 'IrToy' project that is a sample how to use it.
At the moment, it supports only sending and it requires the command in a hex string format (which can be taken from the perl RecPlay output).

just let me know your experience.

Regards, Manitu

Re: Let's talk C#

Reply #2
Hi Manitu,

thank you, that's exactly, what I need.
I'll give notice if I get this thing to work.

Ahh ... management by exception ;) but I'll get over it.

Grüße,
Smuddy

Re: Let's talk C#

Reply #3
Hi
I've updated the library as it caused some issues where it did not wait until IrToy has written all data to the buffer.
Gruss, Manitu

Re: Let's talk C#

Reply #4
Cool, thank you.

In unit tests it works fine for my TV, but not for my AV receiver. But this is a problem with the strange codes from Yamaha.

Grüße,
Smuddy

Re: Let's talk C#

Reply #5
Ok, the remote is finished - at least for my requirements.

The app is running in background ans show up after pressing ctrl+shift.
An additional key starts any command, that is defines in the RcSettings.xml.

I only changed some attributes in your lib for getting the settings xml-serializable.

Greetings
Smuddy