Volumio RF or BT controlled.

Volumio is great,

Simplicity is one of it’s strength.

As it’s all integrated I’d like to get it controlled by a simple RF remote control with these basic functions:

Vol+
Vol-
Next song
Previous song
Pause/Unpause

That’s x5 key for the RF remote.

RF is importantas my setup is in shower/bathroom, so it’s protected from water projection, then IR isn’t a solution.

I googled a lot and found complex solution with wiring soldering, and I’d like to KIS (Keep It Simple)

I wonder if my beloved Volumio should work with something close to :

24$ Shipped

http://www.dx.com/p/usb-rf-wireless-presenter-with-red-laser-pointer-black-1-x-cr2032-65674

13$ Shipped

http://www.dx.com/p/usb-rf-wireless-presenter-with-laser-pointer-and-trackball-for-pc-laptop-black-10-meter-range-42957

12$ Shipped

http://www.dx.com/p/usb-rf-wireless-presenter-with-laser-pointer-and-remote-mouse-black-1-cr2032-29149

Or even :
30$ shipped

http://www.dx.com/p/rkm-rikomagic-mk705-2-4ghz-wireless-44-key-air-mouse-keyboard-ir-remote-controller-black-272453

Associated with some basic shell programming like for IR devices.

Your help and advices are very welcome. :smiley:

Even tough USB remotes would probably work and should be plug and play, i would go for a 433 mhz sender-reciever.

Maybe you know the remote controlled wall sockets like KAKU (Klink Aan Klik Uit) , they use 433 mhz and many domotica projects use these. So there is a lot of documentation on how to get this working.

In your case, you would use the remote with self-defined settings to control volumio instead of a wall socket.

Sender - Receiver: ebay.nl/itm/2PCS-433Mhz-RF-t … 4ad93ab435

KAKU remote and information on how it works: jeelabs.org/?s=KAKU

  • note that most remotes are not meant to be used under the shower :wink:

Thanks MobeyDuck for your input.

I googled and ebayed your solution looking for a nice remote (x5 keys at least) but I was unable to find one aleas. 433Mhz seems more car or garage door oriented, lacking of buttons.

Bluetooth is also an option, maybe simpler, what you think ?

http://www.ebay.co.uk/itm/Targus-Bluetooth-Media-Remote-Control-for-Apple-iPad-iPhone-Macbook-Pro-Air-/291197334684?pt=UK_Computing_Remote_Controls_Pointers&hash=item43ccb6b49c

Totally Geek Style !! But not BT…

http://www.ebay.co.uk/itm/Genius-31220002100-Ring-Style-Pointer-/231166741045?pt=US_Remote_Controls_Pointers&hash=item35d29c8a35

Volumio currently has no Bluetooth support, this is a requested feature and will be added in a future version. But don’t expect it to be in the next release.

I only know Elro and Klik aan klik uit, i have no idea how they are called or branded outside the netherlands.
But these remotes have 4 on buttons and 4 off buttons, so you have 8 buttons

Elro looks like to be sold as “Home Easy”
ebay.co.uk/itm/Home-Easy-Rem … 1585988229

The fun is you dont have to look at the type of buttons or what they should do from the factory, they just send a signal code on 433mhz.
What is being triggered is totally up to you.

Bluetooth is a real plus as RPi means integration to me and discertion… And iR isn’t compatible to hidding… 8^)

I’m sure I’m not the only one to think about WAF 8^)…; And BT or RF are the keys to WAF.

I red somewhere a developpement about Bluetooth Lirc mapper but I’m unable to find it…

Google search mode activated. :smiley:

Thanks for your help and BRA-VO for your great great work and support.

A new hope is born !!

Googling part of the night I found : https://ce9005ost.wordpress.com/2013/06/01/use-rf-remote-control-presenter-to-play-sounds-on-raspberry-pi/

Also
https://learn.adafruit.com/playing-sounds-and-using-buttons-with-raspberry-pi/code

I’m a totaly nooob in programming but it might work modifying the proposed code :

with

os.system(‘mpc next’)
os.system(‘mpc play’)

and so on…
Don’t you think ?

For inspiration on a script that controls mpd, i would advice you to take a look at the scripts used here: gpio-pins-control-volume-t2219-20.html

I think the event values used in the script you showed could be completely different from the ones your presenter would use. So don’t forget to check those.

When you have a script, feel free to post it. Then others can adapt it for there implementation or help you with yours.

Thank you for the link.

I’ll post my script but I have to order “The” remote to work on event.code and values.

At present time I’m fighting to install Python, to try a script versus some usb keyboard.

