[Resolved] RPI 2B with Hifiberry DAC+ and IR ener314-ir

Hi,

A couple of month agi I decided to create my own mini Airplay station based on a Raspberry Pi with an additional functionality :slight_smile:. The RPi 2 B+ will also be able to control my amp Marantz through IR (ener314-ir)

I manage to build all in one piece and solder on the top of the Hifiberry Dac a support to plug the IR.

Before installing lirc it is important to update your linux distribution.
sudo apt-get update
sudo apt-get upgrade

Then I installed the lirc library
sudo apt-get install lirc

After having installed the lirc library I lost my time trying to setup and see if my IR was working but I found after that one file was missing and one way to solve that was to upgrade the RPI firmware.
I did it.
sudo apt-get install rpi-update

Once this last step is finished which could take a bit of time time you can easily setup your RPI.

Here is below my first configuration without the hifiberry DAC connected and it works. I manage to send some commands to my computer with success :slight_smile:
I use the Apple remote configuration available here, Apple A1156
sudo irsend SEND_ONCE Apple_A1156 KEY_PLAY

As soon as I change the value of gpio_in_pin and gpio_out_pin it stops to work and I don’t understand why. Do you have an idea?
With the below configuration it worked but only once. I rebooted and then nothing.
gpio_in_pin=11
gpio_out_pin=8

File: /boot/config.txt

gpu_mem=16
hdmi_drive=2
dtoverlay=lirc-rpi,gpio_in_pull=up,gpio_in_pin=18,gpio_out_pin=17
dtoverlay=hifiberry-dacplus

File: /etc/modules

lirc_dev lirc_rpi gpio_in_pin=18 gpio_out_pin=17

File: /etc/lirc/hardware.conf

[code]

/etc/lirc/hardware.conf

Arguments which will be used when launching lircd

LIRCD_ARGS="–uinput"

#Don’t start lircmd even if there seems to be a good config file
#START_LIRCMD=false

#Don’t start irexec, even if a good config file seems to exist.
#START_IREXEC=false

#Try to load appropriate kernel modules
LOAD_MODULES=true

Run “lircd --driver=help” for a list of supported drivers.

DRIVER=“default”

usually /dev/lirc0 is the correct setting for systems using udev

DEVICE="/dev/lirc0"
MODULES=“lirc-rpi”

Default configuration files for your hardware if any

LIRCD_CONF=""
LIRCMD_CONF=""[/code]

Quick test to check if your library is properly installed.

volumio@volumio:~$ dmesg | grep lirc_rpi
[    4.755171] lirc_rpi: module is from the staging directory, the quality is unknown, you have been warned.
[    4.915277] pinctrl-bcm2835 3f200000.gpio: pin gpio18 already requested by lirc_rpi; cannot claim for 3f203000.i2s
[    5.764495] lirc_rpi: auto-detected active high receiver on GPIO pin 17
[    5.773851] lirc_rpi lirc_rpi: lirc_dev: driver lirc_rpi registered at minor = 0
[    5.785751] lirc_rpi: driver registered!

A youtube video which help me to get it done this fun project.
[youtube]https://www.youtube.com/watch?v=QV_QmDKx0kQ[/youtube]

Hi all,

For those who have played with a Hifiberry dac and an IR ENER314-IR how looks your config.txt and modules files?

Today I tried to use different GPIO but none of them were good.
I listed the GPIO which could work to setup the IR on the top of the dac
GPIO 4, 17, 27, 22, 23, 24 and 25 accordingly to the original documentation from the ENER314-IR and the RPi 2 with the dac pro.
Except the GPIO 17 the others don’t work and the GPIO 17 work only for sending data.

According to the hifiberry website my dac pro used the GPIO 2,3 and 18.
On the other hand my infrared Energie is configured by default to use the GPIO 17 for sending data and the GPIO 18 to receive them.

I’m wondering if because everything is soldered together I don’t have the choice.

What’s your thoughts on that ?
Thanks !

Hi All,

Finally, I received today my remote to control my Amp :slight_smile:
The only wait to record and setup the lidcd.conf file when you have an Hifiberry DAC PRO is to remove it an instead plug the Ener314-IR.

Only then you can use the GPIO 18 to receive the ir data which is what I did.
Attached please find the lircd.conf file to control an Marantz PM6002. I’ve only recorded the basic keys such as power on/off, channels, volume and that all.

Once everything well configured and before to put back the Hifiberry DAC I’ve updated my modules and config.txt files and change the value of the GPIO_in_out_pin from 18 to 11 just to let the RPi boot properly otherwise he won’t boot.

My boot/config file:

gpu_mem=16 hdmi_drive=2 dtoverlay=lirc-rpi,gpio_in_pull=up,gpio_in_pin=11,gpio_out_pin=17 dtoverlay=hifiberry-dacplus

My /etc/modules file:

lirc_dev lirc_rpi gpio_in_pin=11 gpio_out_pin=17

My next actions will be to custom the current volumio web interface to control from there my amp.

Cheers,
Marantz_lircd.zip (2.09 KB)

Hello,

End of the project !
I found the solution by using a native solution which is PHP.
The exec / shell_exec commands allow you via an web interface the execute some command line which is perfect in my case.

After creating a new page and a quick button / form I was able to control my HiFi system over my phone/computer :slight_smile:

Easy and Happy :sunglasses: