PDA

View Full Version : Use Duet Controller as remote for your amp.



Egnos
2009-01-17, 06:33
The enclosed zipfile contains a applet to control a NAD amplifier (C 352) with the IR emitter on your Duet Controller.
I used the TestIR applet from the controller as a basis.
It is very simple customize it for other amplifiers if you know the infrared codes of your remote.
The range of the IR controller of the duet is really amazing.

Installation
Unpack the zipfile.
Copy the map to your controller (usr/share/jive/applets)
To do that enable external acces on your remote (SSH) and copy the map with for instance winscp.
The remote functions are now available under the home menu on your controller.

I did not do much work on modifying the png file.

But it seems very easy to program your own remote for the duet controller.

It only controls power on/off, volume up/down and input select disc. It is easy to add other functions but i did not needed that.

mherger
2009-01-19, 10:06
> The enclosed zipfile contains a applet to control a NAD amplifier (C
> 352) with the IR emitter on your Duet Controller.

Hey, that's very cool! I've been using the NAD's SR-5 remote to control my Transporter for years. This might swap the roles :-).

I'm not sure about the Sleep button: what is it intended to do? In my case it switches to the Disc input - which is perfect for me, as that's where the Transporter is connected. But is this intentional?

--

Michael

autopilot
2009-01-19, 10:28
Excellent work :) Is this the first time anyone has got the SBc to control an AMP etc via IR? If so, I'm surprised no one has yet. Could you provide a bit more info, such as how it can be customised for other AMP's, such as my Cambridge Audio Azur 640a?

mherger
2009-01-19, 10:55
I've modified the image to improve the contrast and legibility on the display.

In the applet there are key handlers for the hardware buttons. Are they mapped to anything NAD specific or are they still doing their default job?

I'll probably going to modify the volume buttons to set the NAD's volume instead, skip to switch between sources etc.

Egnos
2009-01-25, 07:50
Michael, the reason why i took sleep is that i was too lazy to design a new png image with "disc" on it.
thanks for teh higfh contrats png image. Who is going to make a nice image for the remote.


Autopilot, in the file NADIRapplet.lua you find the definitions of the keys.
In my case the following 4 keys. The first key-sleep is to select disc input, the second is power en up down is for volume up and down.
It is very simple to add more keys (see the IR example on your controller).

local keymap = {
{ key=KEY_SLEEP, x=29, y=34, dx=18, dy=0, ir="0xE13E916E" },
{ key=KEY_POWER, x=207, y=27, dx=22, dy=0, ir="0xE13E01FE" },
{ key=KEY_UP, x=119, y=34, dx=18, dy=0, ir="0xE13E11EE" },
{ key=KEY_DOWN, x=119, y=85, dx=18, dy=0, ir="0xE13E31CE" },
}

As you can see there is a parameter called ir="0x********".
You have to find the IR codes for your amp. Try for instance the lirc database http://lirc.sourceforge.net/remotes/
maybe your remote is there.

Egnos
2009-01-25, 08:06
Michael
I changed the png and put in the disc and some text for volume.

amcluesent
2009-01-25, 08:53
How does the applet encode IR commands?

My Pronto has learnt IR commands, e.g. to set the AV input on the amp in pronto hex is '5000 0073 0000 0001 0010 0002'.

IIRC the '5000' at the start means the rest is RC5 encoded.

IMHO The Squeezebox team who understand LIRC should meet up with the Harmony developers who use Pronto hex and sort out some utility.

Egnos
2009-01-25, 12:55
For more background on the IR code see http://forums.slimdevices.com/showthread.php?t=57243&highlight=infrared&page=2
Maybe this will help you to understand the LIRC files.

amcluesent
2009-01-25, 13:31
>Maybe this will help you to understand the LIRC files.<

