NAD Link (aka NEC remote control protocol) control script for Raspberry Pi
Go to file
Tom Spurling 8283e0f0e9
A note on the uselessness of the project
2019-01-31 10:58:27 +00:00
remote-codes Try to include all the NAD remote codes I have 2017-06-10 15:02:17 +01:00
99-systemd-bluetooth-remote.rules I have meanwhile finally learned to udev 2017-12-08 01:02:45 +00:00
README.md A note on the uselessness of the project 2019-01-31 10:58:27 +00:00
daemon.py I have meanwhile finally learned to udev 2017-12-08 01:02:45 +00:00
hyperion.config.json urgh2 2016-11-03 00:37:13 +00:00
hyperion.test.json more crap 2016-11-03 00:39:34 +00:00
hyperion.test.py more crap 2016-11-03 00:39:34 +00:00
nad-link.py Fiddle about to match "reasonable" systemd config 2016-11-03 00:35:42 +00:00
nad-link.service Blame where blame is fair 2017-12-08 01:05:19 +00:00
requirements.txt ugh 2016-11-03 00:36:54 +00:00

README.md

NAD Link for Raspberry Pi

Thanks to Morten Hustveit who did all the work.

This works well on my C350 amp a quick bodge connecting a GPIO pin and ground pin to an RCA connector was all that was needed. It seems happy enough with 3.3v instead of the specified 5.

Specify the correct pin in the script.

I like to do the following in my .zshrc:

alias nad='python /opt/nad-link/nad-link.py'

And on my other computers:

alias nad='ssh pi -t python /opt/nad-link/nad-link.py'

(The -t tells ssh to imitate a terminal so the SIGTERM from pressing ^C is forwarded. This is helpful in order to kill the command properly, and thus stop volume changes at the intended moment before waking up the entire town.)

Then it's just

$ nad on
$ nad off
$ nad up
$ nad down

etc. etc.

Daemon

I've now included an example of a very simple daemon which listens for volume control events from my Bluetooth remote (or therefore, presumably, any keyboard's volume keys) and launches the script to do the relevant volumizing.

Futility

It's been pointed out that I could have just used lirc and saved a lot of effort. This is most likely a correct observation, but by doing that I wouldn't have learned anything, and would have probably just spent time getting annoyed by boring problems configuring it to use GPIO. Too much like work! So no complaining from me.

Config

Just change the config at the top of the script. Alias remote codes however you like.

I'll point you again at Morten Hustveit's page. The page is gone, apparently forever.

I've tried to convert the Crestron codes NAD provide and included them here in the remote-codes directory. Some of them have a trailing '3' for some reason which makes them longer than the normal 4 bytes. I don't have a NAD CD player so have no idea what's going on or what is correct.

For different equipment just extract the right remote codes (it's easy to enter hex into YAML). Be aware that my script expects them in normal left-to-right reading endianness (whichever that is) so just take the binary and hexify it.