Tag Archives: frustration

LIRC setup on RPi #2

After, much MUCH frustration in failing to get LIRC to recognise my remote on my spare RPi, I set it up fresh on the actual RPizeBox, just to see what happened.  The steps were something like those described on alexba.in but I am copying them here.  Spot the minor change.  Thanks alexba.in!

sudo apt-get install lirc

Add this to /etc/modules file:

lirc_dev
lirc_rpi gpio_in_pin=25

Change /etc/lirc/hardware.conf file to:

########################################################
 # /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=""
 ########################################################

Restart lircd so it picks up these changes:

sudo /etc/init.d/lirc stop
sudo /etc/init.d/lirc start

It worked immediately.  Here are the remote codes appearing.

pi@hood ~ $ sudo irw
0000000000001826 00 0/10 Sony_RMT-CS33AD
0000000000001826 01 0/10 Sony_RMT-CS33AD
0000000000001826 02 0/10 Sony_RMT-CS33AD
0000000000001826 03 0/10 Sony_RMT-CS33AD
0000000000001826 04 0/10 Sony_RMT-CS33AD
0000000000001826 05 0/10 Sony_RMT-CS33AD
0000000000001826 06 0/10 Sony_RMT-CS33AD
0000000000001826 07 0/10 Sony_RMT-CS33AD
0000000000001826 08 0/10 Sony_RMT-CS33AD
0000000000007026 00 08 Sony_RMT-CS33AD
0000000000007026 01 08 Sony_RMT-CS33AD
0000000000007026 02 08 Sony_RMT-CS33AD

I set up pylirc the easy way this time!

sudo apt-get install python-pip
sudo pip install pylirc2

Easy.

I then downloaded the pylirc_test.py and its conf file as suggested in the Voice of Reason and optimistically ran it.  And nothing happened at all, which was very disappointing indeed.  But I am one step closer I guess.  Maddening that it didn’t work with the other RPi.

I then found this glorious page from 2009 by Will Miro.  It helped me make a config file that worked and finally I got the test page responding.  I think that is enough for now.

Adding Squeezelite to SqueezboxServer on Rpi

Our squeezebox classic has died for as yet unidentified reasons.  I have already rebuilt it once using my original post as a guide after my dodgy self made RPi case rebooted it once too often.

To get spotify on my RPi (armel) version I used this with some tweaks:

[Tutorial] Squeezelite up and running on Raspbian Wheezy HF:

  • I had to download  the armel version of the binary
  • wget http://squeezelite.googlecode.com/files/squeezelite-armv6hf

  •  I think that there is a bug in the start/stop script – I had to remove the ” — $DAEMON” line from the start command for some reason before it would work.

Fiddling with python and pyrow

Got pyrow working last night.  Today not so good, so going to document steps here.  It is as good a place as any other.

cstate = results[‘CSAFE_GETSTATUS_CMD’][0]

Throws “TypeError: list indices must be integers, not str” all of a sudden.  I have changed nothing.  I think that this is because there is nothing coming back from the erg so the results array is empty.

CSAFE is some sort of open source means of communicating with gym equipment I think.

I give up for now.  Frustrating that it worked last night!

Bleah.

SOLVED: rPi, samba, usb disk and read only frustrations.

We’re leaving for holiday tomorrow, so *of course* I decided that it was the *ideal* time to fix the album art in our music connection.  Don’t ask.

I found that I couldn’t access the windows (samba) share on my Raspberry Pi without it being read only.  Two hours of testing later I worked out that it was switching to read only when I tried to edit a file on it from the Windows machine.  Much googling later I worked out that it was probably a self defence mechanism of the disk switching to read-only because it had problems.

I knew it had problems but had ignored them.

A little googling later and I had downloaded dosfstools, unmounted the disk and run

sudo dosfsck -r /dev/sdsa1

repeatedly until it had no errors.  Then it worked perfectly.