Our Personal AI Assistant, of course is more then just a smart speaker. We have a HDMI port on the device, and as explained in my first post where I shared with you my vision about the Personal Assistant. We are going to use the HDMI port as well. A default install of Raspbian however shows A lot of linux rumble at the HDMI port, which well… Does not look nice. So we are going to show a background image as soon as possible in the boot process, to spice things up a bit.
First some Cleaning up
Firstly, we want to cleanup the boot-up process by disabling the Raspberry Pi ‘color test’. Disabling the Raspberry Pi logo in the corner. Disabling the various bits of output from the kernel and by disabling the login prompt.
We are going to adjust two files on the /boot partition of our system. First open the /boot/config.txt and add or uncomment the following parameter;
This will disable that 4-color quick splash you see at the very beginning of the boot process. Secondly we are going to adjust /boot/cmdline.txt and add the following parameters into the same bootline;
logo.nologo consoleblank=0 loglevel=1 quiet
This will remove the Raspberry Pi logo in the top left of the screen and supresses the linux stuff that scrolls over the screen at boot. The last part of our cleaning up is to disable the login prompt when the whole boot process is finished. We do that by the following command;
sudo systemctl disable getty@tty1
This will remove all linux stuff you see flying by on your HDMI screen when you turn on the device. However, just a black screen is really not that appealing right?
To show something better than just a black screen, we need of course something nice to show instead. We are going to show a MyCroft A.I. themed wallpaper which you might have already seen elsewhere on this site.
Download above wallpaper onto you device in the /opt folder by;
cd /opt sudo wget -O splash.png https://www.j1nx.nl/wp-content/uploads/2018/06/Mycroft-AI_desktop-bg_HD-1920x1080.png
Then we need to install some tools that allows us to project that wallpaper onto the framebuffer of the device. We do that with the command;
sudo apt-get install fbi
Then we are already onto the last part, which is actually creating a service deamon that projects the splash.png we created onto the screen at the very earliest possible time during the boot process.
So run the command and insert the text below it into the file. Exit and save by CTRL+X -> Y
sudo nano /etc/systemd/system/splashscreen.service [Unit] Description=Splash screen DefaultDependencies=no After=local-fs.target [Service] ExecStart=/usr/bin/fbi -d /dev/fb0 --noverbose -a /opt/splash.png StandardInput=tty StandardOutput=tty [Install] WantedBy=sysinit.target
Enable the service to run at boot by;
sudo systemctl enable splashscreen
That’s it ! We now have a nice graphical splash screen that will be shown onto the HDMI connected screen when we turn on our device. From here on we could use our voice for things like;
- Hey MyCroft, open Kodi.
- Hey MyCroft, play “hero of war” from “rise against” on the main screen.
- Hey MyCroft, tell me about “artificial Intelligence”.
- Hey MyCroft, show me onto the screen.
- Hey MyCroft, open Home Assistant.
These are just a few ideas I have. The first one is easy and I will implement this any time soon, creating another PART of this series. The rest are things that needs some development. The skills that are used to listen things on YouTube must be adjusted to play both the audio and video. Other skills that already show visual information at for instance the KDE-Plasma widget and / or later in time when the Mark-II is out on it’s screen can be adjusted to also show (more) information onto the HDMI screen.
Wiki / DuckDuckGO information and Home Assistant can be shown onto the screen by launching for instance a complete borderless, toolbarless minimal browser. Together with the skill to control mouse / keyboard input, we basically create something that Mozilla is already working on; “Scout – a voice-controlled browser“. With Home Assistant showing in a browser on the screen, we don’t even need the keyboard controll skill as saying things like; “Hey MyCroft, turn off the kitchen light” will be straight away visible if using the Home Assistant skill made by Brian Hopkins (btotharye) of Geeked Out Solutions.
More interesting stuff to come…..