But after having tried to install (insufficient diskspace), freeing space, reinstalling, removing, reinstalling, rebooting, I always get : Illegal Instruction

apt-get install python-pip python-dev build-essential Reading package lists... Done Building dependency tree Reading state information... Done build-essential is already the newest version. python-dev is already the newest version. python-pip is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 451 not upgraded.

root@Douche:/usr/bin# root@Douche:/usr/bin# ls -la pip -rwxr-xr-x 1 root root 281 Dec 5 05:22 pip root@Douche:/usr/bin# pip -freeze Illegal instruction root@Douche:/usr/bin# pip Illegal instruction root@Douche:/usr/bin#

I’m so noooooob

It seems something broke in my RPi…

win32diskimager is BACK !!

Happilly Volumio installs quickly… Hoping I’ll no Wifif/Eth pb…

Python is already installed. I think it has all the modules you would need.

To increase storage space on the SD look in the FAQ

The pip command isn’t working on the Volumio 1.51 out of the box.

I followed your instructions :

-remove means not to run the command ?

And

apt-get update apt-get install python-dev
kills Volumio, especially mpd who returns an illegal instruction…

Step by Step :

Win32Disk imager
Boot
SSH sur ETH

mpd:

root@volumio:~# mpd Dec 24 13:39 : socket: Failed to bind to '0.0.0.0:6600': Address already in use
Volumio/mpd is alive !

PIP :

root@volumio:~# pip -freeze -bash: pip: command not found
pip is unavailable from stock 1.51 image

apt-get update

Volumio Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law. root@volumio:~# apt-get update Get:1 http://mirrordirector.raspbian.org jessie Release.gpg [490 B] Get:2 http://mirrordirector.raspbian.org wheezy Release.gpg [490 B] Get:3 http://mirrordirector.raspbian.org jessie Release [14.4 kB] Get:4 http://repo.volumio.org jessie Release.gpg [490 B] Get:5 http://repo.volumio.org jessie Release [2,426 B] Get:6 http://mirrordirector.raspbian.org wheezy Release [14.4 kB] Get:7 http://repo.volumio.org jessie/main armhf Packages [73.2 kB] Get:8 http://mirrordirector.raspbian.org jessie/main armhf Packages [8,957 kB] Get:9 http://repo.volumio.org jessie/contrib armhf Packages [20 B] Ign http://repo.volumio.org jessie/contrib Translation-en_GB Ign http://repo.volumio.org jessie/contrib Translation-en Ign http://repo.volumio.org jessie/main Translation-en_GB Ign http://repo.volumio.org jessie/main Translation-en Get:10 http://mirrordirector.raspbian.org wheezy/main Sources [6,072 kB] Ign http://mirrordirector.raspbian.org jessie/main Translation-en_GB Ign http://mirrordirector.raspbian.org jessie/main Translation-en Fetched 15.1 MB in 1min 50s (137 kB/s) Reading package lists... Done
Update OK

apt-get upgrade - remove

