DescriptionThanks to a parental leave I finally had time again for some programming and so I can present today:
The kitchen computer is a Raspberry Pi running a Qt-based application with:
- count down timer (always welcome in the kitchen)
- music player
- weather report with 5-days forecast and satellite image
- clock and calendar
SummaryThe Raspberry runs Raspbian, an optimized Debian distribution.
For music playback I installed mpd which accesses the mp3 collection of the local file server.
Since the onboard sound of the Raspi doesn't even please my modest audiophile requirements, the music is played via a USB sound card. A subwoofer behind the cookbooks and two satellite speakers care for the right sound.
The onboard sound card is solely used for the user interface sounds.
The display is one I bought years ago and actually intended for the rear bench seats in cars to let the children watch DVDs. According to the age of the display, it has only composite video and VGA inputs. Thus, for the HDMI output of the Raspi I had to get a converter. I feel like I had spend half the complete project duration for configuring an error-free video output for this thing on Raspbian.
Much less problems caused the touch screen, which is connected by USB.
But the central part of the kitchen computer is the kitchen_panel application, a C++ application with QML-basierd graphical user interface and classes for music playback via mpd remote control and for those LCARS elements which could not be illustrated with QML means.
Music playerFor music playback a connection with mpd is established to send commands (play, stop, next, etc.) and to obtain information about the played song (title, album name, artist, etc.).
Unfortunately, this doesn't work always as is should. So, as a workaround, the kitchen computer also runs mpc - a console client for mpd which is just used without further ado by system instructions:
system("mpc play -q");
Weather reportThe services of weather.com are used for the weather report functionality. You can get a XML file via a URL like this::
http://wxdata.weather.com/wxdata/weather/local/GMXX0007?cc=*&dayf=5&unit=m. This returns the weather for Berlin (Location GMXX0007) with current conditions (cc=*) and a 5-days forecast (dayf=5) in metric units (unit=m).
And as an extra you can get a satellite image (animated gif) from Weather underground:
exemplary link for Berlin
Just replace the lat and lon values with geographic latitude and longitude for other places.
DesignStar Trek nerds certainly already recognized it: the design copies the LCARS style from Star Trek: The Next Generation and looks like somebody beamed it directly from Picards bridge in the 24. century to the present.
Here and here someone gave some serious thoughts on good LCARS design.
And finally of course also the font must match.
ImagesSince I cannot show a video of the whole thing in action due to GEMA and music copyright bullshit stuff, following just some screenshots:
- Qt creator on Raspbian
- installing Qt creator
- Qt creator tool chain (1)
- Qt creator tool chain (2)
- QT5 cross-compiling
- Qt and Raspbian: troubleshooting
- LCARS colors (1)
- LCARS colors (2)
- Design example: LCARS keyboard
- Design example: LCARS patterns
- Star Trek-Sounds (1)
- Star Trek-Sounds (2)
- Evolution of LCARS
- Design pattern
- LCARS font set
- Pattern for library menu
MPD and MPC
- MPD troubleshooting
- libmpd downloads
- libmpd player code
- libmpd example code
- libmpd files
- libmpdclient class
- example code
- sound blaster settings