Hmm, not really obvious is it :(

I think I'll wait for someone to develop a lua function which will process the pronto hex IR codes.

pufnstuf
2009-01-25, 14:41
The enclosed zipfile contains a applet to control a NAD amplifier (C 352) with the IR emitter on your Duet Controller.

Great information; this looks like a brilliant piece of functionality to add to the SBC. Please keep up the great work Egnos (& Michael)! :D

roe_forever
2009-01-25, 15:30
Can anybody help a complete it idiot to access the controller to copy the files in NAD-IR.

I have downloaded and installed winscp as recommended in the first post. I also activated the ssh on the controller.

But how do i actually "log-on" to the controller. When I activate the ssh i get an ip-adress and a password. But winscp ask for a host name, a user name,a password and a private key.

Any idea to what im doing wrong. Winscp is totally new for my (as many other) things :-)

Roe_forever

Egnos
2009-01-25, 15:46
WinScp is not that difficult

Hostname: enter the ip of your controller (in my case 192.168.1.151)
Username: root
Password: the password you get from the controller when you enabled SSH in my case 1234
Private key no input needed

Maybe you get an error ralated to group ... ignore and continue.

roe_forever
2009-01-26, 09:45
Thanks a lot...

It brings me a little further but not quite there :-(

I get an error saying "cannot initialize SFTP protecol. Server sent command exit status 127. Cannot initialize SFTP protocol. Is the host running a SFTP server?"

I use port 22 and SFTP as a protecol and have checked "allow SCP fallback". I also tried with FTP and SCP and no luck.

Im a maybe using the wrong port ?

R.

Skunk
2009-01-26, 13:59
Im a maybe using the wrong port ?

R.

Did you enable SSH on the Controller under Settings>Advanced>Remote Login?

EDIT: sorry, just read above that you did.

Egnos
2009-01-27, 11:28
Port 22 is ok and sftp with "allow scp fallback" is fine too.

Did you install WinSCP ok? You probably have to select Pageant end Putty(keygenerator)if you install WinScp see: http://winscp.net/eng/docs/installation

lauret
2009-01-27, 12:37
I would actually also be nice if the volume could be controlled using the volume control. On one of my sb's my volume controls are useless as the digital output is fixed. If it's possible using this applet, how hard could it be I was wondering?

Egnos
2009-01-27, 14:44
Yes in principle it is possible
In the NADIRapplet.lua file you find under the function keyEvent
key==KEY_VOLUME_UP at the code place fill in the code for volume up.
See below:

elseif key == KEY_VOLUME_UP then
code = "0xE13E11EE"
elseif key == KEY_VOLUME_DOWN then
code = "0xE13E31CE"
It works but only the first time you hit the volume up/down key.
The problem is that the subimage volume control is popping up which disables the volume up key.
I haven's investigated it further but it looks that is is possible in principle if you would be able to disable the popup image for volem control.

Just give it a try

roe_forever
2009-01-28, 02:07
Hi again,

Think the Win SCP is ok.

Tried to suspend my xp firewall which help a little again, but now I have another error message saying "connection has been unexpectedly closed. Server sent command exit status 0" and "Cannot initialize SFTP protocol. Is the host running a SFTP server?"

This is just not easy :-)

\R

The Moog
2009-01-28, 02:24
Hi guys,

Great work on accessing the functionality of the IR sender on the Controller, I think that some of the possibilities that this opens up are quite exciting! I was just wondering if the volume behaviour could be set dependant on the device that you are controlling?

For example, I have an SB3 connected up to my main hifi and when I am controlling that I would like the volume controls to send the correct IR commands to my Musical Fidelity pre-amp (and just give a Vol+ or Vol- notification on the screen as it obviously cannot know what level the volume is set to), but I also have a Boom in the kitchen and would like to keep the current volume control method.

Cheers,


The Moog

Ramage
2009-01-28, 02:25
Hi again,

Think the Win SCP is ok.

Tried to suspend my xp firewall which help a little again, but now I have another error message saying "connection has been unexpectedly closed. Server sent command exit status 0" and "Cannot initialize SFTP protocol. Is the host running a SFTP server?"

This is just not easy :-)

\R

I found that I had to set WinSCP to SCP rather than SFTP with SCP fallback. I get the "groups" error, which I click through for access to work.

roe_forever
2009-01-28, 07:24
Thanks a lot guys for your help