root@volumio:~# apt-get upgrade - remove Reading package lists... Done Building dependency tree Reading state information... Done The following packages have been kept back: base-passwd bind9-host bsdutils cifs-utils curl db5.1-util dbus dictionaries-common dmsetup dnsutils init-system-helpers initscripts iproute iptables iputils-ping isc-dhcp-client isc-dhcp-common krb5-multidev libav-tools libavcodec-dev libavformat-dev libavutil-dev libc-bin libc-dev-bin libc6 libc6-dev libcrypt-openssl-bignum-perl libcrypt-openssl-rsa-perl libcurl3 libcurl3-gnutls libcurl4-openssl-dev libcurses-perl libdevmapper1.02.1 libgcrypt11-dev libgnutls-openssl27 libgpgme11 libgssapi-krb5-2 libgssrpc4 libhtml-parser-perl libhttp-message-perl libio-socket-ssl-perl libjack-dev libjack0 libjson0 libk5crypto3 libkrb5-3 libkrb5-dev libkrb5support0 liblocale-gettext-perl libmailtools-perl libnet-ssleay-perl libnih-dbus1 libnih1 libnss-db libpam-modules libpam-modules-bin libpam0g libpulse0 librtmp-dev libsasl2-2 libsemanage-common libsemanage1 libsocket6-perl libssh2-1 libssh2-1-dev libsvn1 libtasn1-3 libterm-readkey-perl libtext-charwidth-perl libtext-iconv-perl libtirpc1 libusb-1.0-0 libva1 libxslt1.1 locales login m4 minidlna mount mountall mpd nfs-common nginx-common nginx-full ntfs-3g openssh-client openssh-server parted passwd perl perl-base perl-modules php-apc php5-cgi php5-cli php5-common php5-curl php5-fpm php5-sqlite plymouth procps python-debian python-soappy rpcbind sudo sysv-rc sysvinit sysvinit-utils texinfo udev util-linux util-linux-locales wget The following packages will be upgraded: alsa-base alsa-utils apt apt-listchanges apt-utils at autoconf automake autotools-dev avahi-utils base-files bash bash-completion bc bzip2 ca-certificates chkconfig comerr-dev console-setup console-setup-linux coreutils cpio cron dash dc debconf debconf-i18n debian-faq debianutils deborphan debsig-verify dialog diffutils discover discover-data djmount doc-debian dosfstools dpkg e2fslibs e2fsprogs exim4-config fake-hwclock file findutils firmware-linux-free ftp fuse gcc-4.6-base gcc-4.8-base gcc-4.9-base geoip-database gettext-base gir1.2-glib-2.0 gir1.2-json-1.0 git git-core git-man gnupg gpgv grep gzip host hostname ifupdown initramfs-tools installation-report iso-codes javascript-common kbd keyboard-configuration keyutils klibc-utils kmod krb5-locales less libacl1 libao-common libao-dev libao4 libapr1 libaprutil1 libapt-inst1.5 libapt-pkg-dev libapt-pkg4.12 libasound2 libasound2-dev libasprintf0c2 libasyncns0 libavahi-client3 libavahi-common-data libavahi-common3 libavahi-core7 libbinio1ldbl libblkid1 libbz2-1.0 libcaca0 libcap2 libcdio-cdda1 libcdio-dev libcdio-paranoia1 libcdio13 libclass-isa-perl libcomerr2 libcups2 libdaemon0 libdb5.3 libdbus-1-3 libdc1394-22 libdirac-encoder0 libdirectfb-1.2-9 libdiscover2 libdnet libedit2 libevent-2.0-5 libexif12 libexpat1 libffi6 libflac-dev libflac8 libfreetype6 libfuse2 libgc1c2 libgcc1 libgdbm3 libgeoip1 libgirepository-1.0-1 libglib2.0-0 libglib2.0-bin libglib2.0-data libglib2.0-dev libgnutls-deb0-28 libgomp1 libgpg-error-dev libgpg-error0 libgpm2 libhtml-format-perl libhtml-tree-perl libhttp-cookies-perl libice6 libid3tag0 libid3tag0-dev libidn11 libidn11-dev libio-socket-inet6-perl libiso9660-8 libiso9660-dev libjpeg8 libjs-backbone libjs-jquery libjs-json libjs-underscore libjson-glib-1.0-0 libjson-glib-dev libkeyutils1 libklibc libkmod2 libldap-2.4-2 libldap2-dev liblockfile-bin liblockfile1 libltdl7 liblwp-protocol-https-perl libmad0 libmad0-dev libmagic1 libmms-dev libmms0 libmodplug-dev libmodplug1 libmount1 libmp3lame-dev libmp3lame0 libmpcdec-dev libmpcdec6 libmpg123-0 libmpg123-dev libncurses5 libncurses5-dev libncursesw5 libncursesw5-dev libneon27-gnutls libnet-http-perl libnewt0.52 libnfnetlink0 libnfsidmap2 libnl-3-200 libnl-genl-3-200 libnss-mdns libnss-winbind libogg-dev libogg0 libonig2 libopenal-data libopenal1 libopenjpeg5 libopts25 libopus0 liborc-0.4-0 libpam-runtime libpam-winbind libpci3 libpcre++-dev libpcre++0 libpcre3 libpcre3-dev libpcrecpp0 libpcsclite1 libpng12-0 libpopt0 libpostproc52 libpth20 libpython-stdlib libpython2.7 libpython2.7-minimal libpython2.7-stdlib libqdbm14 libraw1394-11 libreadline5 libsamplerate0 libsamplerate0-dev libsasl2-modules libschroedinger-1.0-0 libsdl1.2debian libselinux1 libsepol1 libshout3 libshout3-dev libslang2 libslp1 libsm6 libsmbclient libsndfile1 libsndfile1-dev libspeex-dev libspeex1 libspeexdsp1 libsqlite3-0 libss2 libssl-dev libssl-doc libssl1.0.0 libstdc++6 libswitch-perl libsystemd-daemon0 libsystemd-login0 libtagcoll2-dev libtheora-dev libtheora0 libtimedate-perl libtinfo-dev libtinfo5 libtokyocabinet9 libts-0.0-0 libtwolame-dev libtwolame0 libupnp6 liburi-perl libusb-0.1-4 libuuid1 libvorbis-dev libvorbis0a libvorbisenc2 libvorbisfile3 libvpx1 libwavpack-dev libwavpack1 libwbclient0 libwibble-dev libwildmidi-config libwrap0 libwww-perl libx11-6 libx11-data libx11-xcb1 libxau6 libxcb1 libxext6 libxfixes3 libxi6 libxml2 libxmuu1 libxtst6 libxvidcore4 libyajl-dev libyajl2 linux-libc-dev localepurge logrotate lsb-base lsb-release lua5.1 make makedev mc mc-data mime-support mlocate monit mpc mpg123 multiarch-support nano ncurses-base ncurses-bin ncurses-term net-tools netbase netcat-traditional ntp openssl patch pciutils pkg-config pmount procmail psmisc python python-apt python-apt-common python-chardet python-debianbts python-minimal python-munkres python-musicbrainzngs python-mutagen python-pkg-resources python-reportbug python-samba python-unidecode python-urwid python2.7 python2.7-minimal readline-common reportbug samba samba-common samba-common-bin samba-dsdb-modules samba-libs samba-vfs-modules sed sensible-utils shared-mime-info sqlite3 tar tcpd tdb-tools time traceroute tsconf tzdata ucf unzip usbutils vacation w3m whiptail whois winbind wpasupplicant x11-common xauth xkb-data zlib1g zlib1g-dev 366 upgraded, 0 newly installed, 0 to remove and 113 not upgraded. Need to get 97.5 MB of archives. After this operation, 3,568 kB of additional disk space will be used. Do you want to continue [Y/n]? n Abort.

  • remove isn’t an option, and when upgrading mpd gets broken, and installed pip is also Illegal Instruction aware…

