As the title says, I’m having a problem getting a LCD screen (hd44780) to show info from the MPD.
I followed the andypi.co.uk/?p=334 tutorial, with some changes, because my display is 20x4, but in essence everything is equal and LCDproc is already starting in the boot.
When I try to run mpdlcd directly, it gives an error:
socket.error: [Errno 2] No such file or directory (sorry for not writing everything)
very similar to this thread in the old raspyfi forum raspyfi.com/forum/tweaks-and … w-playing/ Andy even states that there is a problem with the logs and points to a tutorial (which is the one I’m trying).
Does anybody have a answer or suggestion? I really wanted a LCD to make a great volumio setup, but I am a bit of a noob around this.
Sorry, I’ll do it tomorrow, I was using the RPi connected to a monitor and I was lazy to write everything, basically because I became extremely frustrated and didn’t come up with any answers. I’ll write the log tomorrow with a clear head, but I am pretty sure that the error and log was equal or at least very similar to the one from the raspify.
The complete log when I try to start mpdlcd with the command: mpdlcd is:
Traceback (most recent call last):
File "/usr/local/bin/mpdlcd", line 10, in <module>
cli.main(sys.argv)
File "/usr/local/lib/python2.7/dist-packages/mpdlcd/cli.py", line 472, in main
'logfile', 'loglevel', 'debug'))
File "/usr/local/lib/python2.7/dist-packages/mpdlcd/cli.py", line 367, in _setup_logging
handler = logging_handlers.SysLogHandler(address, facility=syslog_facility)
File "/usr/lib/python2.7/logging/handlers.py", line 760, in __init__
self._connect_unixsocket(address)
File "/usr/lib/python2.7/logging/handlers.py", line 788, in _connect_unixsocket
self.socket.connect(address)
File "/usr/lib/python2.7/socket.py", line 224, in meth
return getattr(self._sock,name)(*args)
socket.error: [Errno 2] No such file or directory
If somebody can help I would be most appreciated. Thank you
I just realized I’d put an extra space on the bootmisc.sh file. Everythings working perfectly now, so if someone wants or can, put a solved in the title.
For all of those who mpdlcd fails, there’s a simple way to solve it.
As andy says in his post , the problem comes from using bootmisc , an almost obsolete procedure that has been surpassed first by rc.local , then by systemd . Honestly I was surprised to find in this distro. For me the solution to all problems is in daemonizing mpdlcd , being more comfortable starting and stopping , and giving root privileges, avoiding any problem with syslog or others.
Create the script.
sudo nano /etc/init.d/mpdlcd
Add this to the script.
#! /bin/sh
# /etc/init.d/shairport
#
### BEGIN INIT INFO
# Provides: mpdlcd
# Required-Start: $remote_fs $syslog
# Required-Stop: $remote_fs $syslog
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Put a short description of the service here
# Description: Put a long description of the service here
### END INIT INFO
case "$1" in
start)
/usr/local/bin/mpdlcd &
;;
stop)
killall mpdlcd
;;
*)
echo "Usage: /etc/init.d/mpdlcd {start|stop}"
exit 1
;;
esac
exit 0
#[/code]
Make it executable for all users, and make it run at start up.
[code]sudo chmod a+x /etc/init.d/mpdlcd
sudo update-rc.d mpdlcd defaults
Reboot then hopefully your lcd with mpdlcd will be working.