R.

Egnos
2009-01-28, 14:23
I modified the applet for volume control.
Using the volume keys still gives me the problem of a "volume control window" popping up.
I now use the Add key (+) for volume_down and the Play key for Volume_up.
Seems unlogical but the + key is on the left and the play key is on the right.
This is not very elegant solution but it works well for my NAD.
(You can still use the digital volume control too if you want).
If somebody comes up with a solution for the popping up window I maybe revert to the volume keys for IR volume control.

ntang
2009-01-28, 18:47
Can someone tell me how to convert all the numbers that I find at remotecentral for my McIntosh preamp into the 0X.... form that this NADir solution uses? Or maybe point me to a site where I can find "ready-made" 0X.... codes for various brands?


Thanks

MadScientist
2009-01-29, 12:56
Fantastic development!

However, I've copied the folder to the applet directory on the Controller using WinSCP but when I restart there's nothing extra in the Home menu or other menues. I've checked the files twice - what could I be doing wrong?

MS

Egnos
2009-01-30, 12:25
MadScientist
Did you turn the controller off and on again? (press home button long to turn off). Then the Nad_IR should be visible in the home menu.
Also check settings/mainmenu there you should also see NAD-IR (without check box).

MadScientist
2009-01-30, 13:13
MadScientist
Did you turn the controller off and on again? (press home button long to turn off). Then the Nad_IR should be visible in the home menu.
Also check settings/mainmenu there you should also see NAD-IR (without check box).

Yes, several times and Nad_IR still not present in menus. I'm running SC7.4 and its associated Controller update which may be the problem. I'll have another play tomorrow

MS

MadScientist
2009-01-30, 13:48
Scrap my last post - got it installed. Now I've just got to understand why the codes I substituted are not working for my Meridian precessor.

MS

ntang
2009-01-30, 18:13
Can someone tell me how to convert all the numbers that I find at remotecentral for my McIntosh preamp into the 0X.... form that this NADir solution uses? Or maybe point me to a site where I can find "ready-made" 0X.... codes for various brands?


Thanks

Anyone? Many Thanks

Egnos
2009-01-31, 13:16
MadScientist
Have you looked at the lirc database
Maybe this one works for you http://lirc.sourceforge.net/remotes/meridian/MSR

ntang
I didn't find any McIntosh codes in the lirc database. Maybe your friend Google can help you.

MadScientist
2009-01-31, 13:58
[QUOTE=Egnos;391430]MadScientist
Have you looked at the lirc database
Maybe this one works for you http://lirc.sourceforge.net/remotes/meridian/MSR
QUOTE]

Egnos

Thanks I have. The problem is I can't work out what to put as the pre-data.

For the NAD codes there's a line 'pre_data = 0xE13E' so you know that you have to insert E13E before each code. In the Meridian entry there's no pre data insert and I can't find it anywhere else which is a bit frustrating.

MS

TimT
2009-01-31, 16:06
What a marvelous tool for expanding the usability of the Duet Controller!

Adding on to the original NADIR.zip, I have created a NADIR Infrared in which the controls are mapped to a NAD integrated amp's (in my household, the C320BEE) five non-tape inputs (Tuner, Aux, Video, CD, Disk) as well as the Power and Volume Up/Down functions. The "Sleep" icon is mapped to the amp's Mute function.

Now, does anyone know where to find the hex codes for a Musical Fidelity integrated amp A300?

TimT

Egnos
2009-02-01, 06:54
TimT
ALso have a look in the Duet forum.
http://forums.slimdevices.com/showthread.php?t=57243&highlight=volume&page=2
There is a UniversalRemote.zip. Maybe it helps.
I am not an IR expert.

sg2
2009-02-02, 02:43
Hello to the original poster,

Thank you for this, I've made a variation for my Denon AVR, it perfectly fills the one single thing I wanted to do with the Duet which I couldn't : use the amp's volume control rather than preattenuating in the digital domain (in the SBR) before sending to DAC, which is what you get when you use the SBC's volume control.

Regards,
--
Stéphane