Confirmation during the upgrade I repetidely launch simple mpd command…

root@volumio:~# mpd Dec 24 13:44 : socket: Failed to bind to '0.0.0.0:6600': Address already in use root@volumio:~# root@volumio:~# mpd Dec 24 13:56 : socket: Failed to bind to '0.0.0.0:6600': Address already in use root@volumio:~# mpd Dec 24 13:56 : socket: Failed to bind to '0.0.0.0:6600': Address already in use root@volumio:~# mpd Dec 24 13:56 : socket: Failed to bind to '0.0.0.0:6600': Address already in use root@volumio:~# mpd Dec 24 13:56 : socket: Failed to bind to '0.0.0.0:6600': Address already in use root@volumio:~# mpd Dec 24 14:02 : socket: Failed to bind to '0.0.0.0:6600': Address already in use root@volumio:~# mpd Dec 24 14:04 : socket: Failed to bind to '0.0.0.0:6600': Address already in use root@volumio:~# mpd Dec 24 14:05 : socket: Failed to bind to '0.0.0.0:6600': Address already in use root@volumio:~# mpd Dec 24 14:07 : socket: Failed to bind to '0.0.0.0:6600': Address already in use

And here comes the DRAMA, during the upgrade, in another session, I tested a simple mpd command…

root@volumio:~# mpd Illegal instruction root@volumio:~#

Volumio broken… :cry: snif…

Yes, in the original post, remove was meant to show what command the poster i reacted to shouldn’t run.

apt-get install python-dev

If you read what is run when you enter this command, you’ll notice that you’re being asked to confirm upgrading certain files. This is bounded by dependency’s.

Looking at ce9005ost.wordpress.com/2013/06 … pberry-pi/
You dont really need pip, you need “evdev”. I bet there is a way to install this without using pip or apt-get, or just install pip without using apt-get and so try to skip upgrading anything.

So try this: pip.pypa.io/en/latest/installin … nstall-pip
(skip all upgrading)

–Edit–
Oh and typing mpd starts mpd. i prefere mpc status

1st Merry Xmas to You !!
You are just GREAT, thank you for this trick !!

Downloading the python script and running it :

root@volumio:~# wget https://bootstrap.pypa.io/get-pip.py root@volumio:~# python get-pip.py ... Successfully installed pip-6.0.3 setuptools-8.2.1 root@volumio:~# mpd status errno: Failed to open status: No such file or directory root@volumio:~# pip -V pip 6.0.3 from /usr/local/lib/python2.7/dist-packages (python 2.7)mpd works and pip is there running too !!

Let’s go for evdev :

