prebm / SonosRemote

Turn your old Apple remote to a Sonos remote
MIT License
20 stars 0 forks source link

Sonos Remote

While Sonos is a great solution for wireless speaker it sometimes lacks the support of a remote control. For easy tasks as play/pause, volume up/down, next/previous song it is easier to press a button on a remote than fiddling on your phone.

With just a Raspberry Pi and an old apple remote (or any other remote) this is quite easy to achieve.

Pi with Remote

Setup

Components used:

Hardware

Connect your Sensor to 3.3V, GND and GPIO 18. Please refer to the excellent Adafruit Tutorial to see an illustration.

If you are using another remote check the list and edit lircd.conf and lircrc accordingly.

Automatic Install on Raspbian Jessie

The install script install.sh is a convenient way for automatic install of all required software and configuration of the system. For detailed instructions refer to the next section.

Manual Install with Instructions for older Raspbians

The following section describes how to install the IR Receiver Sensor and the required software to your Raspberry Pi. At the end, there is a part with instructions how to enable the daemon for automatic start at boot for older versions of Raspbian with init.d and newer versions (starting with Jessie) with systemd.

Please refer to the link section at the end of this Readme. It contains useful links for troubleshooting.

I am running Raspbian 8.0 with the Kernel 4.4, for Kernels before 3.18 one step is different

Running

We installed a service to run at boot. So after booting your Raspberry Pi everything should work out of the box. You can use the following commands:

Troubleshooting

I have added a basic logging mechanism which logs to sore.log. To save disk space it is deactivated. Activate it and check the logs for any useful messages by uncommenting the following line in sore.py

# logging.basicConfig(filename="/home/pi/SonosRemote/sore.log", level=logging.INFO)

If the service is not starting up at boot, try to restart it manually. It is a known issue that the startup at boot is not working if you are running Jessie.

Links

LIRC

Sonos

Service