- Compile app.go for target system. For example, compiling for Raspberry Pi Zero:
GOOS=linux GOARCH=arm GOARM=5 go build -v app.go
- SCP app binary to system
- Install supervisor:
apt install supervisor
- Copy over supervisor.conf to /etc/supervisord/conf.d/
- Create logs:
touch /var/log/lirc_server.log
- Start supervisor:
supervisorctl reread && supervisorctl update
To generate a remote configuration file, run the following commands:
# Stop lirc to free up /dev/lirc0
sudo /etc/init.d/lirc stop
# Create a new remote control configuration file (using /dev/lirc0) and save the output to ~/lircd.conf
irrecord -d /dev/lirc0 ~/lircd.conf
# Make a backup of the original lircd.conf file
sudo mv /etc/lirc/lircd.conf /etc/lirc/lircd_original.conf
# Copy over your new configuration file
sudo cp ~/lircd.conf /etc/lirc/lircd.conf
# Start up lirc again
sudo /etc/init.d/lirc start
Rename the configuration file by editing the 'name' in /etc/lirc/lircd.conf
Restart LIRC: sudo /etc/init.d/lirc restart
- List all of the commands that LIRC knows for 'your-remote':
irsend LIST your-remote ""
- Send the KEY_POWER command once:
irsend SEND_ONCE your-remote KEY_POWER