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;
[bash] disable_splash=1[/bash]
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;
[bash] logo.nologo consoleblank=0 loglevel=1 quiet[/bash]
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;
[bash] sudo systemctl disable getty@tty1[/bash]
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?
Splash screen
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;
[bash] cd /optsudo wget -O splash.png https://www.j1nx.nl/wp-content/uploads/2018/06/Mycroft-AI_desktop-bg_HD-1920×1080.png
[/bash]
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;
[bash] sudo apt-get install fbi[/bash]
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
[bash] sudo nano /etc/systemd/system/splashscreen.service [Unit] Description=Splash screenDefaultDependencies=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
[/bash]
Enable the service to run at boot by;
[bash] sudo systemctl enable splashscreen[/bash]
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…..
Do you like what you just read? Keep me going by donating on Paypal or become a Patron.
I’d love to see a simple control of a Sonoff (loaded with Espeasy) or even an LED would be awesome..
There are already several “simple” skill to control a few IoT’s such as the WeMo;
https://github.com/martymulligan/skill-wemo#readme
Wink IoT;
https://github.com/MycroftAI/skill-wink-iot#readme
Phillips Hue;
https://github.com/ChristopherRogers1991/mycroft-hue/blob/master/README.md
But if you really want to have full voice control over your Home Automation devices, you let OpenHAB or Home Assistant take care of the devices;
https://github.com/openhab/openhab-mycroft
https://github.com/btotharye/mycroft-homeassistant#readme
In a future blog post of the series, I will install Home Assistant onto the device as well. Have some nice ideas about it 😉