pip install evdev .... building 'evdev._input' extension creating build/temp.linux-armv6l-2.7/evdev arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c evdev/input.c -o build/temp.linux-armv6l-2.7/evdev/input.o -std=c99 -Wno-error=declaration-after-statement unable to execute 'arm-linux-gnueabihf-gcc': No such file or directory error: command 'arm-linux-gnueabihf-gcc' failed with exit status 1 .... Command "/usr/bin/python -c "import setuptools, tokenize;__file__='/tmp/pip-build-kd_mh2/evdev/setup.py';exec(compile(getattr(tokenize, 'open', open)(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --record /tmp/pip-MypyOW-record/install-record.txt --single-version-externally-managed --compile" failed with error code 1 in /tmp/pip-build-kd_mh2/evdev
I googled a lot but I was unable to find a way to install “arm-linux-gnueabihf-gcc” without installin build-essential

http://hertaville.com/2012/09/28/development-environment-raspberry-pi-cross-compiler/
Which may brake Volumio

or manually
linux-sunxi.org/Toolchain

But today is Xmas we all have to please our beloved !

I succeded to install : arm-linux-gnueabihf-gcc, using : http://stackoverflow.com/questions/19162072/installing-raspberry-pi-cross-compiler

[code]apt-get install git rsync cmake

git clone git://github.com/raspberrypi/tools.git

export PATH=$PATH:$HOME/raspberrypi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin

arm-linux-gnueabihf-gcc -v

gcc version 4.9.1 (Raspbian 4.9.1-19)
[/code]

But no luck :

pip install evdev Collecting evdev Using cached evdev-0.4.6.tar.gz Installing collected packages: evdev Running setup.py install for evdev building 'evdev._input' extension arm-linux-gnueabihf-gcc -pthread -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fno-strict-aliasing -D_FORTIFY_SOURCE=2 -g -fstack-protector-strong -Wformat -Werror=format-security -fPIC -I/usr/include/python2.7 -c evdev/input.c -o build/temp.linux-armv6l-2.7/evdev/input.o -std=c99 -Wno-error=declaration-after-statement evdev/input.c:10:20: fatal error: Python.h: No such file or directory #include <Python.h> ^ compilation terminated.

Your missing a file… Python.h

fatal error: Python.h: No such file or directory

I don’t know where to get and place it, can’t really look it up atm but Google could help you :wink:

First try :

apt-get install python-dev ... root@volumio:/var/lib/apt# pip install evdev Illegal instruction root@volumio:/var/lib/apt# mpd Illegal instruction

Volumio broken. :blush:

Yes you already did this and noticed you broke volumio. volumio-controlled-t2290-10.html#p10303

You’ll need to find a way to get that python.h w/o
apt-get install python-dev

Aleas even breaking Volumio, Python.h ain’t install in the filesystem (using locate to find it) :cry:

For this 2015 Volumio and Raspi Gods are with me…

I started once again from scratch, creating a new sdcard with same downloaded file.

Then before doing anything I installed python-dev.

apt-get install python-dev

It ain’t break Volumio… Why… I don’t know. :unamused: :question:

Lets get pip

wget https://bootstrap.pypa.io/get-pip.py python get-pip.py Successfully installed pip-6.0.3 setuptools-10.1 service mpd restart
And Volumio still here !!

Let’s go for gcc :

apt-get install git rsync cmake git clone git://github.com/raspberrypi/tools.git

Check :

arm-linux-gnueabihf-gcc -v gcc version 4.9.1 (Raspbian 4.9.1-19) service mpd restart pip -V pip 6.0.3 from /usr/local/lib/python2.7/dist-packages (python 2.7)

And evdev installs suceesfully !!

pip install evdev Successfully installed evdev-0.4.6

And volumio is still ALIVE !!

Next let’s try the script.

mouse.py
(chmod +x)

from evdev import InputDevice
from select import select
dev = InputDevice('/dev/input/mouse0') # This can be any other event number. On$
while True:
        r,w,x = select([dev], [], [])
        for event in dev.read():
# The event.code for a scroll wheel event is 8, so I do the following
#button left 272, right 273
                if event.code == 8:
                        print "wheel"
                        print(event.value)
                elif event.code == 272:
                        print "left button"
                        print(event.value)
                elif event.code == 273:
                        print "right button"
                        print(event.value)

Another caveheat…

root@volumio:~# python mouse.py Traceback (most recent call last): File "mouse.py", line 3, in <module> dev = InputDevice('/dev/input/mice') # This can be any other event number. On$ File "/usr/local/lib/python2.7/dist-packages/evdev/device.py", line 96, in __init__ info_res = _input.ioctl_devinfo(self.fd) IOError: [Errno 25] Inappropriate ioctl for device

IOError: [Errno 25] Inappropriate ioctl for device, googling it to try to see where is the problem source.

The error states the problem is in line 3 of the script

Line 3 has mouse0, the error shows mice.

So i bet you changed a thing to the script and have a wrong number, one that isn’t available